Menu

Problems running multiple instances

2008-05-18
2013-05-30
  • Charles Jones

    Charles Jones - 2008-05-18

    I am trying to serve 3 different (same model) cameras on the same machine with mjpeg-streamer. I am properly using unique HTTP TCP ports.

    The issue I am having is no matter what I try, I am unable to get more than 2 of the cameras working simultaneously. I get the following error:

    # ./start3.sh
    MJPG Streamer Version.: 2.0
    i: Using V4L2 device.: /dev/video3
    i: Desired Resolution: 640 x 480
    i: Frames Per Second.: 5
    i: Format............: MJPEG
    o: www-folder-path...: ./www/
    o: HTTP TCP port.....: 8082
    o: username:password.: disabled
    o: commands..........: enabled
    Unable to dequeue buffer: Input/output error
    i: Error grabbing frames

    When this happens, in "dmesg" IU see the following error:
    uvcvideo: Non-zero status (-18) in video completion handler.

    I am using uvcvideo driver revision #209 and mjpeg-streamer revision #59

     
    • Tom

      Tom - 2008-05-18

      Hi Chris,
      Does it work if you are using luvcview for instance for all three cams? It may be an issue of reserved bandwidth and available bandwidth of the USB controller at the USB ports. Are all cameras attached to the same port or are they attached to independent USB-controllers?

      Regards,
      Tom

       
    • Charles Jones

      Charles Jones - 2008-05-18

      according to lspci I have five controllers:
      00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
      00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
      00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
      00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
      00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)

      Hmm it looks like only one of them is USB 2.0? The machine has 4 USB ports on the rear, attached to the mainboard, this is where the cameras are plugged in (to invididual ports). Here is what I see in dmesg when I plug them in:

      uvcvideo: Found UVC 1.00 device <unnamed> (046d:0990)
      input: UVC Camera (046d:0990) as /class/input/input71
      uvcvideo: Found UVC 1.00 device <unnamed> (046d:08cc)
      input: UVC Camera (046d:08cc) as /class/input/input72
      uvcvideo: Found UVC 1.00 device <unnamed> (046d:0990)
      input: UVC Camera (046d:0990) as /class/input/input73
      usbcore: registered new driver uvcvideo
      USB Video Class driver (SVN r209)

      I'm not certain if each port is served by a seperate controller or not. I assume so, as there are no other USB ports on the machine.

       
    • Tom

      Tom - 2008-05-19

      Hello Charles,
      Did it work to operate all cams at the same time with luvcview?

      Cheers,
      Tom

       
    • Charles Jones

      Charles Jones - 2008-05-25

      I havn't tried lucview, as there is no X installation on this server.

      However, I did install an additional USB 2.0 card, and moved 2 of the cameras to that, and the problem persists. Sometimes I can get all the cams working simultaenously for several hours, and then they will stop working and refuse to restart as such:

      # ./capture.sh 3
      MJPG Streamer Version.: 2.0
      i: Using V4L2 device.: /dev/video3
      i: Desired Resolution: 640 x 480
      i: Frames Per Second.: 5
      i: Format............: MJPEG
      Unable to set format: Input/output error
      Init v4L2 failed !! exit fatal
      i: init_VideoIn failed

      I am beginning to suspect it is an issue with the uvcvideo driver, as sometimes when one of the cams goes unresponsive, if I rmmod uvcvideo; modprobe uvcvideo that cam will not be detected until I also unload and reload uhci_hcd module after which if I again reload uvcvideo the device is detected and created, and will work for a short time.

       
    • Charles Jones

      Charles Jones - 2008-05-25

      I forgot to post, here is the other error I get when one of the cams stops working:
      ./capture.sh 3
      MJPG Streamer Version.: 2.0
      i: Using V4L2 device.: /dev/video3
      i: Desired Resolution: 640 x 480
      i: Frames Per Second.: 5
      i: Format............: MJPEG
      o: www-folder-path...: ./www/
      o: HTTP TCP port.....: 8083
      o: username:password.: disabled
      o: commands..........: enabled
      Unable to dequeue buffer: Input/output error
      i: Error grabbing frames

      Is there a way to get more verbose debug output?

       
      • Tom

        Tom - 2008-06-04

        Currently you may recompile with the "DEBUG" option (requires to edit the appropriate Makefile) which gives you a quite verbose output. Does the issue still persist?

        Regards,
        Tom

         
    • Charles Jones

      Charles Jones - 2009-03-15

      Wow I just realized I never replied to this after I resolved the issue.

      Turns out the problem was caused by using passive USB extention cables. I discovered that if there is a passive extention used on any camera, it causes random problems with the USB bus. I am now actually running 6 cameras, with 5 of them on *active* extensions, with no problems. 2 of them even have 3 active extensions chained to extend the cable to over 100 feet.  These active extensions are basically an extension cable with a single port USB hub on the end. They boost the signal and do not cause impedance problems that unpowered extensions cause.  I was reminded of this a week ago when someone plugged in another cam with just a 4' normal USB extension...I was getting the exact same symptoms as above. Once we discovered the unboosted extention, both plugging the camera in directly and also using an active extention fixed the problem.  Note that the problem does usually manifest with the camera with the bad extention, so it makes it hard to troubleshoot, as seeminglly random cameras stop working.

       

Log in to post a comment.