“No space left on device” issue in using multiple cameras

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












When I try to capture video from two usb (uvc) cameras connected on a single usb port, there is an error:



libv4l2: error turning on stream: No space left on device
Unable to start capture: No space left on device


I know this is a known issue; sometimes this is because there is no bandwidth left on the usb port, and sometimes we can solve this by sudo rmmod uvcvideo; sudo modprobe uvcvideo quirks=128 commands.



However I found that on almost the same condition (USB 2, two same camera devices), we can get video stream on some machines, and we cannot do on some machines. The below is my investigation. I want to know why they happen, and more interestingly, how to stream from two or more cameras in general.



Experiments:



Cameras I used: ELP-USBFHD01M-L180

Output of v4l2-ctl --list-formats-ext (we use only 320x240; other resolutions are omitted):



ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'MJPG' (compressed)
Name : Motion-JPEG
Size: Discrete 320x240
Interval: Discrete 0.008s (120.101 fps)

Index : 1
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Size: Discrete 320x240
Interval: Discrete 0.033s (30.000 fps)


Machines:



  • Thinkpad T440p, Ubuntu 14.04.5, USB 2

  • Odroid XU4, Ubuntu 16.04.2, USB 3

  • Raspberry Pi 3B, Ubuntu 16.04, USB 2

Method: On each machine, executing mjpg-streamer in YUYV mode or MJPG mode for one or two cameras.



Result:



  • Thinkpad T440p, Ubuntu 14.04.5, USB 2

    • two cameras 320x240 YUYV worked at at 30 fps.

    • one camera 320x240 MJPG worked at at 67 fps.

    • two cameras 320x240 MJPG did not work.


  • Odroid XU4, Ubuntu 16.04.2, USB 3

    • two cameras 320x240 YUYV worked at at 30 fps.

    • one camera 320x240 MJPG worked at at 69 fps.

    • two cameras 320x240 MJPG did not work.


  • Raspberry Pi 3B, Ubuntu 16.04, USB 2

    • two cameras 320x240 YUYV worked at at 30 fps.

    • two cameras 320x240 MJPG worked at at 65 fps.


So, on Raspberry Pi 3B, we could stream video from two cameras in MJPG mode at 60+ FPS, while we could not do that on the other machines due to the "No space left on device" error.



I want to know why, and how to make this available on the other machines (Thinkpad, Odroid).



According to this question, I checked:



cat /sys/kernel/debug/usb/devices | grep "B: "


when streaming from the cameras.



Result:



Thinkpad T440p, Ubuntu 14.04.5, USB 2



no camera



3:B: Alloc= 0/800 us ( 0%), #Int= 1, #Iso= 0
56:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


two cameras 320x240 YUYV worked at at 30 fps.



3:B: Alloc=512/800 us (64%), #Int= 4, #Iso= 10
113:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


one camera 320x240 MJPG worked at at 67 fps.



3:B: Alloc=488/800 us (61%), #Int= 3, #Iso= 5
113:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


Odroid XU4, Ubuntu 16.04.2, USB 3



no camera



B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


two cameras 320x240 YUYV worked at at 30 fps.



B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 9
B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


one camera 320x240 MJPG worked at at 69 fps.



B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 5
B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


Raspberry Pi 3B, Ubuntu 16.04, USB 2



no camera



B: Alloc=-7151580/800 us (-893947%), #Int= -9, #Iso=-119193


two cameras 320x240 YUYV worked at at 30 fps.



B: Alloc=-5395920/800 us (-674489%), #Int= -8, #Iso=-89932


two cameras 320x240 MJPG worked at at 65 fps.



B: Alloc=-4363020/800 us (-545377%), #Int= -8, #Iso=-72717


Many thanks!

--Akihiko










share|improve this question

























    up vote
    0
    down vote

    favorite












    When I try to capture video from two usb (uvc) cameras connected on a single usb port, there is an error:



    libv4l2: error turning on stream: No space left on device
    Unable to start capture: No space left on device


    I know this is a known issue; sometimes this is because there is no bandwidth left on the usb port, and sometimes we can solve this by sudo rmmod uvcvideo; sudo modprobe uvcvideo quirks=128 commands.



    However I found that on almost the same condition (USB 2, two same camera devices), we can get video stream on some machines, and we cannot do on some machines. The below is my investigation. I want to know why they happen, and more interestingly, how to stream from two or more cameras in general.



    Experiments:



    Cameras I used: ELP-USBFHD01M-L180

    Output of v4l2-ctl --list-formats-ext (we use only 320x240; other resolutions are omitted):



    ioctl: VIDIOC_ENUM_FMT
    Index : 0
    Type : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name : Motion-JPEG
    Size: Discrete 320x240
    Interval: Discrete 0.008s (120.101 fps)

    Index : 1
    Type : Video Capture
    Pixel Format: 'YUYV'
    Name : YUYV 4:2:2
    Size: Discrete 320x240
    Interval: Discrete 0.033s (30.000 fps)


    Machines:



    • Thinkpad T440p, Ubuntu 14.04.5, USB 2

    • Odroid XU4, Ubuntu 16.04.2, USB 3

    • Raspberry Pi 3B, Ubuntu 16.04, USB 2

    Method: On each machine, executing mjpg-streamer in YUYV mode or MJPG mode for one or two cameras.



    Result:



    • Thinkpad T440p, Ubuntu 14.04.5, USB 2

      • two cameras 320x240 YUYV worked at at 30 fps.

      • one camera 320x240 MJPG worked at at 67 fps.

      • two cameras 320x240 MJPG did not work.


    • Odroid XU4, Ubuntu 16.04.2, USB 3

      • two cameras 320x240 YUYV worked at at 30 fps.

      • one camera 320x240 MJPG worked at at 69 fps.

      • two cameras 320x240 MJPG did not work.


    • Raspberry Pi 3B, Ubuntu 16.04, USB 2

      • two cameras 320x240 YUYV worked at at 30 fps.

      • two cameras 320x240 MJPG worked at at 65 fps.


    So, on Raspberry Pi 3B, we could stream video from two cameras in MJPG mode at 60+ FPS, while we could not do that on the other machines due to the "No space left on device" error.



    I want to know why, and how to make this available on the other machines (Thinkpad, Odroid).



    According to this question, I checked:



    cat /sys/kernel/debug/usb/devices | grep "B: "


    when streaming from the cameras.



    Result:



    Thinkpad T440p, Ubuntu 14.04.5, USB 2



    no camera



    3:B: Alloc= 0/800 us ( 0%), #Int= 1, #Iso= 0
    56:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


    two cameras 320x240 YUYV worked at at 30 fps.



    3:B: Alloc=512/800 us (64%), #Int= 4, #Iso= 10
    113:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


    one camera 320x240 MJPG worked at at 67 fps.



    3:B: Alloc=488/800 us (61%), #Int= 3, #Iso= 5
    113:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


    Odroid XU4, Ubuntu 16.04.2, USB 3



    no camera



    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


    two cameras 320x240 YUYV worked at at 30 fps.



    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 9
    B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


    one camera 320x240 MJPG worked at at 69 fps.



    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 5
    B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
    B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


    Raspberry Pi 3B, Ubuntu 16.04, USB 2



    no camera



    B: Alloc=-7151580/800 us (-893947%), #Int= -9, #Iso=-119193


    two cameras 320x240 YUYV worked at at 30 fps.



    B: Alloc=-5395920/800 us (-674489%), #Int= -8, #Iso=-89932


    two cameras 320x240 MJPG worked at at 65 fps.



    B: Alloc=-4363020/800 us (-545377%), #Int= -8, #Iso=-72717


    Many thanks!

    --Akihiko










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      When I try to capture video from two usb (uvc) cameras connected on a single usb port, there is an error:



      libv4l2: error turning on stream: No space left on device
      Unable to start capture: No space left on device


      I know this is a known issue; sometimes this is because there is no bandwidth left on the usb port, and sometimes we can solve this by sudo rmmod uvcvideo; sudo modprobe uvcvideo quirks=128 commands.



      However I found that on almost the same condition (USB 2, two same camera devices), we can get video stream on some machines, and we cannot do on some machines. The below is my investigation. I want to know why they happen, and more interestingly, how to stream from two or more cameras in general.



      Experiments:



      Cameras I used: ELP-USBFHD01M-L180

      Output of v4l2-ctl --list-formats-ext (we use only 320x240; other resolutions are omitted):



      ioctl: VIDIOC_ENUM_FMT
      Index : 0
      Type : Video Capture
      Pixel Format: 'MJPG' (compressed)
      Name : Motion-JPEG
      Size: Discrete 320x240
      Interval: Discrete 0.008s (120.101 fps)

      Index : 1
      Type : Video Capture
      Pixel Format: 'YUYV'
      Name : YUYV 4:2:2
      Size: Discrete 320x240
      Interval: Discrete 0.033s (30.000 fps)


      Machines:



      • Thinkpad T440p, Ubuntu 14.04.5, USB 2

      • Odroid XU4, Ubuntu 16.04.2, USB 3

      • Raspberry Pi 3B, Ubuntu 16.04, USB 2

      Method: On each machine, executing mjpg-streamer in YUYV mode or MJPG mode for one or two cameras.



      Result:



      • Thinkpad T440p, Ubuntu 14.04.5, USB 2

        • two cameras 320x240 YUYV worked at at 30 fps.

        • one camera 320x240 MJPG worked at at 67 fps.

        • two cameras 320x240 MJPG did not work.


      • Odroid XU4, Ubuntu 16.04.2, USB 3

        • two cameras 320x240 YUYV worked at at 30 fps.

        • one camera 320x240 MJPG worked at at 69 fps.

        • two cameras 320x240 MJPG did not work.


      • Raspberry Pi 3B, Ubuntu 16.04, USB 2

        • two cameras 320x240 YUYV worked at at 30 fps.

        • two cameras 320x240 MJPG worked at at 65 fps.


      So, on Raspberry Pi 3B, we could stream video from two cameras in MJPG mode at 60+ FPS, while we could not do that on the other machines due to the "No space left on device" error.



      I want to know why, and how to make this available on the other machines (Thinkpad, Odroid).



      According to this question, I checked:



      cat /sys/kernel/debug/usb/devices | grep "B: "


      when streaming from the cameras.



      Result:



      Thinkpad T440p, Ubuntu 14.04.5, USB 2



      no camera



      3:B: Alloc= 0/800 us ( 0%), #Int= 1, #Iso= 0
      56:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


      two cameras 320x240 YUYV worked at at 30 fps.



      3:B: Alloc=512/800 us (64%), #Int= 4, #Iso= 10
      113:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


      one camera 320x240 MJPG worked at at 67 fps.



      3:B: Alloc=488/800 us (61%), #Int= 3, #Iso= 5
      113:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


      Odroid XU4, Ubuntu 16.04.2, USB 3



      no camera



      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


      two cameras 320x240 YUYV worked at at 30 fps.



      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 9
      B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


      one camera 320x240 MJPG worked at at 69 fps.



      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 5
      B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


      Raspberry Pi 3B, Ubuntu 16.04, USB 2



      no camera



      B: Alloc=-7151580/800 us (-893947%), #Int= -9, #Iso=-119193


      two cameras 320x240 YUYV worked at at 30 fps.



      B: Alloc=-5395920/800 us (-674489%), #Int= -8, #Iso=-89932


      two cameras 320x240 MJPG worked at at 65 fps.



      B: Alloc=-4363020/800 us (-545377%), #Int= -8, #Iso=-72717


      Many thanks!

      --Akihiko










      share|improve this question













      When I try to capture video from two usb (uvc) cameras connected on a single usb port, there is an error:



      libv4l2: error turning on stream: No space left on device
      Unable to start capture: No space left on device


      I know this is a known issue; sometimes this is because there is no bandwidth left on the usb port, and sometimes we can solve this by sudo rmmod uvcvideo; sudo modprobe uvcvideo quirks=128 commands.



      However I found that on almost the same condition (USB 2, two same camera devices), we can get video stream on some machines, and we cannot do on some machines. The below is my investigation. I want to know why they happen, and more interestingly, how to stream from two or more cameras in general.



      Experiments:



      Cameras I used: ELP-USBFHD01M-L180

      Output of v4l2-ctl --list-formats-ext (we use only 320x240; other resolutions are omitted):



      ioctl: VIDIOC_ENUM_FMT
      Index : 0
      Type : Video Capture
      Pixel Format: 'MJPG' (compressed)
      Name : Motion-JPEG
      Size: Discrete 320x240
      Interval: Discrete 0.008s (120.101 fps)

      Index : 1
      Type : Video Capture
      Pixel Format: 'YUYV'
      Name : YUYV 4:2:2
      Size: Discrete 320x240
      Interval: Discrete 0.033s (30.000 fps)


      Machines:



      • Thinkpad T440p, Ubuntu 14.04.5, USB 2

      • Odroid XU4, Ubuntu 16.04.2, USB 3

      • Raspberry Pi 3B, Ubuntu 16.04, USB 2

      Method: On each machine, executing mjpg-streamer in YUYV mode or MJPG mode for one or two cameras.



      Result:



      • Thinkpad T440p, Ubuntu 14.04.5, USB 2

        • two cameras 320x240 YUYV worked at at 30 fps.

        • one camera 320x240 MJPG worked at at 67 fps.

        • two cameras 320x240 MJPG did not work.


      • Odroid XU4, Ubuntu 16.04.2, USB 3

        • two cameras 320x240 YUYV worked at at 30 fps.

        • one camera 320x240 MJPG worked at at 69 fps.

        • two cameras 320x240 MJPG did not work.


      • Raspberry Pi 3B, Ubuntu 16.04, USB 2

        • two cameras 320x240 YUYV worked at at 30 fps.

        • two cameras 320x240 MJPG worked at at 65 fps.


      So, on Raspberry Pi 3B, we could stream video from two cameras in MJPG mode at 60+ FPS, while we could not do that on the other machines due to the "No space left on device" error.



      I want to know why, and how to make this available on the other machines (Thinkpad, Odroid).



      According to this question, I checked:



      cat /sys/kernel/debug/usb/devices | grep "B: "


      when streaming from the cameras.



      Result:



      Thinkpad T440p, Ubuntu 14.04.5, USB 2



      no camera



      3:B: Alloc= 0/800 us ( 0%), #Int= 1, #Iso= 0
      56:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


      two cameras 320x240 YUYV worked at at 30 fps.



      3:B: Alloc=512/800 us (64%), #Int= 4, #Iso= 10
      113:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


      one camera 320x240 MJPG worked at at 67 fps.



      3:B: Alloc=488/800 us (61%), #Int= 3, #Iso= 5
      113:B: Alloc= 0/800 us ( 0%), #Int= 3, #Iso= 0


      Odroid XU4, Ubuntu 16.04.2, USB 3



      no camera



      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


      two cameras 320x240 YUYV worked at at 30 fps.



      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 9
      B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


      one camera 320x240 MJPG worked at at 69 fps.



      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 5
      B: Alloc= 39/900 us ( 4%), #Int= 2, #Iso= 0
      B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0


      Raspberry Pi 3B, Ubuntu 16.04, USB 2



      no camera



      B: Alloc=-7151580/800 us (-893947%), #Int= -9, #Iso=-119193


      two cameras 320x240 YUYV worked at at 30 fps.



      B: Alloc=-5395920/800 us (-674489%), #Int= -8, #Iso=-89932


      two cameras 320x240 MJPG worked at at 65 fps.



      B: Alloc=-4363020/800 us (-545377%), #Int= -8, #Iso=-72717


      Many thanks!

      --Akihiko







      usb webcam camera v4l






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 7 at 3:52









      Akihiko

      11




      11

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1003741%2fno-space-left-on-device-issue-in-using-multiple-cameras%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1003741%2fno-space-left-on-device-issue-in-using-multiple-cameras%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491