Monday, 20 August 2012
OpenWRT mjpg streamer with more then one camera
The Documentation for mjpg streamer in OpenWRT is very light for information and finding information for the /etc/config/mjpg-streamer file is almost impossible.
So I decided to add some of my notes.
One of the great things I have found with mjpg_streamer is that it can support many cameras I have tested 3 Logitech C270 and will be testing more when I get a bigger USB hub.
To setup mjpg_streamer for the second camera you need to change the device from "video0" to "video1" then for the third camera same again change "video1" to "video2"
Running multiple cameras is not supported by the default service/config so you ether need to edit /etc/init.d/mjpg-streamer to support the extra settings or run mjpg_streamer from the command line
Below is the command line I am using.
mjpg_streamer --input "input_uvc.so --device /dev/video0 --fps 3 --resolution 720x350 --output "output_http.so --port 8080"
mjpg_streamer --input "input_uvc.so --device /dev/video1 --fps 3 --resolution 720x350 --output "output_http.so --port 8081"
mjpg_streamer --input "input_uvc.so --device /dev/video2 --fps 3 --resolution 720x350 --output "output_http.so --port 8082"
I have found that if you put too much load on the processor you get a lot of garbled frames. So if you are using 1280x720 I recommend you don't have a frame rate of 15fps but something low like 1-5fps. You can even mix them up so on one of the robots I am building he has one camera with a low resolution high frame rate and a second camera with a high resolution low frame rate.