I am trying to capture a video with a webcam (Logitech c270) and dump it to a file. However, at 1280x960, I get about 3fps using ffmpeg with the following command:
ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 -vcodec mjpeg out2.mpeg
Is there a way to increase fps without simply reducing the resolution? Did I set anything wrong in the ffmpeg options?
This is the ffmpeg output
ffmpeg version 0.8.2-6:0.8.2-1+rpi1+b1, Copyright (c) 2000-2011 the Libav developers built on Jun 27 2012 01:07:05 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[video4linux2 @ 0x1399320] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
Duration: N/A, start: 8397.386391, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj422p, 1280x960, -5 kb/s, 30 tbr, 1000k tbn, 30 tbc
File 'out2.mpeg' already exists. Overwrite ? [y/N] y
[buffer @ 0x13992a0] w:1280 h:960 pixfmt:yuvj422p
[mpeg @ 0x139bac0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out2.mpeg':
Metadata:
encoder : Lavf53.21.0
Stream #0.0: Video: mjpeg, yuvj422p, 1280x960, q=2-31, 200 kb/s, 90k tbn, 30 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
frame= 29 fps= 3 q=24.8 size= 1704kB time=0.97 bitrate=14440.5kbits/s dup=27 drframe= 31 fps= 3 q=24.8 size= 1796kB time=1.03 bitrate=14238.2kbits/s dup=28 dr