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

Go To StackoverFlow.com

2

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.

2012-05-24 18:00
by ow3n
maybe use ffmpeg for the input instead? Just saying' : - rogerdpack 2012-09-14 05:04


2

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!!

2013-07-27 06:14
by securecurve
Also make sure that your camera supports JPEG compression protocol, if not, use the -y before the -d option - securecurve 2013-07-27 06:16


0

For me, the solution was simple - to not specify the framerate at all, only the resolution. It started to work.

2016-09-10 17:36
by Barafu Albino
Ads