[FFmpeg-trac] #3517(avdevice:new): can't set Video4Linux2 framerate
FFmpeg
trac at avcodec.org
Tue Apr 1 11:10:54 CEST 2014
#3517: can't set Video4Linux2 framerate
------------------------------------+------------------------------------
Reporter: nunojpg | Owner:
Type: defect | Status: new
Priority: normal | Component: avdevice
Version: git-master | Resolution:
Keywords: v4l2 | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by nunojpg):
{{{
nuno at sky5:~/Desktop/ffmpeg$ ./ffmpeg -f v4l2 -video_size 640x480
-framerate 5 -i /dev/video1 out1.avi
ffmpeg version N-61985-gd5c0036 Copyright (c) 2000-2014 the FFmpeg
developers
built on Mar 31 2014 22:09:58 with gcc 4.8 (Ubuntu 4.8.2-17ubuntu2)
configuration: --enable-libx264 --enable-gpl --enable-libfaac --enable-
nonfree
libavutil 52. 70.100 / 52. 70.100
libavcodec 55. 55.106 / 55. 55.106
libavformat 55. 36.100 / 55. 36.100
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 851.587966, bitrate: 24576 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480,
24576 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Output #0, avi, to 'out1.avi':
Metadata:
ISFT : Lavf55.36.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x480,
q=2-31, 200 kb/s, 5 tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
*** dropping frame 2 from stream 0 at ts 0
Last message repeated 1 times
*** dropping frame 3 from stream 0 at ts 1
Last message repeated 5 times
*** dropping frame 4 from stream 0 at ts 2
Last message repeated 3 times
*** dropping frame 4 from stream 0 at ts 2time=00:00:00.80 bitrate=
972.7kbits/s dup=0 drop=12
Last message repeated 1 times
*** dropping frame 5 from stream 0 at ts 3
Last message repeated 4 times
*** dropping frame 6 from stream 0 at ts 4
Last message repeated 5 times
*** dropping frame 7 from stream 0 at ts 5time=00:00:01.20 bitrate=
838.5kbits/s dup=0 drop=25
*** dropping frame 8 from stream 0 at ts 6
*** dropping frame 9 from stream 0 at ts 7
Last message repeated 4 times
*** dropping frame 10 from stream 0 at ts 8
Last message repeated 1 times
*** dropping frame 10 from stream 0 at ts 8ime=00:00:02.00 bitrate=
635.4kbits/s dup=0 drop=34
Last message repeated 1 times
*** dropping frame 11 from stream 0 at ts 9
Last message repeated 3 times
*** dropping frame 12 from stream 0 at ts 10
Last message repeated 3 times
*** dropping frame 12 from stream 0 at ts 10me=00:00:02.40 bitrate=
545.9kbits/s dup=0 drop=44
*** dropping frame 13 from stream 0 at ts 11
Last message repeated 3 times
*** dropping frame 14 from stream 0 at ts 12
Last message repeated 2 times
*** dropping frame 15 from stream 0 at ts 13me=00:00:02.80 bitrate=
565.9kbits/s dup=0 drop=52
Last message repeated 1 times
*** dropping frame 16 from stream 0 at ts 14
Last message repeated 1 times
*** dropping frame 17 from stream 0 at ts 15me=00:00:03.40 bitrate=
490.1kbits/s dup=0 drop=56
Last message repeated 2 times
*** dropping frame 19 from stream 0 at ts 17
*** dropping frame 20 from stream 0 at ts 18
*** dropping frame 20 from stream 0 at ts 18me=00:00:04.00 bitrate=
440.6kbits/s dup=0 drop=61
*** dropping frame 21 from stream 0 at ts 19
Last message repeated 1 times
*** dropping frame 22 from stream 0 at ts 20
Last message repeated 1 times
*** dropping frame 23 from stream 0 at ts 21me=00:00:04.40 bitrate=
411.8kbits/s dup=0 drop=66
Last message repeated 2 times
*** dropping frame 24 from stream 0 at ts 22
Last message repeated 1 times
frame= 24 fps=5.3 q=2.3 Lsize= 231kB time=00:00:04.80 bitrate=
394.2kbits/s dup=0 drop=71
video:225kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 2.722515%
Received signal 2: terminating.
}}}
{{{
nuno at sky5:~/Desktop/ffmpeg$ v4l2-ctl -d 1 --all
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : HD Pro Webcam C920
Bus info : usb-0000:00:1d.7-1
Driver version: 3.13.7
Capabilities : 0x84000001
Video Capture
Streaming
Device Capabilities
Device Caps : 0x04000001
Video Capture
Streaming
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'YUYV'
Field : None
Bytes per Line: 1280
Size Image : 614400
Colorspace : SRGB
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 640, Height 480
Default : Left 0, Top 0, Width 640, Height 480
Pixel Aspect: 1/1
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
brightness (int) : min=0 max=255 step=1
default=128 value=128
contrast (int) : min=0 max=255 step=1
default=128 value=128
saturation (int) : min=0 max=255 step=1
default=128 value=128
white_balance_temperature_auto (bool) : default=1 value=1
gain (int) : min=0 max=255 step=1 default=0
value=200
power_line_frequency (menu) : min=0 max=2 default=2 value=2
white_balance_temperature (int) : min=2000 max=6500 step=1
default=4000 value=4793 flags=inactive
sharpness (int) : min=0 max=255 step=1
default=128 value=128
backlight_compensation (int) : min=0 max=1 step=1 default=0
value=0
exposure_auto (menu) : min=0 max=3 default=3 value=3
exposure_absolute (int) : min=3 max=2047 step=1
default=250 value=500 flags=inactive
exposure_auto_priority (bool) : default=0 value=1
pan_absolute (int) : min=-36000 max=36000 step=3600
default=0 value=0
tilt_absolute (int) : min=-36000 max=36000 step=3600
default=0 value=0
focus_absolute (int) : min=0 max=250 step=5 default=0
value=0 flags=inactive
focus_auto (bool) : default=1 value=1
zoom_absolute (int) : min=100 max=500 step=1
default=100 value=100
}}}
In regard to the framerate being set before the video_size:
{{{
nuno at sky5:~/Desktop/ffmpeg$ ./ffmpeg -f v4l2 -video_size hd1080 -framerate
5 -i /dev/video1 file1.avi
ffmpeg version N-61985-gd5c0036 Copyright (c) 2000-2014 the FFmpeg
developers
built on Mar 31 2014 22:09:58 with gcc 4.8 (Ubuntu 4.8.2-17ubuntu2)
configuration: --enable-libx264 --enable-gpl --enable-libfaac --enable-
nonfree
libavutil 52. 70.100 / 52. 70.100
libavcodec 55. 55.106 / 55. 55.106
libavformat 55. 36.100 / 55. 36.100
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 579.007577, bitrate: 165888 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Output #0, avi, to 'file1.avi':
Metadata:
ISFT : Lavf55.36.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080,
q=2-31, 200 kb/s, 5 tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
frame= 8 fps=5.3 q=11.3 Lsize= 370kB time=00:00:01.80
bitrate=1682.4kbits/s
video:364kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.584158%
Received signal 2: terminating.
}}}
{{{
nuno at sky5:~/Desktop/ffmpeg$ ./ffmpeg -f v4l2 -video_size hd720 -framerate
10 -i /dev/video1 file2.avi
ffmpeg version N-61985-gd5c0036 Copyright (c) 2000-2014 the FFmpeg
developers
built on Mar 31 2014 22:09:58 with gcc 4.8 (Ubuntu 4.8.2-17ubuntu2)
configuration: --enable-libx264 --enable-gpl --enable-libfaac --enable-
nonfree
libavutil 52. 70.100 / 52. 70.100
libavcodec 55. 55.106 / 55. 55.106
libavformat 55. 36.100 / 55. 36.100
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
[video4linux2,v4l2 @ 0x1fcba40] The driver changed the time per frame from
1/10 to 1/5
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 591.103138, bitrate: 73728 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720,
73728 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Output #0, avi, to 'file2.avi':
Metadata:
ISFT : Lavf55.36.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x720,
q=2-31, 200 kb/s, 5 tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
*** dropping frame 3 from stream 0 at ts 1
*** dropping frame 4 from stream 0 at ts 2
*** dropping frame 5 from stream 0 at ts 3time=00:00:00.80
bitrate=1553.1kbits/s dup=0 drop=2
*** dropping frame 6 from stream 0 at ts 4
Last message repeated 1 times
frame= 6 fps=5.7 q=4.6 Lsize= 185kB time=00:00:01.20
bitrate=1265.6kbits/s dup=0 drop=5
video:180kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 3.166727%
Received signal 2: terminating.
}}}
If the second is considered to be a independent bug, I will open a new
ticket if not fixed.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3517#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list