Using USB HUB to use two web cameras
-
I need to project two WEB cameras at the same time, based on the example https://onion.io/streaming-video-over-wifi/, I can see one of the cameras but when using the mjpeg-streamer command for the second camera it generates mistake. I add the output of the command.
mjpg_streamer -i "/usr/lib/input_uvc.so -d /dev/video1 -r 640x480 -f 15" -o "/usr/lib/output_http.so -p 8081 -w /www/webcam1" MJPG Streamer Version.: 2.0 i: Using V4L2 device.: /dev/video1 i: Desired Resolution: 640 x 480 i: Frames Per Second.: 15 i: Format............: JPEG i: TV-Norm...........: DEFAULT o: www-folder-path...: /www/webcam1/ o: HTTP TCP port.....: 8081 o: username:password.: disabled o: commands..........: enabled Unable to start capture: No space left on device i: Error grabbing frames
-
@kamiloade How much space do you have available? use df -h
-
@crispyoz
I only have mjpg-streamer installed. The application runs in C, it uses very little memory.
-
@kamiloade might be a memory issue
Try running
free -h
at 3 different times and comparing:- baseline - before you start mjpg-streamer for the first webcam
- after starting mjpg-streamer for the first webcam
- after mjpg-streamer for the second webcam
Maybe also check how much space is available in
/tmp
at each of those points
-
This is with streaming turned off
This is with streaming from the first camera
This is with streaming from the second camera
The consumption is approximately 5MB and 6.2MB. the available memory is much higher so I don't think the problem is RAM.
I did the same test on an Omega 2+ and the error persists.
-
@kamiloade Hmm yeah, I agree, RAM is probably not the problem here.
Is there any way to get more verbose output from mjpg streamer? Maybe that will point you in a better debugging direction
-
@Lazar-Demin
I can't find a way to debug mjpg_streamer unless I do a clean build.
According to the official page, the program supports multiple cameras and I see that it does not present a problem.
I found in several forums the same problem and apparently it could be a problem when compiling the kernel with respect to the USB driver. Is there a way to validate the USB port configuration of the Onion omega 2?
-
@kamiloade said in Using USB HUB to use two web cameras:
Is there a way to validate the USB port configuration of the Onion omega 2?
Definitely! Our build system is 100% open source and available at https://github.com/OnionIoT/source
Follow Step 1 from the README to setup the build system, and then you can run
make menuconfig
to look at all of the configuration in depth.
-
I am facing the similar issue as @kamiloade . It says no space left on device when using two usb cameras. Did anyone find the solution to this please??
-
@kamiloade my first suspicion is that it is writing to the same file for both cameras, do you know where the files are being written? Or otherwise the two cameras are trying to create files/temp file that do exceed the device capacity. Have you looked at where these files are being written?