Find the answer to your Linux question:
Results 1 to 6 of 6
Hello all, I have Googled for so long to try to find this answer, and can't find a good one! Somebody please help me! My overall goal is to have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Location
    Naboo
    Posts
    6

    Two cameras


    Hello all,

    I have Googled for so long to try to find this answer, and can't find a good one! Somebody please help me!

    My overall goal is to have two webcams streaming simultaneously, however this is not an image specific / webcam question, it is more general linux, so please help!

    As I said, I am trying to get two webcams to stream simultaneously. Specifically, I am using OpenCV within ROS (robot operating system), but I don't think this makes a difference.

    I open up the first stream fine, and when I open the second camera stream, I get an error that there is no space left on the device.

    After browing for a little, it seems that the error is coming because the USB BUS can only handle so much information at one time. The first camera streams and takes up all the bandwidth, which leaves none for the second camera.

    After doing an <lsusb>, i see that there are only two BUS'. The first (BUS 001) seems like it is internal, and he second (BUS 002) seems like it is controlled by the external USB hubs.

    From other forums, I see reccomendations like "lower your quality of the video", or "take less samples per second", which would in principle free up some bandwidth and let the other camera operate. However, this does not work. One camera is streaming at 640x480, and lowering this to half should in principle allow a second 320x240 stream, but i still get the same error message!!

    I am trying to avoid purchasing a PCI card to create another BUS, so I am looking for help!!

    For instance, does anybody know how I can change one of the cameras to BUS 001, or even if this is possible (since it is internal)?

    There must be some way to run two cameras simultaneously, I have looked online and other people have done it.

    Can anybody help me? These other reccomendations are not working!

    Again, when trying to stream videos from /dev/video1 and /dev/video2, I get an error that there is no space left on the device "VIDIOC_STREAMON error 28, No space left on device".

    I am running Linux Ubuntu 11.04.

    Thanks everybody (and anybody that can help)!

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    Sorry, but I only have one camera for my system(s), also an external USB device, so I can't say if this can be resolved or not. The USB 2.0 specs allow 480mbps throughput, which should be plenty adequate for more than one camera, especially at vga resolutions (640x480) and 25-30fps. USB 3.0 is up to 5gbps, an order of magnitude (10x) faster than USB 2.0. So, to my mind there is no reason why your USB 2.0 system cannot handle two cameras. There may be some configuration options you need to deal with to enable both to stream through the same USB hub, but I wouldn't know what that may be. FWIW, converting an mpeg4 video at 512x384 @ 25fps to mpeg2 (dvd format - 720x480 @ 29.97fps) with ffmpeg at 200fps takes up less than 5mbps of bandwidth. IE, streaming a vga video @ 30fps would take a VERY small fraction of that bandwidth.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Location
    Naboo
    Posts
    6
    Thanks Rubberman,

    I have come to terms with this. I know I *should* be allowed to stream more than one camera, but it just won't let me!

    Do you know of any Linux utilities that will allow one to monitor the bandwidth over a USB bus?

    Still open! I need some help!

    -jj

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    I'm at work right now, but I'll try to respond later when I have some time.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Apr 2011
    Location
    Naboo
    Posts
    6
    Thanks Rubberman, I appreciat it.

    Input from anybody with an idea is still welcome!!!!!

  6. #6
    Just Joined!
    Join Date
    Apr 2011
    Location
    Naboo
    Posts
    6
    Just as an update:

    <lsusb> shows two buses- 001 and 002.

    When I plug in both cameras, they both go on 002.

    I manually went into /dev/bus/usb/ and moved the second camera from usb bus 002 to usb bus 001, but it still didn't work. same error.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •