Capturing images with mjpg-streamer at a higher resolution than 640x480

ow3n picture ow3n · May 24, 2012 · Viewed 11k times · Source

I'm using mjpg-streamer on Angstrom Linux on a BeagleBone and have been able to capture images from the stream. I can’t however seem to get the resolution to go above 640x480. When I try to set that option the result says it is streaming at the resolution I chose but the software doesn’t actually save any images.

For example, this works:

# ./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -r 640x480 -yuv -n -f 1 -q 80" -o "./output_file.so -f ./tests/ -d 5000"
MJPG Streamer Version: svn rev: 
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 1
 i: Format............: YUV
 i: JPEG Quality......: 80
 o: output folder.....: ./tests
 o: input plugin.....: 0: ./input_uvc.so
 o: delay after save..: 5000
 o: ringbuffer size...: no ringbuffer
 o: command...........: disabled

While this does not:

# ./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -r 1280x720 -yuv -n -f 1 -q 80" -o "./output_file.so -f ./tests/ -d 5000"
MJPG Streamer Version: svn rev: 
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 1280 x 720
 i: Frames Per Second.: 1
 i: Format............: YUV
 i: JPEG Quality......: 80
 o: output folder.....: ./tests
 o: input plugin.....: 0: ./input_uvc.so
 o: delay after save..: 5000
 o: ringbuffer size...: no ringbuffer
 o: command...........: disabled

I was successful in changing the resolution to lower than what appears to be the default though.

# ./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -r 320x240 -yuv -n -f 1 -q 80" -o "./output_file.so -f ./tests/ -d 5000"
MJPG Streamer Version: svn rev: 
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 320 x 240
 i: Frames Per Second.: 1
 i: Format............: YUV
 i: JPEG Quality......: 80
 o: output folder.....: ./tests
 o: input plugin.....: 0: ./input_uvc.so
 o: delay after save..: 5000
 o: ringbuffer size...: no ringbuffer
 o: command...........: disabled

I have tried playing with the frame rate to no avail.

Any help is appreciated.

Answer

securecurve picture securecurve · Jul 27, 2013

I faced the same issue before (but I'm using Raspberry pi), just adjust the permissions of the destination folder. I made the permissions on the folder 777, just for testing purposes, and I ran a similar command like the one you used ./mjpg_streamer -i "input_uvc.so -y --device /dev/video0" -o "output_file.so -f /home/pi/images -d 1500"

And it worked like a charm

P.S. Not really sure why it still shows this: o: ringbuffer size...: no ringbuffer .. but it works!!