Ticket #1570 (closed defect: fixed)
libv4l2: error dequeuing buf: Resource temporarily unavailable
| Reported by: | llarevo | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avdevice |
| Version: | git-master | Keywords: | v4l2 regression |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | yes |
Description
Capturing from analog card Terratec Cinergy 400 TV isn't possible in ffmpeg versions from 0.7.13 to 0.11.1. Capturing from and Terratec Cinergy XS USB is working fine. Both cards are proved OK for Linux and working with all of my other apps (tvtime, xawtv, mplayer, mencoder). See my discussion on linux-media http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/51055
I'm using Fedora 17 and tried different versions from 0.5.x with different hardware. The cards were tuned to Channel E10 (europe-west) and had good quality signal (analog cable).
The test results are
Cinergy XS USB Cinergy 400 TV 0.5.10 OK OK 0.7.13 OK broken (differently, s.b.) 0.8.12 OK broken (differently, s.b.) 0.9.2 OK broken (differently, s.b.) 0.9.2 (--enable-libv4l2) OK broken (like in title) 0.10.4 (--enable-libv4l2) OK broken (like in title) 0.11.1 OK broken (differently, s.b.) 0.11.1 (--enable-libv4l2) OK broken (like in title)
The detailed error from the broken test cases are below.
Further testing results in a regression introduced with version 70f7736 in 2009:
01058893 2010-09-12 19:44:45 OK 6ac6e3d 2010-09-23 03:40:06 OK 70f7736 2010-09-23 09:16:05 not OK 30b4ee79 2011-09-23 20:50:11 not OK
There seems to be a problem with setting the frame rate, because when the frame rate is given, the result is:
/usr/local/bin/ffmpeg -t 300 -f video4linux2 -s vga -r 25 -b 2000k -i /dev/video0 out-vga-2M-5min.mpg FFmpeg version git-70f7736, Copyright (c) 2000-2010 the FFmpeg developers built on Jul 24 2012 11:18:05 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid --disable-asm libavutil 50.27. 0 / 50.27. 0 libavcore 0. 9. 0 / 0. 9. 0 libavcodec 52.89. 0 / 52.89. 0 libavformat 52.78. 5 / 52.78. 5 libavdevice 52. 2. 2 / 52. 2. 2 libavfilter 1.39. 0 / 1.39. 0 libswscale 0.11. 0 / 0.11. 0 [video4linux2 @ 0x2b16c90] ioctl set time per frame(1/25) failed /dev/video0: Input/output error
DETAILED OUTPUT OF THE TESTCASES IN THE TABLE ABOVE
0.11.1 (--enable-lib4vl2)
Terratec Cinergy 400 TV
ffmpeg -y -t 300 -f video4linux2 -s vga -b:v 2000k -i /dev/video0
-target pal-dvd out-vga-2M-5min.mpg
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 20 2012 15:52:59 with gcc 4.7.0 20120507 (Red Hat
4.7.0-5)
configuration: --prefix=/usr/local --libdir=/usr/local/lib64
--shlibdir=/usr/local/lib64 --enable-nonfree --enable-runtime-cpudetect
--enable-libass --enable-libbluray --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libfaac --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libopenjpeg
--enable-libpulse --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-libv4l2 --enable-libvo-amrwbenc
--enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl
--enable-gpl --enable-version3 --disable-crystalhd
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
libv4l2: error dequeuing buf: Resource temporarily unavailable
(10000 times/s this Error)^C
Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1342800064.407901, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480,
-2147483 kb/s, 1.67 tbr, 1000k tbn, 1000k tbc
[buffer @ 0x3120c40] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:0/1
sws_param:flags=2
[buffersink @ 0x3120a60] No opaque field provided
[scale @ 0x3121300] w:640 h:480 fmt:yuv420p sar:0/1 -> w:720 h:576
fmt:yuv420p sar:0/1 flags:0x4
Output #0, dvd, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf54.6.100
Stream #0:0: Video: mpeg2video, yuv420p, 720x576, q=2-31, 6000 kb/s,
90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=
0.0kbits/s
video:0kB audio:0kB global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used)
Received signal 2: terminating.
0.11.1 (without --enable-libv4l2)
Terratec Cinergy 400 TV
ffmpeg -y -t 300 -f video4linux2 -s vga -b:v 2000k -i /dev/video0
-target pal-dvd out-vga-2M-5min.mpg
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 20 2012 18:21:19 with gcc 4.7.0 20120507 (Red Hat
4.7.0-5)
configuration: --prefix=/usr/local --libdir=/usr/local/lib64
--shlibdir=/usr/local/lib64 --enable-nonfree --enable-runtime-cpudetect
--enable-libass --enable-libbluray --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libfaac --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libopenjpeg
--enable-libpulse --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-libvo-amrwbenc --enable-libvpx
--enable-libx264 --enable-libxvid --enable-openssl --enable-gpl
--enable-version3 --disable-crystalhd
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
^CEstimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1342801330.121303, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480,
-2147483 kb/s, 1.67 tbr, 1000k tbn, 1000k tbc
[buffer @ 0x182aa60] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:0/1
sws_param:flags=2
[buffersink @ 0x182b300] No opaque field provided
[scale @ 0x1831a20] w:640 h:480 fmt:yuv420p sar:0/1 -> w:720 h:576
fmt:yuv420p sar:0/1 flags:0x4
Output #0, dvd, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf54.6.100
Stream #0:0: Video: mpeg2video, yuv420p, 720x576, q=2-31, 6000 kb/s,
90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=
0.0kbits/s
video:0kB audio:0kB global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used)
Received signal 2: terminating.
0.10.4. (--enable-libv4l2)
Terratec Cinergy 400 TV
ffmpeg -y -t 300 -f video4linux2 -s vga -b:v 2000k -i /dev/video0
-target pal-dvd out-vga-2M-5min.mpg
ffmpeg version 0.10.4 Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 13 2012 09:51:06 with gcc 4.7.0 20120507 (Red Hat
4.7.0-5)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64
--extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
--enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass
--enable-libcdio --enable-libcelt --enable-libdc1394
--disable-indev=jack --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-openal --enable-libopenjpeg
--enable-libpulse --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2
--enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-postproc --enable-pthreads --disable-static
--enable-shared --enable-gpl --disable-debug --disable-stripping
--shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
libv4l2: error dequeuing buf: Resource temporarily unavailable
(10000 times/s this Error)^C
Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1342801628.759741, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480,
-2147483 kb/s, 1.67 tbr, 1000k tbn, 1000k tbc
[buffer @ 0x1de0020] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:0/1
sws_param:
[scale @ 0x1de7d60] w:640 h:480 fmt:yuv420p -> w:720 h:576 fmt:yuv420p
flags:0x4
Output #0, dvd, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf53.32.100
Stream #0:0: Video: mpeg2video, yuv420p, 720x576, q=2-31, 6000 kb/s,
90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
Press [q] to stop, [?] for help
frame= 0 fps= 0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=
0.0kbits/s
video:0kB audio:0kB global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used)
Received signal 2: terminating.
0.9.2 (--enable-libv4l2)
Terratec Cinergy 400 TV
ffmpeg -y -t 300 -f video4linux2 -s vga -b:v 2000k -i /dev/video0 -target pal-dvd out-vga-2M-5min.mpg ffmpeg version 0.9.2, Copyright (c) 2000-2012 the FFmpeg developers built on Jul 20 2012 16:34:02 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-runtime-cpudetect --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl --enable-gpl --enable-version3 --disable-crystalhd libavutil 51. 32. 0 / 51. 32. 0 libavcodec 53. 42. 4 / 53. 42. 4 libavformat 53. 24. 2 / 53. 24. 2 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 53. 0 / 2. 53. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 libv4l2: error dequeuing buf: Resource temporarily unavailable (10000 times/s this Error)^C Estimating duration from bitrate, this may be inaccurate /dev/video0: could not find codec parameters
0.9.2 (without --enable-libv4l2)
Terratec Cinergy 400 TV
ffmpeg -y -t 300 -f video4linux2 -s vga -b:v 2000k -i /dev/video0 -target pal-dvd out-vga-2M-5min.mpg ffmpeg version 0.9.2, Copyright (c) 2000-2012 the FFmpeg developers built on Jul 20 2012 18:08:18 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-runtime-cpudetect --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-amrwbenc --enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl --enable-gpl --enable-version3 --disable-crystalhd libavutil 51. 32. 0 / 51. 32. 0 libavcodec 53. 42. 4 / 53. 42. 4 libavformat 53. 24. 2 / 53. 24. 2 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 53. 0 / 2. 53. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 ^C Estimating duration from bitrate, this may be inaccurate /dev/video0: could not find codec parameters Received signal 2: terminating.
0.8.12
Terratec Cinergy 400 TV
ffmpeg -y -t 300 -f video4linux2 -s vga -b 2000k -i /dev/video0 -target pal-dvd out-vga-2M-5min.mpg ffmpeg version 0.8.12, Copyright (c) 2000-2011 the FFmpeg developers built on Jul 20 2012 16:39:40 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-amrwbenc --enable-libvpx --enable-libx264 --enable-libxvid --enable-gpl --enable-version3 --disable-crystalhd libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 8. 0 / 53. 8. 0 libavformat 53. 5. 0 / 53. 5. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 ^C
0.7.13
Terratec Cinergy 400 TV
ffmpeg -y -t 300 -f video4linux2 -s vga -b 2000k -i /dev/video0 -target pal-dvd out-vga-2M-5min.mpg ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers built on Jul 20 2012 16:50:52 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-amrwbenc --enable-libvpx --enable-libx264 --enable-libxvid --enable-gpl --enable-version3 --disable-crystalhd libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 ^C
For comparison, here's the link to the thread on ffmpeg-media, where I found great help: http://ffmpeg.org/pipermail/ffmpeg-user/2012-July/008210.html
Change History
comment:2 Changed 11 months ago by ubitux
Just to make sure, can you try this hack with an upstream FFmpeg?
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 2808e13..0acd3da 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -694,7 +694,7 @@ static int v4l2_set_parameters(AVFormatContext *s1)
}
}
- if (framerate_q.num && framerate_q.den) {
+ if (0 && framerate_q.num && framerate_q.den) {
av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\n",
framerate_q.den, framerate_q.num);
tpf->numerator = framerate_q.den;
(Since according to your report 70f7736 looks faulty).
Also, could you post a complete command line and output with -debug 1 (with an up-to-date tree but without the hack above) so we can have more information on the issue?
comment:3 Changed 11 months ago by llarevo
I don't know how to do this. I tried:
cd ffmpeg git checkout 70f7736 gedit hack.patch
I copied your hack above and saved it in the file "hack.patch". After that, I did
patch -p0 < hack.patch can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c |index 2808e13..0acd3da 100644 |--- a/libavdevice/v4l2.c |+++ b/libavdevice/v4l2.c -------------------------- File to patch: ^C
Then I tried
patch -p1 < hack.patch patching file libavdevice/v4l2.c Hunk #1 FAILED at 694. 1 out of 1 hunk FAILED -- saving rejects to file libavdevice/v4l2.c.rej
Sorry - I have not really a clue what I'm doing there. I don't find the line
if (framerate_q.num && framerate_q.den) {
in the file "libavdevice/v4l2.c"
Can you give me a short advice how to "try this hack with an upstream FFmpeg"? What means upstream? Shall I try the hack with the most recent version? How can I get it with the git checkout command? If so, shall I configure with "--enable-libv4l2" or without?
Sorry, but this is the first time I deal with source code, so any advice is very appreciated.
Thanks a lot.
--
Felix
comment:4 Changed 11 months ago by cehoyos
Type "patch -p1" (and enter), then paste above code (from "diff" to ".den;" including the line break), and press Ctrl-D (twice), or save the code in a file and do patch -p1<file .
comment:5 Changed 11 months ago by llarevo
Thanks. I've two more questions.
- What version shall I checkout prior to apply the patch?
- Shall I then compile with "--enable-libv4l2" or without?
comment:6 Changed 11 months ago by llarevo
I tried
git tag
which gave me
N ffmpeg-0.6.3 n0.10 n0.10.1 n0.10.2 n0.10.3 n0.10.4 n0.11 n0.11.1 (...)
Then I tried
git checkout n0.11.1
and
patch -p1
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 2808e13..0acd3da 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -694,7 +694,7 @@ static int v4l2_set_parameters(AVFormatContext *s1)
}
}
- if (framerate_q.num && framerate_q.den) {
+ if (0 && framerate_q.num && framerate_q.den) {
av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\n",
framerate_q.den, framerate_q.num);
tpf->numerator = framerate_q.den;
I get
patching file libavdevice/v4l2.c Hunk #1 FAILED at 694. 1 out of 1 hunk FAILED -- saving rejects to file libavdevice/v4l2.c.rej
I took a look into libavdevice/v4l2.c. This file was obviously not updated by the checkout command.
I downloaded a release tarball. The patching resulted in
patch -p1
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 2808e13..0acd3da 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -694,7 +694,7 @@ static int v4l2_set_parameters(AVFormatContext *s1)
}
}
- if (framerate_q.num && framerate_q.den) {
+ if (0 && framerate_q.num && framerate_q.den) {
av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\n",
framerate_q.den, framerate_q.num);
tpf->numerator = framerate_q.den;patching file libavdevice/v4l2.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 707 with fuzz 1 (offset 13 lines).
I looked into the file an the if-statement in line 707 is now
if (0 && framerate_q.num && framerate_q.den) {
the resulting binary does not capture. The output is:
/usr/local/bin/ffmpeg -t 300 -f video4linux2 -s vga -r 25 -b 2000k -i /dev/video0 out-vga-2M-5min.mpg ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jul 29 2012 15:42:40 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid --disable-asm --disable-crystalhd libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Please use -b:a or -b:v, -b is ambiguous ^C
The output after canceling with ctrl+c was
Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1343569407.020395, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, -2147483 kb/s, 1.75 tbr, 1000k tbn, 1000k tbc
[buffer @ 0x2ce7030] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:flags=2
[buffersink @ 0x2ce7310] No opaque field provided
[mpeg1video @ 0x2ce2da0] MPEG1/2 does not support 5/1 fps
Output #0, mpeg, to 'out-vga-2M-5min.mpg':
Stream #0:0: Video: mpeg1video, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Received signal 2: terminating.
comment:7 follow-up: ↓ 8 Changed 11 months ago by llarevo
The output of the unpatched 0.11.1 with -debug 1 is
/usr/local/bin/ffmpeg -debug 1 -t 300 -f video4linux2 -s vga -r 25 -b 2000k -i /dev/video0 out-vga-2M-5min.mpg ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jul 29 2012 15:53:10 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid --disable-asm --disable-crystalhd libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Please use -b:a or -b:v, -b is ambiguous [video4linux2,v4l2 @ 0x2ecd1e0] [3]Capabilities: 5010015 [video4linux2,v4l2 @ 0x2ecd1e0] The V4L2 driver using the interlaced modeThe V4L2 driver set input_id: 0, input: Television [video4linux2,v4l2 @ 0x2ecd1e0] Setting time per frame to 1/25 [video4linux2,v4l2 @ 0x2ecd1e0] ioctl set time per frame(1/25) failed /dev/video0: Input/output error
The output of the patched 0.11.1 with -debug 1 is
/usr/local/bin/ffmpeg -debug 1 -t 300 -f video4linux2 -s vga -r 25 -b 2000k -i /dev/video0 out-vga-2M-5min.mpg
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 29 2012 15:57:16 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5)
configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid --disable-asm --disable-crystalhd
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Please use -b:a or -b:v, -b is ambiguous
[video4linux2,v4l2 @ 0x21311e0] [3]Capabilities: 5010015
[video4linux2,v4l2 @ 0x21311e0] The V4L2 driver using the interlaced modeThe V4L2 driver set input_id: 0, input: Television
^Cinterrupted
rfps: 1.000000 0.006400
Last message repeated 1 times
rfps: 1.083333 0.007511
Last message repeated 1 times
rfps: 1.166667 0.008711
Last message repeated 1 times
rfps: 1.250000 0.010000
Last message repeated 1 times
rfps: 1.333333 0.011378
Last message repeated 1 times
rfps: 1.416667 0.012844
Last message repeated 1 times
rfps: 1.500000 0.014400
Last message repeated 1 times
rfps: 1.583333 0.016044
Last message repeated 1 times
rfps: 1.833333 -4096.000000
Last message repeated 1 times
rfps: 1.916667 -2048.000000
Last message repeated 1 times
rfps: 2.083333 -2048.000000
Last message repeated 1 times
rfps: 2.166667 0.000000
Last message repeated 1 times
rfps: 2.333333 -4096.000000
Last message repeated 1 times
rfps: 2.416667 -12288.000000
Last message repeated 1 times
rfps: 2.500000 -4096.000000
Last message repeated 1 times
rfps: 2.583333 0.000000
Last message repeated 1 times
rfps: 2.666667 -4096.000000
Last message repeated 1 times
rfps: 3.000000 0.000000
Last message repeated 1 times
rfps: 3.083333 0.000000
Last message repeated 1 times
rfps: 3.166667 0.000000
Last message repeated 1 times
rfps: 3.250000 -4096.000000
Last message repeated 1 times
rfps: 3.416667 -4096.000000
Last message repeated 1 times
rfps: 3.500000 0.000000
Last message repeated 1 times
rfps: 3.583333 -4096.000000
Last message repeated 1 times
rfps: 3.750000 -4096.000000
Last message repeated 1 times
rfps: 3.916667 0.000000
Last message repeated 1 times
rfps: 4.000000 -6144.000000
Last message repeated 1 times
rfps: 4.083333 -4096.000000
Last message repeated 1 times
rfps: 4.166667 0.000000
Last message repeated 1 times
rfps: 4.250000 -2048.000000
Last message repeated 1 times
rfps: 4.333333 0.000000
Last message repeated 1 times
rfps: 4.416667 -4096.000000
Last message repeated 1 times
rfps: 4.500000 0.000000
Last message repeated 1 times
rfps: 4.750000 0.000000
Last message repeated 1 times
rfps: 4.833333 -49152.000000
Last message repeated 1 times
rfps: 5.000000 -16384.000000
Last message repeated 1 times
rfps: 5.083333 0.000000
Last message repeated 1 times
rfps: 5.166667 0.000000
Last message repeated 1 times
rfps: 5.250000 0.000000
Last message repeated 1 times
rfps: 5.333333 -16384.000000
Last message repeated 1 times
rfps: 5.416667 0.000000
Last message repeated 1 times
rfps: 5.583333 -8192.000000
Last message repeated 1 times
rfps: 5.750000 0.000000
Last message repeated 1 times
rfps: 5.916667 0.000000
Last message repeated 1 times
rfps: 6.000000 0.000000
rfps: 6.000000 -16384.000000
rfps: 6.083333 -16384.000000
Last message repeated 1 times
rfps: 6.166667 0.000000
Last message repeated 1 times
rfps: 6.250000 -32768.000000
Last message repeated 1 times
rfps: 6.333333 0.000000
Last message repeated 1 times
rfps: 6.500000 -16384.000000
Last message repeated 1 times
rfps: 6.750000 0.000000
Last message repeated 1 times
rfps: 6.833333 -16384.000000
Last message repeated 1 times
rfps: 7.000000 0.000000
Last message repeated 1 times
rfps: 7.166667 -16384.000000
Last message repeated 1 times
rfps: 7.250000 -8192.000000
Last message repeated 1 times
rfps: 7.416667 -8192.000000
Last message repeated 1 times
rfps: 7.500000 -16384.000000
Last message repeated 1 times
rfps: 7.833333 0.000000
Last message repeated 1 times
rfps: 8.083333 0.000000
Last message repeated 1 times
rfps: 8.166667 -32768.000000
Last message repeated 1 times
rfps: 8.250000 0.000000
Last message repeated 1 times
rfps: 8.333333 0.000000
Last message repeated 1 times
rfps: 8.416667 -65536.000000
Last message repeated 1 times
rfps: 8.750000 -32768.000000
Last message repeated 1 times
rfps: 8.833333 0.000000
Last message repeated 1 times
rfps: 9.000000 0.000000
Last message repeated 1 times
rfps: 9.250000 -32768.000000
Last message repeated 1 times
rfps: 9.416667 -65536.000000
Last message repeated 1 times
rfps: 9.500000 -32768.000000
Last message repeated 1 times
rfps: 9.833333 -65536.000000
Last message repeated 1 times
rfps: 9.916667 -32768.000000
Last message repeated 1 times
rfps: 10.000000 -32768.000000
Last message repeated 1 times
rfps: 10.166667 0.000000
Last message repeated 1 times
rfps: 10.333333 0.000000
Last message repeated 1 times
rfps: 10.583333 0.000000
Last message repeated 1 times
rfps: 10.666667 0.000000
Last message repeated 1 times
rfps: 10.750000 -32768.000000
Last message repeated 1 times
rfps: 10.833333 0.000000
Last message repeated 1 times
rfps: 10.916667 0.000000
Last message repeated 1 times
rfps: 11.166667 -32768.000000
Last message repeated 1 times
rfps: 11.250000 -32768.000000
Last message repeated 1 times
rfps: 11.416667 -32768.000000
Last message repeated 1 times
rfps: 11.500000 0.000000
Last message repeated 1 times
rfps: 11.583333 0.000000
Last message repeated 1 times
rfps: 11.750000 0.000000
Last message repeated 1 times
rfps: 11.833333 0.000000
Last message repeated 1 times
rfps: 12.000000 0.000000
rfps: 12.000000 -65536.000000
rfps: 12.083333 0.000000
Last message repeated 1 times
rfps: 12.166667 -65536.000000
Last message repeated 1 times
rfps: 12.333333 0.000000
Last message repeated 1 times
rfps: 12.500000 -131072.000000
Last message repeated 1 times
rfps: 12.583333 -65536.000000
Last message repeated 1 times
rfps: 12.666667 0.000000
Last message repeated 1 times
rfps: 12.916667 -65536.000000
Last message repeated 1 times
rfps: 13.000000 -65536.000000
Last message repeated 1 times
rfps: 13.083333 0.000000
Last message repeated 1 times
rfps: 13.416667 -131072.000000
Last message repeated 1 times
rfps: 13.500000 0.000000
Last message repeated 1 times
rfps: 13.666667 -65536.000000
Last message repeated 1 times
rfps: 13.750000 -65536.000000
Last message repeated 1 times
rfps: 13.916667 0.000000
Last message repeated 1 times
rfps: 14.000000 0.000000
Last message repeated 1 times
rfps: 14.083333 -131072.000000
Last message repeated 1 times
rfps: 14.250000 -131072.000000
Last message repeated 1 times
rfps: 14.333333 -65536.000000
Last message repeated 1 times
rfps: 14.416667 -65536.000000
Last message repeated 1 times
rfps: 14.500000 -131072.000000
Last message repeated 1 times
rfps: 14.583333 0.000000
Last message repeated 1 times
rfps: 14.833333 0.000000
Last message repeated 1 times
rfps: 14.916667 -131072.000000
Last message repeated 1 times
rfps: 15.000000 -65536.000000
Last message repeated 1 times
rfps: 15.083333 -65536.000000
Last message repeated 1 times
rfps: 15.166667 -131072.000000
Last message repeated 1 times
rfps: 15.250000 -65536.000000
Last message repeated 1 times
rfps: 15.333333 0.000000
Last message repeated 1 times
rfps: 15.416667 0.000000
Last message repeated 1 times
rfps: 15.500000 0.000000
Last message repeated 1 times
rfps: 15.583333 0.000000
Last message repeated 1 times
rfps: 15.666667 0.000000
Last message repeated 1 times
rfps: 15.916667 0.000000
Last message repeated 1 times
rfps: 16.166667 -65536.000000
Last message repeated 1 times
rfps: 16.250000 -65536.000000
Last message repeated 1 times
rfps: 16.333333 -65536.000000
Last message repeated 1 times
rfps: 16.416667 0.000000
Last message repeated 1 times
rfps: 16.500000 -65536.000000
Last message repeated 1 times
rfps: 16.666667 -131072.000000
Last message repeated 1 times
rfps: 16.750000 -65536.000000
Last message repeated 1 times
rfps: 16.833333 -131072.000000
Last message repeated 1 times
rfps: 17.083333 -196608.000000
Last message repeated 1 times
rfps: 17.166667 0.000000
Last message repeated 1 times
rfps: 17.250000 -131072.000000
Last message repeated 1 times
rfps: 17.500000 -65536.000000
Last message repeated 1 times
rfps: 17.666667 0.000000
Last message repeated 1 times
rfps: 17.750000 -131072.000000
Last message repeated 1 times
rfps: 17.916667 -131072.000000
Last message repeated 1 times
rfps: 18.000000 0.000000
Last message repeated 1 times
rfps: 18.083333 -131072.000000
Last message repeated 1 times
rfps: 18.500000 -131072.000000
Last message repeated 1 times
rfps: 18.583333 0.000000
Last message repeated 1 times
rfps: 18.750000 -131072.000000
Last message repeated 1 times
rfps: 18.833333 -262144.000000
Last message repeated 1 times
rfps: 18.916667 -131072.000000
Last message repeated 1 times
rfps: 19.000000 -131072.000000
Last message repeated 1 times
rfps: 19.083333 -131072.000000
Last message repeated 1 times
rfps: 19.250000 -262144.000000
Last message repeated 1 times
rfps: 19.583333 0.000000
Last message repeated 1 times
rfps: 19.666667 -262144.000000
Last message repeated 1 times
rfps: 19.750000 -131072.000000
Last message repeated 1 times
rfps: 19.833333 -131072.000000
Last message repeated 1 times
rfps: 19.916667 -131072.000000
Last message repeated 1 times
rfps: 20.000000 -131072.000000
Last message repeated 1 times
rfps: 20.250000 0.000000
Last message repeated 1 times
rfps: 20.333333 0.000000
Last message repeated 1 times
rfps: 20.416667 -393216.000000
Last message repeated 1 times
rfps: 20.583333 -131072.000000
Last message repeated 1 times
rfps: 20.666667 0.000000
Last message repeated 1 times
rfps: 20.750000 0.000000
Last message repeated 1 times
rfps: 21.083333 -131072.000000
Last message repeated 1 times
rfps: 21.166667 -131072.000000
Last message repeated 1 times
rfps: 21.333333 0.000000
Last message repeated 1 times
rfps: 21.750000 0.000000
Last message repeated 1 times
rfps: 21.833333 -131072.000000
Last message repeated 1 times
rfps: 22.000000 0.000000
Last message repeated 1 times
rfps: 22.250000 -131072.000000
Last message repeated 1 times
rfps: 22.333333 0.000000
Last message repeated 1 times
rfps: 22.416667 -262144.000000
Last message repeated 1 times
rfps: 22.500000 -131072.000000
Last message repeated 1 times
rfps: 22.583333 0.000000
Last message repeated 1 times
rfps: 22.750000 0.000000
Last message repeated 1 times
rfps: 22.833333 0.000000
Last message repeated 1 times
rfps: 23.083333 -262144.000000
Last message repeated 1 times
rfps: 23.166667 0.000000
Last message repeated 1 times
rfps: 23.250000 -131072.000000
Last message repeated 1 times
rfps: 23.416667 -131072.000000
Last message repeated 1 times
rfps: 23.500000 0.000000
Last message repeated 1 times
rfps: 23.583333 0.000000
Last message repeated 1 times
rfps: 23.750000 0.000000
Last message repeated 1 times
rfps: 23.833333 0.000000
Last message repeated 1 times
rfps: 24.000000 0.000000
rfps: 24.000000 -262144.000000
rfps: 24.083333 0.000000
Last message repeated 1 times
rfps: 24.166667 0.000000
Last message repeated 1 times
rfps: 24.250000 0.000000
Last message repeated 1 times
rfps: 24.333333 -262144.000000
Last message repeated 1 times
rfps: 24.416667 0.000000
Last message repeated 1 times
rfps: 24.583333 -262144.000000
Last message repeated 1 times
rfps: 24.666667 0.000000
Last message repeated 1 times
rfps: 24.916667 -524288.000000
Last message repeated 1 times
rfps: 25.000000 -524288.000000
Last message repeated 1 times
rfps: 25.166667 -262144.000000
Last message repeated 1 times
rfps: 25.333333 0.000000
Last message repeated 1 times
rfps: 25.416667 0.000000
Last message repeated 1 times
rfps: 25.583333 -262144.000000
Last message repeated 1 times
rfps: 25.750000 0.000000
Last message repeated 1 times
rfps: 25.833333 -262144.000000
Last message repeated 1 times
rfps: 25.916667 -262144.000000
Last message repeated 1 times
rfps: 26.000000 -262144.000000
Last message repeated 1 times
rfps: 26.083333 0.000000
Last message repeated 1 times
rfps: 26.166667 0.000000
Last message repeated 1 times
rfps: 26.250000 0.000000
Last message repeated 1 times
rfps: 26.416667 0.000000
Last message repeated 1 times
rfps: 26.583333 -262144.000000
Last message repeated 1 times
rfps: 26.833333 -524288.000000
Last message repeated 1 times
rfps: 26.916667 -262144.000000
Last message repeated 1 times
rfps: 27.000000 0.000000
Last message repeated 1 times
rfps: 27.250000 0.000000
Last message repeated 1 times
rfps: 27.416667 0.000000
Last message repeated 1 times
rfps: 27.500000 0.000000
Last message repeated 1 times
rfps: 27.583333 -262144.000000
Last message repeated 1 times
rfps: 27.750000 0.000000
Last message repeated 1 times
rfps: 27.833333 -262144.000000
Last message repeated 1 times
rfps: 27.916667 0.000000
Last message repeated 1 times
rfps: 28.083333 -262144.000000
Last message repeated 1 times
rfps: 28.166667 -524288.000000
Last message repeated 1 times
rfps: 28.250000 0.000000
Last message repeated 1 times
rfps: 28.500000 -524288.000000
Last message repeated 1 times
rfps: 28.666667 -262144.000000
Last message repeated 1 times
rfps: 28.750000 0.000000
Last message repeated 1 times
rfps: 28.833333 0.000000
Last message repeated 1 times
rfps: 29.083333 0.000000
Last message repeated 1 times
rfps: 29.166667 0.000000
Last message repeated 1 times
rfps: 29.333333 0.000000
Last message repeated 1 times
rfps: 29.416667 -524288.000000
Last message repeated 1 times
rfps: 29.750000 -262144.000000
Last message repeated 1 times
rfps: 29.833333 -262144.000000
Last message repeated 1 times
rfps: 30.166667 -262144.000000
Last message repeated 1 times
rfps: 30.250000 0.000000
Last message repeated 1 times
rfps: 30.333333 -262144.000000
Last message repeated 1 times
rfps: 30.500000 -262144.000000
Last message repeated 1 times
rfps: 30.583333 0.000000
Last message repeated 1 times
rfps: 30.666667 0.000000
Last message repeated 1 times
rfps: 30.750000 -786432.000000
Last message repeated 1 times
rfps: 30.833333 0.000000
Last message repeated 1 times
rfps: 30.916667 0.000000
Last message repeated 1 times
rfps: 31.000000 0.000000
Last message repeated 1 times
rfps: 31.083333 -262144.000000
Last message repeated 1 times
rfps: 31.166667 0.000000
Last message repeated 1 times
rfps: 31.250000 0.000000
Last message repeated 1 times
rfps: 31.333333 0.000000
Last message repeated 1 times
rfps: 31.416667 -524288.000000
Last message repeated 1 times
rfps: 31.583333 0.000000
Last message repeated 1 times
rfps: 31.833333 0.000000
Last message repeated 1 times
rfps: 31.916667 -262144.000000
Last message repeated 1 times
rfps: 32.250000 -262144.000000
Last message repeated 1 times
rfps: 32.333333 -262144.000000
Last message repeated 1 times
rfps: 32.416667 -262144.000000
Last message repeated 1 times
rfps: 32.500000 -262144.000000
Last message repeated 1 times
rfps: 32.666667 -262144.000000
Last message repeated 1 times
rfps: 32.833333 0.000000
Last message repeated 1 times
rfps: 32.916667 -262144.000000
Last message repeated 1 times
rfps: 33.000000 -262144.000000
Last message repeated 1 times
rfps: 33.083333 0.000000
Last message repeated 1 times
rfps: 33.333333 -524288.000000
Last message repeated 1 times
rfps: 33.416667 0.000000
Last message repeated 1 times
rfps: 33.500000 -262144.000000
Last message repeated 1 times
rfps: 33.666667 -786432.000000
Last message repeated 1 times
rfps: 33.750000 0.000000
Last message repeated 1 times
rfps: 34.083333 -262144.000000
Last message repeated 1 times
rfps: 34.166667 -786432.000000
Last message repeated 1 times
rfps: 34.250000 -262144.000000
Last message repeated 1 times
rfps: 34.500000 -262144.000000
Last message repeated 1 times
rfps: 34.583333 -786432.000000
Last message repeated 1 times
rfps: 34.666667 0.000000
Last message repeated 1 times
rfps: 34.916667 -524288.000000
Last message repeated 1 times
rfps: 35.000000 -524288.000000
Last message repeated 1 times
rfps: 35.333333 0.000000
Last message repeated 1 times
rfps: 35.416667 0.000000
Last message repeated 1 times
rfps: 35.833333 -524288.000000
Last message repeated 1 times
rfps: 35.916667 0.000000
Last message repeated 1 times
rfps: 36.000000 -524288.000000
Last message repeated 1 times
rfps: 36.083333 -524288.000000
Last message repeated 1 times
rfps: 36.166667 -786432.000000
Last message repeated 1 times
rfps: 36.250000 -262144.000000
Last message repeated 1 times
rfps: 36.416667 0.000000
Last message repeated 1 times
rfps: 36.583333 -524288.000000
Last message repeated 1 times
rfps: 36.666667 0.000000
Last message repeated 1 times
rfps: 36.750000 -524288.000000
Last message repeated 1 times
rfps: 36.916667 0.000000
Last message repeated 1 times
rfps: 37.000000 -524288.000000
Last message repeated 1 times
rfps: 37.166667 0.000000
Last message repeated 1 times
rfps: 37.416667 0.000000
Last message repeated 1 times
rfps: 37.500000 -524288.000000
Last message repeated 1 times
rfps: 37.583333 -524288.000000
Last message repeated 1 times
rfps: 37.666667 -1048576.000000
Last message repeated 1 times
rfps: 37.750000 0.000000
Last message repeated 1 times
rfps: 37.833333 -524288.000000
Last message repeated 1 times
rfps: 37.916667 0.000000
Last message repeated 1 times
rfps: 38.000000 -524288.000000
Last message repeated 1 times
rfps: 38.083333 -1048576.000000
Last message repeated 1 times
rfps: 38.166667 -524288.000000
Last message repeated 1 times
rfps: 38.500000 -1048576.000000
Last message repeated 1 times
rfps: 38.583333 -524288.000000
Last message repeated 1 times
rfps: 39.166667 0.000000
Last message repeated 1 times
rfps: 39.333333 -1048576.000000
Last message repeated 1 times
rfps: 39.416667 -524288.000000
Last message repeated 1 times
rfps: 39.500000 -524288.000000
Last message repeated 1 times
rfps: 39.666667 -524288.000000
Last message repeated 1 times
rfps: 39.750000 -1048576.000000
Last message repeated 1 times
rfps: 39.833333 -524288.000000
Last message repeated 1 times
rfps: 39.916667 0.000000
Last message repeated 1 times
rfps: 40.083333 -1048576.000000
Last message repeated 1 times
rfps: 40.250000 0.000000
Last message repeated 1 times
rfps: 40.500000 0.000000
Last message repeated 1 times
rfps: 40.583333 -524288.000000
Last message repeated 1 times
rfps: 40.666667 0.000000
Last message repeated 1 times
rfps: 40.916667 0.000000
Last message repeated 1 times
rfps: 41.000000 0.000000
Last message repeated 1 times
rfps: 41.083333 0.000000
Last message repeated 1 times
rfps: 41.166667 0.000000
Last message repeated 1 times
rfps: 41.250000 -1572864.000000
Last message repeated 1 times
rfps: 41.333333 -524288.000000
Last message repeated 1 times
rfps: 41.416667 -524288.000000
Last message repeated 1 times
rfps: 41.583333 -524288.000000
Last message repeated 1 times
rfps: 41.750000 -1048576.000000
Last message repeated 1 times
rfps: 42.000000 0.000000
Last message repeated 1 times
rfps: 42.166667 0.000000
Last message repeated 1 times
rfps: 42.333333 -524288.000000
Last message repeated 1 times
rfps: 42.666667 -524288.000000
Last message repeated 1 times
rfps: 42.750000 -524288.000000
Last message repeated 1 times
rfps: 42.916667 -1572864.000000
Last message repeated 1 times
rfps: 43.000000 0.000000
Last message repeated 1 times
rfps: 43.083333 -524288.000000
Last message repeated 1 times
rfps: 43.250000 -1048576.000000
Last message repeated 1 times
rfps: 43.416667 0.000000
Last message repeated 1 times
rfps: 43.500000 0.000000
Last message repeated 1 times
rfps: 43.666667 -524288.000000
Last message repeated 1 times
rfps: 43.750000 -524288.000000
Last message repeated 1 times
rfps: 44.000000 0.000000
Last message repeated 1 times
rfps: 44.083333 0.000000
Last message repeated 1 times
rfps: 44.250000 0.000000
Last message repeated 1 times
rfps: 44.416667 -1048576.000000
Last message repeated 1 times
rfps: 44.500000 -524288.000000
Last message repeated 1 times
rfps: 44.583333 0.000000
Last message repeated 1 times
rfps: 44.666667 0.000000
Last message repeated 1 times
rfps: 44.833333 -1048576.000000
Last message repeated 1 times
rfps: 44.916667 -524288.000000
Last message repeated 1 times
rfps: 45.000000 -524288.000000
Last message repeated 1 times
rfps: 45.166667 0.000000
Last message repeated 1 times
rfps: 45.250000 0.000000
Last message repeated 1 times
rfps: 45.416667 0.000000
Last message repeated 1 times
rfps: 45.500000 0.000000
Last message repeated 1 times
rfps: 45.583333 0.000000
Last message repeated 1 times
rfps: 45.666667 0.000000
Last message repeated 1 times
rfps: 45.750000 -524288.000000
Last message repeated 1 times
rfps: 46.166667 -1048576.000000
Last message repeated 1 times
rfps: 46.333333 0.000000
Last message repeated 1 times
rfps: 46.416667 0.000000
Last message repeated 1 times
rfps: 46.500000 0.000000
Last message repeated 1 times
rfps: 46.583333 -524288.000000
Last message repeated 1 times
rfps: 46.666667 0.000000
Last message repeated 1 times
rfps: 46.833333 -524288.000000
Last message repeated 1 times
rfps: 46.916667 -524288.000000
Last message repeated 1 times
rfps: 47.083333 -524288.000000
Last message repeated 1 times
rfps: 47.166667 0.000000
Last message repeated 1 times
rfps: 47.333333 0.000000
Last message repeated 1 times
rfps: 47.666667 0.000000
Last message repeated 1 times
rfps: 47.750000 -524288.000000
Last message repeated 1 times
rfps: 48.083333 -1572864.000000
Last message repeated 1 times
rfps: 48.166667 -524288.000000
Last message repeated 1 times
rfps: 48.250000 0.000000
Last message repeated 1 times
rfps: 48.333333 -524288.000000
Last message repeated 1 times
rfps: 48.500000 -1048576.000000
Last message repeated 1 times
rfps: 48.583333 0.000000
Last message repeated 1 times
rfps: 48.666667 0.000000
Last message repeated 1 times
rfps: 48.750000 0.000000
Last message repeated 1 times
rfps: 48.833333 -524288.000000
Last message repeated 1 times
rfps: 48.916667 -524288.000000
Last message repeated 1 times
rfps: 49.250000 -1048576.000000
Last message repeated 1 times
rfps: 49.333333 -524288.000000
Last message repeated 1 times
rfps: 49.500000 0.000000
Last message repeated 1 times
rfps: 49.583333 0.000000
Last message repeated 1 times
rfps: 49.750000 -1048576.000000
Last message repeated 1 times
rfps: 49.833333 -2097152.000000
Last message repeated 1 times
rfps: 50.000000 -2097152.000000
Last message repeated 1 times
rfps: 50.083333 -1048576.000000
Last message repeated 1 times
rfps: 50.250000 0.000000
Last message repeated 1 times
rfps: 50.333333 -1048576.000000
Last message repeated 1 times
rfps: 50.416667 0.000000
Last message repeated 1 times
rfps: 50.583333 0.000000
Last message repeated 1 times
rfps: 50.666667 0.000000
Last message repeated 1 times
rfps: 50.750000 -1048576.000000
Last message repeated 1 times
rfps: 50.833333 0.000000
Last message repeated 1 times
rfps: 51.083333 0.000000
Last message repeated 1 times
rfps: 51.166667 -1048576.000000
Last message repeated 1 times
rfps: 51.250000 0.000000
Last message repeated 1 times
rfps: 51.500000 0.000000
Last message repeated 1 times
rfps: 51.583333 -1048576.000000
Last message repeated 1 times
rfps: 51.666667 -1048576.000000
Last message repeated 1 times
rfps: 51.750000 -524288.000000
Last message repeated 1 times
rfps: 51.833333 -1048576.000000
Last message repeated 1 times
rfps: 51.916667 -1048576.000000
rfps: 51.916667 -1572864.000000
rfps: 52.000000 -1048576.000000
Last message repeated 1 times
rfps: 52.083333 -524288.000000
Last message repeated 1 times
rfps: 52.166667 0.000000
Last message repeated 1 times
rfps: 52.250000 0.000000
Last message repeated 1 times
rfps: 52.333333 0.000000
Last message repeated 1 times
rfps: 52.500000 0.000000
Last message repeated 1 times
rfps: 52.583333 0.000000
Last message repeated 1 times
rfps: 52.750000 -1048576.000000
Last message repeated 1 times
rfps: 52.833333 0.000000
Last message repeated 1 times
rfps: 52.916667 -2097152.000000
Last message repeated 1 times
rfps: 53.166667 -1048576.000000
Last message repeated 1 times
rfps: 53.250000 -1048576.000000
Last message repeated 1 times
rfps: 53.416667 -2097152.000000
Last message repeated 1 times
rfps: 53.500000 0.000000
Last message repeated 1 times
rfps: 53.583333 -1048576.000000
Last message repeated 1 times
rfps: 53.666667 -1048576.000000
Last message repeated 1 times
rfps: 53.833333 -1048576.000000
Last message repeated 1 times
rfps: 54.000000 0.000000
Last message repeated 1 times
rfps: 54.083333 -1048576.000000
Last message repeated 1 times
rfps: 54.500000 0.000000
Last message repeated 1 times
rfps: 54.583333 -1048576.000000
Last message repeated 1 times
rfps: 54.666667 -1048576.000000
Last message repeated 1 times
rfps: 54.750000 0.000000
Last message repeated 1 times
rfps: 54.833333 -1048576.000000
Last message repeated 1 times
rfps: 54.916667 0.000000
Last message repeated 1 times
rfps: 55.000000 -1048576.000000
Last message repeated 1 times
rfps: 55.083333 -1048576.000000
Last message repeated 1 times
rfps: 55.166667 0.000000
Last message repeated 1 times
rfps: 55.500000 0.000000
Last message repeated 1 times
rfps: 55.583333 0.000000
Last message repeated 1 times
rfps: 55.666667 0.000000
Last message repeated 1 times
rfps: 55.750000 -1048576.000000
Last message repeated 1 times
rfps: 55.833333 0.000000
Last message repeated 1 times
rfps: 55.916667 -1048576.000000
Last message repeated 1 times
rfps: 56.083333 0.000000
Last message repeated 1 times
rfps: 56.166667 -1048576.000000
Last message repeated 1 times
rfps: 56.333333 -2097152.000000
Last message repeated 1 times
rfps: 56.500000 0.000000
Last message repeated 1 times
rfps: 56.750000 -1048576.000000
Last message repeated 1 times
rfps: 56.916667 -1048576.000000
Last message repeated 1 times
rfps: 57.000000 -2097152.000000
Last message repeated 1 times
rfps: 57.083333 0.000000
Last message repeated 1 times
rfps: 57.250000 0.000000
Last message repeated 1 times
rfps: 57.333333 -1048576.000000
Last message repeated 1 times
rfps: 57.416667 0.000000
Last message repeated 1 times
rfps: 57.500000 0.000000
Last message repeated 1 times
rfps: 57.666667 0.000000
Last message repeated 1 times
rfps: 57.916667 -1048576.000000
Last message repeated 1 times
rfps: 58.083333 0.000000
Last message repeated 1 times
rfps: 58.166667 0.000000
Last message repeated 1 times
rfps: 58.250000 0.000000
Last message repeated 1 times
rfps: 58.333333 0.000000
Last message repeated 1 times
rfps: 58.416667 -1048576.000000
Last message repeated 1 times
rfps: 58.666667 0.000000
Last message repeated 1 times
rfps: 58.750000 -3145728.000000
Last message repeated 1 times
rfps: 58.833333 -2097152.000000
Last message repeated 1 times
rfps: 59.166667 0.000000
Last message repeated 1 times
rfps: 59.250000 0.000000
Last message repeated 1 times
rfps: 59.416667 -1048576.000000
Last message repeated 1 times
rfps: 59.500000 -2097152.000000
Last message repeated 1 times
rfps: 59.583333 0.000000
Last message repeated 1 times
rfps: 59.666667 0.000000
Last message repeated 1 times
rfps: 59.750000 -4194304.000000
Last message repeated 1 times
rfps: 59.833333 0.000000
Last message repeated 1 times
rfps: 59.916667 -1048576.000000
Last message repeated 1 times
[video4linux2,v4l2 @ 0x21311e0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1343570276.238836, bitrate: N/A
Stream #0:0, 8, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, -2147483 kb/s, 1.83 tbr, 1000k tbn, 1000k tbc
[buffer @ 0x2136010] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:flags=2
[buffersink @ 0x21362f0] No opaque field provided
[mpeg1video @ 0x2131df0] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg1video @ 0x2131df0] MPEG1/2 does not support 5/1 fps
Output #0, mpeg, to 'out-vga-2M-5min.mpg':
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/5, q=2-31, 200 kb/s, 90k tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Received signal 2: terminating.
comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed 11 months ago by ubitux
Replying to llarevo:
The output of the unpatched 0.11.1 with -debug 1 is
/usr/local/bin/ffmpeg -debug 1 -t 300 -f video4linux2 -s vga -r 25 -b 2000k -i /dev/video0 out-vga-2M-5min.mpg ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jul 29 2012 15:53:10 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid --disable-asm --disable-crystalhd libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Please use -b:a or -b:v, -b is ambiguous [video4linux2,v4l2 @ 0x2ecd1e0] [3]Capabilities: 5010015 [video4linux2,v4l2 @ 0x2ecd1e0] The V4L2 driver using the interlaced modeThe V4L2 driver set input_id: 0, input: Television [video4linux2,v4l2 @ 0x2ecd1e0] Setting time per frame to 1/25 [video4linux2,v4l2 @ 0x2ecd1e0] ioctl set time per frame(1/25) failed /dev/video0: Input/output error
That makes me wonder if one of your parameter isn't wrong: you specify -r 25 which might be not supported by your card. Can you make some tests with something simple such as:
./ffplay -f v4l2 -i /dev/video0
to see if it doesn't show anything? (for old version you might need to change v4l2 into video4linux2)
comment:9 in reply to: ↑ 8 Changed 11 months ago by llarevo
That makes me wonder if one of your parameter isn't wrong: you specify -r 25 which might be not supported by your card. Can you make some tests with something simple such as:
./ffplay -f v4l2 -i /dev/video0to see if it doesn't show anything? (for old version you might need to change v4l2 into video4linux2)
ffplay doesn't show anything and has to be killed by strg+c:
/usr/local/bin/ffplay -f v4l2 -i /dev/video0 ffplay version 0.11.1 Copyright (c) 2003-2012 the FFmpeg developers built on Jul 29 2012 15:57:16 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid --disable-asm --disable-crystalhd libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 ^C
But the suggested command doesn't work either. I tried it with ffmpeg 0.5.10, which is known to be working. Without success:
[llarevo@llarevo-desktop bin]$ ./ffplay -f v4l2 -i /dev/video0 FFplay version 0.5.10, Copyright (c) 2003-2012 Fabrice Bellard, et al. configuration: --prefix=/opt/ffmpeg-0.5.10 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 built on Aug 8 2012 19:52:08, gcc: 4.7.0 20120507 (Red Hat 4.7.0-5) Unknown input format: v4l2 [llarevo@llarevo-desktop bin]$ ./ffplay -f video4linux2 -i /dev/video0 FFplay version 0.5.10, Copyright (c) 2003-2012 Fabrice Bellard, et al. configuration: --prefix=/opt/ffmpeg-0.5.10 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 built on Aug 8 2012 19:52:08, gcc: 4.7.0 20120507 (Red Hat 4.7.0-5) ./ffplay: unrecognized option '-i' [llarevo@llarevo-desktop bin]$ ./ffplay -f video4linux2 FFplay version 0.5.10, Copyright (c) 2003-2012 Fabrice Bellard, et al. configuration: --prefix=/opt/ffmpeg-0.5.10 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 built on Aug 8 2012 19:52:08, gcc: 4.7.0 20120507 (Red Hat 4.7.0-5) An input file must be specified [llarevo@llarevo-desktop bin]$ man ffplay [llarevo@llarevo-desktop bin]$ ./ffplay -f video4linux2 /dev/video0 FFplay version 0.5.10, Copyright (c) 2003-2012 Fabrice Bellard, et al. configuration: --prefix=/opt/ffmpeg-0.5.10 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 built on Aug 8 2012 19:52:08, gcc: 4.7.0 20120507 (Red Hat 4.7.0-5) [video4linux2 @ 0x7f6d1c005230]Wrong size (0x0) /dev/video0: Error while opening file
With ffmpeg 0.5.10, I don't have any problems with capturing:
./ffmpeg -debug 1 -t 300 -f video4linux2 -s vga -r 25 -b 2000k -i /dev/video0 /home/tbastian/out-vga-2M-5min.mpg
FFmpeg version 0.5.10, Copyright (c) 2000-2012 Fabrice Bellard, et al.
configuration: --prefix=/opt/ffmpeg-0.5.10 --enable-nonfree --enable-gpl --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libxvid
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Aug 8 2012 19:52:08, gcc: 4.7.0 20120507 (Red Hat 4.7.0-5)
[video4linux2 @ 0x2e3a600][3]Capabilities: 5010015
[video4linux2 @ 0x2e3a600]The V4L2 driver set input_id: 0, input: Television
Input #0, video4linux2, from '/dev/video0':
Duration: N/A, start: 1344448553.258682, bitrate: 92160 kb/s
Stream #0.0, 1/1000000: Video: rawvideo, yuv420p, 640x480, 1/25, 92160 kb/s, 25 tbr, 1000k tbn, 25 tbc
Output #0, mpeg, to '/home/tbastian/out-vga-2M-5min.mpg':
Stream #0.0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 2000 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 327 fps= 25 q=5.4 Lsize= 3370kB time=13.04 bitrate=2117.1kbits/s
video:3352kB audio:0kB global headers:0kB muxing overhead 0.541767%
comment:10 Changed 10 months ago by llarevo
I forgot to mention here, that I made a short test with Ubuntu 10.04 LTS. This is shipped with ffmpeg 0.5.x and working fine ootb. When I download the 0.11.1-ffmpeg and build it as described above, I get the same error as in Fedora f17.
comment:11 Changed 8 months ago by cehoyos
- Keywords v4l2 regression added; video4linux, video4linux2, v4l2.c, regression, capture, analog, tv removed
- Priority changed from normal to important
- Version changed from unspecified to git-master
comment:12 Changed 5 months ago by holden
Hello,
could you please try the following command with latest git version and report back? Thanks
ffplay -loglevel debug -f video4linux2 -probesize 32 /dev/video0
comment:13 follow-up: ↓ 14 Changed 5 months ago by llarevo
ffplay -loglevel debug -f video4linux2 -probesize 32 /dev/video0 works very good. Its playing the channel previously tuned on the device with a perfect picture. The TV Card is tuned to a good quality signal.
ffplay -loglevel debug -f video4linux2 -probesize 32 /dev/video0
ffplay version N-49520-gb868275 Copyright (c) 2003-2013 the FFmpeg developers
built on Feb 1 2013 18:50:36 with gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2)
configuration: --prefix=/usr/local/
libavutil 52. 17.100 / 52. 17.100
libavcodec 54. 91.100 / 54. 91.100
libavformat 54. 61.104 / 54. 61.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 35.100 / 3. 35.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
[video4linux2,v4l2 @ 0x7fcce00008c0] fd:5 capabilities:5010015
[video4linux2,v4l2 @ 0x7fcce00008c0] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x7fcce00008c0] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x7fcce00008c0] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x7fcce00008c0] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x7fcce00008c0] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x7fcce00008c0] Current standard: PAL-BG, id: 7, frameperiod: 1/25
[video4linux2,v4l2 @ 0x7fcce00008c0] Probe buffer size limit of 32 bytes reached
[video4linux2,v4l2 @ 0x7fcce00008c0] Stream #0: not enough frames to estimate rate; consider increasing probesize
[video4linux2,v4l2 @ 0x7fcce00008c0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1359741406.842020, bitrate: 124416 kb/s
Stream #0:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576, 1/1000000, 124416 kb/s, 25 fps, 1000k tbr, 1000k tbn, 1000k tbc
Frame changed from size:0x0 to size:720x576
[buffer @ 0x7fccd8000e40] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0x7fccd8000e40] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x7fccd8000e40] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x7fccd8000e40] Setting entry with key 'pixel_aspect' to value '0/1'
[ffplay_buffer @ 0x7fccd8000d20] w:720 h:576 pixfmt:yuv420p tb:1/1000000 fr:0/1 sar:0/1 sws_param:
[crop @ 0x7fccd8002000] Setting 'w' to value 'floor(in_w/2)*2'
[crop @ 0x7fccd8002000] Setting 'h' to value 'floor(in_h/2)*2'
[ffplay_crop @ 0x7fccd8001ee0] w:720 h:576 sar:0/1 -> w:720 h:576 sar:0/1
1359741423.22 A-V: 0.000 fd= 0 aq= 0KB vq= 2430KB sq= 0B f=0/0 B f=0/0
ffmpeg -loglevel debug -t 300 -f v4l2 -s vga -r 25 -i /dev/video0 out-vga-2M-5min.mpg gives now different errors than reported previously:
ffmpeg -loglevel debug -t 300 -f v4l2 -s vga -r 25 -i /dev/video0 out-vga-2M-5min.mpg ffmpeg version N-49520-gb868275 Copyright (c) 2000-2013 the FFmpeg developers built on Feb 1 2013 18:50:36 with gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2) configuration: --prefix=/usr/local/ libavutil 52. 17.100 / 52. 17.100 libavcodec 54. 91.100 / 54. 91.100 libavformat 54. 61.104 / 54. 61.104 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 35.100 / 3. 35.100 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'. Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '300'. Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'. Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'. Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'. Reading option '-i' ... matched as input file with argument '/dev/video0'. Reading option 'out-vga-2M-5min.mpg' ... matched as output file. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set libav* logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input file /dev/video0. Applying option t (record or transcode "duration" seconds of audio/video) with argument 300. Applying option f (force format) with argument v4l2. Applying option s (set frame size (WxH or abbreviation)) with argument vga. Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25. Successfully parsed a group of options. Opening an input file: /dev/video0. [video4linux2,v4l2 @ 0x29031e0] fd:3 capabilities:5010015 [video4linux2,v4l2 @ 0x29031e0] Selecting input_channel: 0 [video4linux2,v4l2 @ 0x29031e0] input_channel: 0, input_name: Television [video4linux2,v4l2 @ 0x29031e0] The V4L2 driver is using the interlaced mode [video4linux2,v4l2 @ 0x29031e0] Current standard: PAL-BG, id: 7, frameperiod: 1/25 [video4linux2,v4l2 @ 0x29031e0] The driver does not allow to change time per frame
here nothing more happens. On Strg+C (twice) ffmpeg reports
^Cinterrupted
rfps: 1.000000 0.006400
rfps: 1.083333 0.007511
Last message repeated 1 times
rfps: 1.166667 0.008711
Last message repeated 1 times
rfps: 1.250000 0.010000
rfps: 1.333333 0.011378
rfps: 1.416667 0.012844
Last message repeated 1 times
rfps: 1.500000 0.014400
rfps: 1.583333 0.016044
rfps: 1.666667 0.017778
rfps: 1.750000 0.019600
Last message repeated 1 times
rfps: 23.250000 0.019602
Last message repeated 1 times
rfps: 23.333333 0.017780
rfps: 23.416667 0.016046
rfps: 23.500000 0.014402
rfps: 23.583333 0.012846
Last message repeated 1 times
rfps: 23.666667 0.011379
rfps: 23.750000 0.010001
rfps: 23.833333 0.008712
Last message repeated 1 times
rfps: 23.916667 0.007512
Last message repeated 1 times
rfps: 24.000000 0.006401
rfps: 24.083333 0.005379
rfps: 24.166667 0.004445
Last message repeated 1 times
rfps: 24.250000 0.003601
Last message repeated 1 times
rfps: 24.333333 0.002845
rfps: 24.416667 0.002178
Last message repeated 1 times
rfps: 24.500000 0.001601
Last message repeated 1 times
rfps: 24.583333 0.001112
Last message repeated 1 times
rfps: 24.666667 0.000712
rfps: 24.750000 0.000400
Last message repeated 1 times
rfps: 24.833333 0.000178
Last message repeated 1 times
rfps: 24.916667 0.000045
Last message repeated 1 times
rfps: 25.000000 0.000000
Last message repeated 1 times
rfps: 25.083333 0.000044
Last message repeated 1 times
rfps: 25.166667 0.000178
Last message repeated 1 times
rfps: 25.250000 0.000400
Last message repeated 1 times
rfps: 25.333333 0.000711
rfps: 25.416667 0.001111
Last message repeated 1 times
rfps: 25.500000 0.001599
Last message repeated 1 times
rfps: 25.583333 0.002177
Last message repeated 1 times
rfps: 25.666667 0.002844
rfps: 25.750000 0.003599
Last message repeated 1 times
rfps: 25.833333 0.004443
Last message repeated 1 times
rfps: 25.916667 0.005376
rfps: 26.000000 0.006399
rfps: 26.083333 0.007510
Last message repeated 1 times
rfps: 26.166667 0.008710
Last message repeated 1 times
rfps: 26.250000 0.009998
rfps: 26.333333 0.011376
rfps: 26.416667 0.012843
Last message repeated 1 times
rfps: 26.500000 0.014398
rfps: 26.583333 0.016042
rfps: 26.666667 0.017776
rfps: 26.750000 0.019598
Last message repeated 1 times
rfps: 48.250000 0.019604
Last message repeated 1 times
rfps: 48.333333 0.017782
rfps: 48.416667 0.016048
rfps: 48.500000 0.014404
rfps: 48.583333 0.012848
Last message repeated 1 times
rfps: 48.666667 0.011381
rfps: 48.750000 0.010003
rfps: 48.833333 0.008714
Last message repeated 1 times
rfps: 48.916667 0.007514
Last message repeated 1 times
rfps: 49.000000 0.006403
rfps: 49.083333 0.005380
rfps: 49.166667 0.004446
Last message repeated 1 times
rfps: 49.250000 0.003602
Last message repeated 1 times
rfps: 49.333333 0.002846
rfps: 49.416667 0.002179
rfps: 49.500000 0.001601
Last message repeated 1 times
rfps: 49.583333 0.001112
Last message repeated 1 times
rfps: 49.666667 0.000712
Last message repeated 1 times
rfps: 49.750000 0.000401
Last message repeated 1 times
rfps: 49.833333 0.000178
Last message repeated 1 times
rfps: 49.916667 0.000045
Last message repeated 1 times
rfps: 50.000000 0.000000
Last message repeated 1 times
rfps: 50.083333 0.000044
Last message repeated 1 times
rfps: 50.166667 0.000177
Last message repeated 1 times
rfps: 50.250000 0.000400
Last message repeated 1 times
rfps: 50.333333 0.000710
rfps: 50.416667 0.001110
Last message repeated 1 times
rfps: 50.500000 0.001599
Last message repeated 1 times
rfps: 50.583333 0.002176
Last message repeated 1 times
rfps: 50.666667 0.002843
rfps: 50.750000 0.003598
Last message repeated 1 times
rfps: 50.833333 0.004442
Last message repeated 1 times
rfps: 50.916667 0.005376
rfps: 51.000000 0.006397
rfps: 51.083333 0.007508
Last message repeated 1 times
rfps: 51.166667 0.008708
Last message repeated 1 times
rfps: 51.250000 0.009997
rfps: 51.333333 0.011374
rfps: 51.416667 0.012840
Last message repeated 1 times
rfps: 51.500000 0.014396
Last message repeated 1 times
rfps: 51.583333 0.016041
rfps: 51.666667 0.017773
rfps: 51.750000 0.019596
rfps: 23.976024 0.006712
Last message repeated 1 times
[video4linux2,v4l2 @ 0x29031e0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1359741727.399337, bitrate: 92160 kb/s
Stream #0:0, 8, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
-t is not an input option, keeping it for the next output; consider fixing your command line.
Parsing a group of options: output file out-vga-2M-5min.mpg.
Successfully parsed a group of options.
Opening an output file: out-vga-2M-5min.mpg.
File 'out-vga-2M-5min.mpg' already exists. Overwrite ? [y/N]
after choosing "y" ffmpeg reports the following
Successfully opened the file.
[buffer @ 0x2908f60] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x2908f60] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x2908f60] Setting entry with key 'time_base' to value '1/25'
[buffer @ 0x2908f60] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x2908f60] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x2908f60] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x29085c0] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[graph 0 input from stream 0:0 @ 0x29085c0] TB:0.040000 FRAME_RATE:25.000000 SAMPLE_RATE:nan
[mpeg1video @ 0x2904ac0] detected 8 logical cores
[mpeg1video @ 0x2904ac0] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x2904340] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf54.61.104
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Received signal 2: terminating.
Version 1.1.1 shows a slightly different behaviour:
ffmpeg -loglevel debug -t 300 -f v4l2 -s vga -r 25 -i /dev/video0 out-vga-2M-5min.mpg ffmpeg version 1.1.1 Copyright (c) 2000-2013 the FFmpeg developers built on Feb 1 2013 18:35:12 with gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2) configuration: --prefix=/usr/local libavutil 52. 13.100 / 52. 13.100 libavcodec 54. 86.100 / 54. 86.100 libavformat 54. 59.106 / 54. 59.106 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 32.100 / 3. 32.100 libswscale 2. 1.103 / 2. 1.103 libswresample 0. 17.102 / 0. 17.102 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'. Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '300'. Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'. Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'. Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'. Reading option '-i' ... matched as input file with argument '/dev/video0'. Reading option 'out-vga-2M-5min.mpg' ... matched as output file. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set libav* logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input file /dev/video0. Applying option t (record or transcode "duration" seconds of audio/video) with argument 300. Applying option f (force format) with argument v4l2. Applying option s (set frame size (WxH or abbreviation)) with argument vga. Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25. Successfully parsed a group of options. Opening an input file: /dev/video0. [video4linux2,v4l2 @ 0x1cf4960] [3]Capabilities: 5010015 [video4linux2,v4l2 @ 0x1cf4960] The V4L2 driver using the interlaced modeThe V4L2 driver set input_id: 0, input: Television [video4linux2,v4l2 @ 0x1cf4960] Setting time per frame to 1/25 [video4linux2,v4l2 @ 0x1cf4960] ioctl set time per frame(1/25) failed /dev/video0: Input/output error
Without the switch -r the behavior of 1.1.1 is similar to the latest GIT-Version:
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '300'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option 'out-vga-2M-5min.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 300.
Applying option f (force format) with argument v4l2.
Applying option s (set frame size (WxH or abbreviation)) with argument vga.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x159e860] [3]Capabilities: 5010015
[video4linux2,v4l2 @ 0x159e860] The V4L2 driver using the interlaced modeThe V4L2 driver set input_id: 0, input: Television
^Cinterrupted
rfps: 1.000000 0.006400
rfps: 1.083333 0.007511
rfps: 1.166667 0.008711
Last message repeated 1 times
rfps: 1.250000 0.010000
rfps: 1.333333 0.011378
rfps: 1.416667 0.012844
Last message repeated 1 times
rfps: 1.500000 0.014400
rfps: 1.583333 0.016044
rfps: 1.666667 0.017778
Last message repeated 1 times
rfps: 1.750000 0.019600
rfps: 23.250000 0.019601
Last message repeated 1 times
rfps: 23.333333 0.017779
rfps: 23.416667 0.016045
rfps: 23.500000 0.014401
Last message repeated 1 times
rfps: 23.583333 0.012845
rfps: 23.666667 0.011379
rfps: 23.750000 0.010001
Last message repeated 1 times
rfps: 23.833333 0.008712
Last message repeated 1 times
rfps: 23.916667 0.007512
rfps: 24.000000 0.006401
Last message repeated 1 times
rfps: 24.083333 0.005378
Last message repeated 1 times
rfps: 24.166667 0.004445
rfps: 24.250000 0.003600
Last message repeated 1 times
rfps: 24.333333 0.002845
Last message repeated 1 times
rfps: 24.416667 0.002178
rfps: 24.500000 0.001600
Last message repeated 1 times
rfps: 24.583333 0.001111
Last message repeated 1 times
rfps: 24.666667 0.000711
Last message repeated 1 times
rfps: 24.750000 0.000400
Last message repeated 1 times
rfps: 24.833333 0.000178
Last message repeated 1 times
rfps: 24.916667 0.000044
Last message repeated 1 times
rfps: 25.000000 0.000000
Last message repeated 1 times
rfps: 25.083333 0.000044
Last message repeated 1 times
rfps: 25.166667 0.000178
Last message repeated 1 times
rfps: 25.250000 0.000400
Last message repeated 1 times
rfps: 25.333333 0.000711
Last message repeated 1 times
rfps: 25.416667 0.001111
Last message repeated 1 times
rfps: 25.500000 0.001600
rfps: 25.583333 0.002177
Last message repeated 1 times
rfps: 25.666667 0.002844
Last message repeated 1 times
rfps: 25.750000 0.003599
rfps: 25.833333 0.004444
Last message repeated 1 times
rfps: 25.916667 0.005378
Last message repeated 1 times
rfps: 26.000000 0.006399
rfps: 26.083333 0.007510
Last message repeated 1 times
rfps: 26.166667 0.008710
Last message repeated 1 times
rfps: 26.250000 0.009999
rfps: 26.333333 0.011376
rfps: 26.416667 0.012844
Last message repeated 1 times
rfps: 26.500000 0.014399
rfps: 26.583333 0.016044
rfps: 26.666667 0.017776
Last message repeated 1 times
rfps: 26.750000 0.019599
rfps: 48.250000 0.019602
rfps: 48.333333 0.017780
rfps: 48.416667 0.016047
rfps: 48.500000 0.014402
Last message repeated 1 times
rfps: 48.583333 0.012846
rfps: 48.666667 0.011380
rfps: 48.750000 0.010002
Last message repeated 1 times
rfps: 48.833333 0.008713
rfps: 48.916667 0.007513
rfps: 49.000000 0.006402
Last message repeated 1 times
rfps: 49.083333 0.005379
rfps: 49.166667 0.004446
rfps: 49.250000 0.003601
Last message repeated 1 times
rfps: 49.333333 0.002845
Last message repeated 1 times
rfps: 49.416667 0.002179
rfps: 49.500000 0.001601
Last message repeated 1 times
rfps: 49.583333 0.001112
Last message repeated 1 times
rfps: 49.666667 0.000712
rfps: 49.750000 0.000400
Last message repeated 1 times
rfps: 49.833333 0.000178
Last message repeated 1 times
rfps: 49.916667 0.000045
Last message repeated 1 times
rfps: 50.000000 0.000000
Last message repeated 1 times
rfps: 50.083333 0.000044
Last message repeated 1 times
rfps: 50.166667 0.000178
rfps: 50.250000 0.000400
Last message repeated 1 times
rfps: 50.333333 0.000711
Last message repeated 1 times
rfps: 50.416667 0.001111
rfps: 50.500000 0.001599
Last message repeated 1 times
rfps: 50.583333 0.002177
Last message repeated 1 times
rfps: 50.666667 0.002843
rfps: 50.750000 0.003599
Last message repeated 1 times
rfps: 50.833333 0.004443
Last message repeated 1 times
rfps: 50.916667 0.005376
rfps: 51.000000 0.006398
rfps: 51.083333 0.007510
Last message repeated 1 times
rfps: 51.166667 0.008710
rfps: 51.250000 0.009999
rfps: 51.333333 0.011376
Last message repeated 1 times
rfps: 51.416667 0.012843
rfps: 51.500000 0.014398
rfps: 51.583333 0.016043
Last message repeated 1 times
rfps: 51.666667 0.017776
rfps: 51.750000 0.019598
rfps: 23.976024 0.006711
Last message repeated 1 times
[video4linux2,v4l2 @ 0x159e860] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1359742077.916414, bitrate: N/A
Stream #0:0, 8, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, -2147483 kb/s, 25 tbr, 1000k tbn, 1000k tbc
Successfully openened the file.
-t is not an input option, keeping it for the next output; consider fixing your command line.
Parsing a group of options: output file out-vga-2M-5min.mpg.
Successfully parsed a group of options.
Opening an output file: out-vga-2M-5min.mpg.
File 'out-vga-2M-5min.mpg' already exists. Overwrite ? [y/N] y
Successfully openened the file.
[buffer @ 0x15a4c80] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x15a4c80] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x15a4c80] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x15a4c80] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x15a4c80] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x15a4c80] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x15a4b80] w:640 h:480 pixfmt:yuv420p tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[mpeg1video @ 0x159ff20] detected 8 logical cores
[mpeg1video @ 0x159ff20] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x159f7a0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf54.59.106
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Received signal 2: terminating.
comment:14 in reply to: ↑ 13 Changed 5 months ago by cehoyos
Replying to llarevo:
ffmpeg -loglevel debug -t 300 -f v4l2 -s vga -r 25 -i /dev/video0 out-vga-2M-5min.mpg
Does it work without "-r 25"?
Does ffplay work with "-r 25"?
Please (re)move -t 300 - it (unfortunately) does not do what you (and I) hope.
comment:15 Changed 4 months ago by holden
- Analyzed by developer set
- Reproduced by developer set
To llarevo: thanks for testing, I believe I know what causes this bug and I have just posted a patch on ffmpeg-devel mailing list for discussion. As Carl suggested, please do not use "-t 300". Also using "-r 25" or not will not make any difference since you are capturing from a TV card using the PAL standard for which the framerate is fixed at 25fps and cannot be changed (you will only get a warning).
comment:16 Changed 4 months ago by llarevo
All requested testcases were broken with the current git, except the ffplay commands without -r 25. In other words: ffmpeg doesn't work neither with or without -r 25, while ffplay does work only without -r 25.
In Detail:
1. compiled without --enable-libv4l2
1.1 ffmpeg -loglevel debug -f v4l2 -s vga -r 25 -i /dev/video0 out-vga-2M-5min.mpg: BROKEN
ffmpeg version N-49795-g478fc7f Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 10 2013 19:25:16 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.102 / 54. 91.102
libavformat 54. 62.100 / 54. 62.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option 'out-vga-2M-5min.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option s (set frame size (WxH or abbreviation)) with argument vga.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x2b101c0] fd:3 capabilities:5010015
[video4linux2,v4l2 @ 0x2b101c0] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x2b101c0] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x2b101c0] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x2b101c0] Current standard: PAL, id: 255, frameperiod: 1/25
[video4linux2,v4l2 @ 0x2b101c0] The driver does not allow to change time per frame
^Cinterrupted
rfps: 1.000000 0.006400
rfps: 1.083333 0.007511
Last message repeated 1 times
rfps: 1.166667 0.008711
Last message repeated 1 times
rfps: 1.250000 0.010000
=====>(several dozends of lines like this)<=====
rfps: 51.583333 0.016063
rfps: 51.666667 0.017798
rfps: 51.750000 0.019619
rfps: 23.976024 0.006705
Last message repeated 1 times
[video4linux2,v4l2 @ 0x2b101c0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1360520755.820252, bitrate: 92160 kb/s
Stream #0:0, 8, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out-vga-2M-5min.mpg.
Successfully parsed a group of options.
Opening an output file: out-vga-2M-5min.mpg.
Successfully opened the file.
[buffer @ 0x2b16040] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x2b16040] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x2b16040] Setting entry with key 'time_base' to value '1/25'
[buffer @ 0x2b16040] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x2b16040] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x2b16040] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x2b10c80] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[graph 0 input from stream 0:0 @ 0x2b10c80] TB:0.040000 FRAME_RATE:25.000000 SAMPLE_RATE:nan
[mpeg1video @ 0x2b11b80] detected 4 logical cores
[mpeg1video @ 0x2b11b80] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x2b11400] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf54.62.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Received signal 2: terminating.
1.2 ffmpeg -loglevel debug -f v4l2 -s vga -i /dev/video0 out-vga-2M-5min.mpg: BROKEN
ffmpeg -loglevel debug -f v4l2 -s vga -i /dev/video0 out-vga-2M-5min.mpg
ffmpeg version N-49795-g478fc7f Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 10 2013 19:25:16 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.102 / 54. 91.102
libavformat 54. 62.100 / 54. 62.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option 'out-vga-2M-5min.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option s (set frame size (WxH or abbreviation)) with argument vga.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x222d0e0] fd:3 capabilities:5010015
[video4linux2,v4l2 @ 0x222d0e0] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x222d0e0] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x222d0e0] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x222d0e0] Current standard: PAL, id: 255, frameperiod: 1/25
^Cinterrupted <========================Strg+c here
rfps: 1.000000 0.006400
Last message repeated 1 times
rfps: 1.083333 0.007511
Last message repeated 1 times
rfps: 1.166667 0.008711
rfps: 1.250000 0.010000
rfps: 1.333333 0.011378
rfps: 1.416667 0.012845
Last message repeated 1 times
rfps: 1.500000 0.014400
====================lots more of this garbage===================
rfps: 51.416667 0.012857
rfps: 51.500000 0.014413
rfps: 51.583333 0.016057
rfps: 51.666667 0.017792
rfps: 51.750000 0.019614
Last message repeated 1 times
rfps: 23.976024 0.006706
[video4linux2,v4l2 @ 0x222d0e0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1360520929.062198, bitrate: 92160 kb/s
Stream #0:0, 8, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out-vga-2M-5min.mpg.
Successfully parsed a group of options.
Opening an output file: out-vga-2M-5min.mpg.
File 'out-vga-2M-5min.mpg' already exists. Overwrite ? [y/N] y
Successfully opened the file.
[buffer @ 0x2232ec0] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x2232ec0] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x2232ec0] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x2232ec0] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x2232ec0] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x2232ec0] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x2232500] w:640 h:480 pixfmt:yuv420p tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[mpeg1video @ 0x222e800] detected 4 logical cores
[mpeg1video @ 0x222e800] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x222e080] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf54.62.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Received signal 2: terminating.
1.3 ffplay -loglevel debug -f video4linux2 -r 25 -probesize 32 /dev/video0: BROKEN
ffplay version N-49795-g478fc7f Copyright (c) 2003-2013 the FFmpeg developers built on Feb 10 2013 19:25:16 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8) configuration: --prefix=/usr/local libavutil 52. 17.101 / 52. 17.101 libavcodec 54. 91.102 / 54. 91.102 libavformat 54. 62.100 / 54. 62.100 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 37.101 / 3. 37.101 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 Failed to set value '25' for option 'r'
1.4 ffplay -loglevel debug -f video4linux2 -probesize 32 /dev/video0: GOOD
ffplay version N-49795-g478fc7f Copyright (c) 2003-2013 the FFmpeg developers
built on Feb 10 2013 19:25:16 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.102 / 54. 91.102
libavformat 54. 62.100 / 54. 62.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
[video4linux2,v4l2 @ 0x7f643c000940] fd:5 capabilities:5010015
[video4linux2,v4l2 @ 0x7f643c000940] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x7f643c000940] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x7f643c000940] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x7f643c000940] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x7f643c000940] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x7f643c000940] Current standard: PAL, id: 255, frameperiod: 1/25
[video4linux2,v4l2 @ 0x7f643c000940] Probe buffer size limit of 32 bytes reached
[video4linux2,v4l2 @ 0x7f643c000940] Stream #0: not enough frames to estimate rate; consider increasing probesize
[video4linux2,v4l2 @ 0x7f643c000940] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1360521113.544285, bitrate: 124416 kb/s
Stream #0:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576, 1/1000000, 124416 kb/s, 25 fps, 1000k tbr, 1000k tbn, 1000k tbc
Video frame changed from size:0x0 format:none serial:-1 to size:720x576 format:yuv420p serial:1
[buffer @ 0x7f6434000e40] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0x7f6434000e40] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x7f6434000e40] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x7f6434000e40] Setting entry with key 'pixel_aspect' to value '0/1'
[ffplay_buffer @ 0x7f6434000d20] w:720 h:576 pixfmt:yuv420p tb:1/1000000 fr:0/1 sar:0/1 sws_param:
[crop @ 0x7f6434002000] Setting 'w' to value 'floor(in_w/2)*2'
[crop @ 0x7f6434002000] Setting 'h' to value 'floor(in_h/2)*2'
[ffplay_crop @ 0x7f6434001ee0] w:720 h:576 sar:0/1 -> w:720 h:576 sar:0/1
-9223372036854775808.00 A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/-9223372036854775808.00 A-V: 0.000 fd= 0 aq= 0KB vq= 3038KB sq= 0B f=0/1360521117.45 A-V: 0.000 fd= 0 aq= 0KB vq= 2430KB sq= 0B f=0/0
2. compiled with --enable-libv4l2
2.1 ffmpeg -loglevel debug -f v4l2 -s vga -r 25 -i /dev/video0 out-vga-2M-5min.mpg: BROKEN
libv4l2: error dequeuing buf: Resource temporarily unavailable
=================lots more of this garbage===================
libv4l2: error dequeuing buf: Resource temporarily unavailable
libv4l2: error dequeuing buf: Resource temporarily unavailable
libv4l2: error dequeuing buf: Resource temporarily unavailable
libv4l2: error dequeuing buf: Resource temporarily unavailable
libv4l2: error dequeuing buf: Resource temporarily unavailable^C <=============strg+c
interrupted
rfps: 1.000000 0.006400
Last message repeated 1 times
rfps: 1.083333 0.007511
=================lots more of this garbage===================
rfps: 51.666667 0.017794
Last message repeated 1 times
rfps: 51.750000 0.019617
rfps: 23.976024 0.006706
Last message repeated 1 times
[video4linux2,v4l2 @ 0x289c1c0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1360521529.548964, bitrate: 92160 kb/s
Stream #0:0, 8, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out-vga-2M-5min.mpg.
Successfully parsed a group of options.
Opening an output file: out-vga-2M-5min.mpg.
File 'out-vga-2M-5min.mpg' already exists. Overwrite ? [y/N] y
Successfully opened the file.
[buffer @ 0x28a2040] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x28a2040] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x28a2040] Setting entry with key 'time_base' to value '1/25'
[buffer @ 0x28a2040] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x28a2040] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x28a2040] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x289cc80] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[graph 0 input from stream 0:0 @ 0x289cc80] TB:0.040000 FRAME_RATE:25.000000 SAMPLE_RATE:nan
[mpeg1video @ 0x289db80] detected 4 logical cores
[mpeg1video @ 0x289db80] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x289d400] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf54.62.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Received signal 2: terminating.
2.2 ffmpeg -loglevel debug -f v4l2 -s vga -i /dev/video0 out-vga-2M-5min.mpg: BROKEN
libv4l2: error dequeuing buf: Resource temporarily unavailable
==============================much more of this garbage=================
libv4l2: error dequeuing buf: Resource temporarily unavailable
libv4l2: error dequeuing buf: Resource temporarily unavailable
libv4l2: error dequeuing buf: Resource temporarily unavailable
^Clibv4l2: error dequeuing buf: Resource temporarily unavailable
^Cinterrupted <=============================strg+c
rfps: 1.000000 0.006401
Last message repeated 1 times
rfps: 1.083333 0.007513
Last message repeated 1 times
==============================much more of this garbage=================
rfps: 23.976024 0.006680
Last message repeated 1 times
[video4linux2,v4l2 @ 0x327e0e0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1360521780.631799, bitrate: 92160 kb/s
Stream #0:0, 8, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out-vga-2M-5min.mpg.
Successfully parsed a group of options.
Opening an output file: out-vga-2M-5min.mpg.
File 'out-vga-2M-5min.mpg' already exists. Overwrite ? [y/N] y
Successfully opened the file.
[buffer @ 0x32840a0] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x32840a0] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x32840a0] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x32840a0] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x32840a0] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x32840a0] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x3283240] w:640 h:480 pixfmt:yuv420p tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[mpeg1video @ 0x327f8c0] detected 4 logical cores
[mpeg1video @ 0x327f8c0] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x327f060] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out-vga-2M-5min.mpg':
Metadata:
encoder : Lavf54.62.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Received signal 2: terminating.
2.3 ffplay -loglevel debug -f v4l2 -r 25 -probesize 32 /dev/video0: BROKEN
ffplay version N-49795-g478fc7f Copyright (c) 2003-2013 the FFmpeg developers built on Feb 10 2013 19:36:45 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8) configuration: --prefix=/usr/local --enable-libv4l2 libavutil 52. 17.101 / 52. 17.101 libavcodec 54. 91.102 / 54. 91.102 libavformat 54. 62.100 / 54. 62.100 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 37.101 / 3. 37.101 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 Failed to set value '25' for option 'r'
2.4 ffplay -loglevel debug -f v4l2 -probesize 32 /dev/video0: GOOD
ffplay version N-49795-g478fc7f Copyright (c) 2003-2013 the FFmpeg developers
built on Feb 10 2013 19:36:45 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local --enable-libv4l2
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.102 / 54. 91.102
libavformat 54. 62.100 / 54. 62.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
[video4linux2,v4l2 @ 0x7f3dc8000940] fd:5 capabilities:5010015
[video4linux2,v4l2 @ 0x7f3dc8000940] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x7f3dc8000940] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x7f3dc8000940] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x7f3dc8000940] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x7f3dc8000940] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x7f3dc8000940] Current standard: PAL, id: 255, frameperiod: 1/25
[video4linux2,v4l2 @ 0x7f3dc8000940] Probe buffer size limit of 32 bytes reached
[video4linux2,v4l2 @ 0x7f3dc8000940] Stream #0: not enough frames to estimate rate; consider increasing probesize
[video4linux2,v4l2 @ 0x7f3dc8000940] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1360522048.474854, bitrate: 124416 kb/s
Stream #0:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576, 1/1000000, 124416 kb/s, 25 fps, 1000k tbr, 1000k tbn, 1000k tbc
Video frame changed from size:0x0 format:none serial:-1 to size:720x576 format:yuv420p serial:1
[buffer @ 0x7f3dc0000e40] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0x7f3dc0000e40] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x7f3dc0000e40] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x7f3dc0000e40] Setting entry with key 'pixel_aspect' to value '0/1'
[ffplay_buffer @ 0x7f3dc0000d20] w:720 h:576 pixfmt:yuv420p tb:1/1000000 fr:0/1 sar:0/1 sws_param:
[crop @ 0x7f3dc0002000] Setting 'w' to value 'floor(in_w/2)*2'
[crop @ 0x7f3dc0002000] Setting 'h' to value 'floor(in_h/2)*2'
[ffplay_crop @ 0x7f3dc0001ee0] w:720 h:576 sar:0/1 -> w:720 h:576 sar:0/1
^C[tbastian@tbastian-server Downloads]$ 0KB vq= 3038KB sq= 0B f=0/0 B f=0/0
comment:17 Changed 4 months ago by cehoyos
- Status changed from open to closed
- Resolution set to fixed
Fixed by Giorgio Vazzana, please test current git head!
comment:18 follow-up: ↓ 19 Changed 4 months ago by holden
Thanks Carl.
I only wanted to add that if llarevo wants to test again with latest git head, the correct command to try is not:
ffmpeg -loglevel debug -f v4l2 -s vga -r 25 -i /dev/video0 out-vga-2M-5min.mpg
but:
ffmpeg -loglevel debug -f v4l2 -video_size vga -framerate 25 -i /dev/video0 out-vga-2M-5min.mpg
Options '-s' and '-r' are not valid options for v4l2 input device. To see the list of options please go to: http://ffmpeg.org/ffmpeg-devices.html#video4linux2_002c-v4l2
Also, as I said earlier, using '-framerate 25' or not should not make any difference, since the framerate is fixed by a particular standard (like PAL or NTSC) and cannot be changed usually.
comment:19 in reply to: ↑ 18 Changed 4 months ago by cehoyos
Replying to holden:
Options '-s' and '-r' are not valid options for v4l2 input device.
-s works fine here...
comment:20 Changed 4 months ago by llarevo
ffmpeg compiled without --enable-lib4vl2: OK
ffmpeg -loglevel debug -f v4l2 -video_size vga -framerate 25 -i /dev/video0 out-vga-2M-5min.mpg
and
ffmpeg -loglevel debug -f v4l2 -s vga -framerate 25 -i /dev/video0 out-vga-2M-5min.mpg
All are working fine now :-)
ffmpeg compiled with --enable-lib4vl2: Still faulty
But there is still a problem using a ffmpeg compiled with --enable-libv4l2. Lots of errors are beeing generated while capturing:
ffmpeg -f video4linux2 -i /dev/video0 -flags +ilme+ildct -aspect 4/3 -target pal-dvd -y test.mpeg ffmpeg version N-50436-g1d5b35c Copyright (c) 2000-2013 the FFmpeg developers built on Mar 2 2013 19:45:45 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8) configuration: --prefix=/usr/local --enable-ffplay --enable-libv4l2 libavutil 52. 17.103 / 52. 17.103 libavcodec 54. 92.100 / 54. 92.100 libavformat 54. 63.102 / 54. 63.102 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 41.100 / 3. 41.100 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 ...(some lines I don't know)... libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailablerate=7253.3kbits/s libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailablerate=6826.7kbits/s libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable libv4l2: error dequeuing buf: Resource temporarily unavailable (...)
But the resulting video seems OK after a very quick view.
comment:21 Changed 4 months ago by llarevo
Further tests show, that it's not possible to capture audio (i'm not familiar with ffmpeg, so i'm unsure if I did everything right)
Both tests create mpegs with a sound stream, but this is completely silent.
Capturing with mencoder and these settings works without any problems, I also have sound when watching tv with mplayer.
################## Prererquisits ######################
### setting up v4l ###
v4lctl -c /dev/video0 setchannel E6 v4lctl -c /dev/video0 setnorm PAL-BG v4lctl -c /dev/video0 setinput 0 v4lctl -c /dev/video0 setattr mute off v4lctl -c /dev/video0 volume 15 v4lctl -c /dev/video0 setattr automute off v4lctl -c /dev/video0 setattr "audio mode" stereo v4lctl -c /dev/video0 show norm: PAL-BG input: Television audio mode: stereo bright: 128 contrast: 68 color: 64 hue: 0 volume: 15 mute: off Mirror: off Invert: off y offset odd field: 0 y offset even field: 0 automute: off
### looking for the right hardware ###
arecord -l **** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 2: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: SAA7134 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM] Subdevices: 1/1 Subdevice #0: subdevice #0
### look for soundcard controls ###
amixer -c1 controls numid=2,iface=MIXER,name='Line Volume',index=1 numid=3,iface=MIXER,name='Line Volume',index=2 numid=5,iface=MIXER,name='Line Capture Switch',index=1 numid=6,iface=MIXER,name='Line Capture Switch',index=2 numid=1,iface=MIXER,name='Video Volume' numid=4,iface=MIXER,name='Video Capture Switch'
### set soundcard unmute and 100 % ###
amixer -c 1 sset Video,0 100%,100% unmute cap Simple mixer control 'Video',0 Capabilities: volume cswitch Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 20 Front Left: 20 [100%] Capture [on] Front Right: 20 [100%] Capture [on]
################## Capturing after setting prerequisits ######################
### start recording ffmpeg without --enable-libv4l2: video OK, no sound ###
ffmpeg -loglevel debug -f alsa -ac 2 -i hw:SAA7134 -f video4linux2 -i /dev/video0 -flags +ilme+ildct -aspect 4/3 -target pal-dvd -y test.mpeg > test.log 2>&1
ffmpeg version N-50436-g1d5b35c Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 2 2013 20:07:18 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local --enable-ffplay
libavutil 52. 17.103 / 52. 17.103
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.102 / 54. 63.102
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 41.100 / 3. 41.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-i' ... matched as input file with argument 'hw:SAA7134'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'video4linux2'.
Reading option '-i' ... matched as input file with argument '/dev/video1'.
Reading option '-flags' ... matched as AVOption 'flags' with argument '+ilme+ildct'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)) with argument '4/3'.
Reading option '-target' ... matched as option 'target' (specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ...)) with argument 'pal-dvd'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'test.mpeg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file hw:SAA7134.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Successfully parsed a group of options.
Opening an input file: hw:SAA7134.
[alsa @ 0x3383680] All info found
[alsa @ 0x3383680] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:SAA7134':
Duration: N/A, start: 1362330450.898367, bitrate: 1024 kb/s
Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video1.
Applying option f (force format) with argument video4linux2.
Successfully parsed a group of options.
Opening an input file: /dev/video1.
[video4linux2,v4l2 @ 0x3395100] fd:3 capabilities:5010015
[video4linux2,v4l2 @ 0x3395100] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x3395100] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x3395100] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x3395100] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x3395100] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x3395100] Current standard: PAL-BG, id: 7, frameperiod: 1/25
[video4linux2,v4l2 @ 0x3395100] All info found
[video4linux2,v4l2 @ 0x3395100] Estimating duration from bitrate, this may be inaccurate
Input #1, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 1362330450.970108, bitrate: 124416 kb/s
Stream #1:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576, 1/1000000, 124416 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file test.mpeg.
Applying option aspect (set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)) with argument 4/3.
Applying option target (specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ...)) with argument pal-dvd.
Successfully parsed a group of options.
Opening an output file: test.mpeg.
Successfully opened the file.
[buffer @ 0x3366180] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0x3366180] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x3366180] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x3366180] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x3366180] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x3366180] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 1:0 @ 0x3383560] w:720 h:576 pixfmt:yuv420p tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[scale @ 0x3396000] Setting 'w' to value '720'
[scale @ 0x3396000] Setting 'h' to value '576'
[scale @ 0x3396000] Setting 'flags' to value '0x4'
[scaler for output stream 0:0 @ 0x3395c80] w:720 h:576 flags:'0x4' interl:0
[scaler for output stream 0:0 @ 0x3395c80] w:720 h:576 fmt:yuv420p sar:0/1 -> w:720 h:576 fmt:yuv420p sar:0/1 flags:0x4
[abuffer @ 0x3367e60] Setting entry with key 'time_base' to value '1/32000'
[abuffer @ 0x3367e60] Setting entry with key 'sample_rate' to value '32000'
[abuffer @ 0x3367e60] Setting entry with key 'sample_fmt' to value 's16'
[abuffer @ 0x3367e60] Setting entry with key 'channel_layout' to value '0x3'
[graph 1 input from stream 0:0 @ 0x3366960] tb:1/32000 samplefmt:s16 samplerate:32000 chlayout:0x3
[aformat @ 0x3367060] Setting entry with key 'sample_fmts' to value 'fltp'
[aformat @ 0x3367060] Setting entry with key 'sample_rates' to value '48000'
[aformat @ 0x3367060] Setting entry with key 'channel_layouts' to value '0x4,0x3,0x103,0x7,0x603,0x33,0x107,0x607,0x37,0xc,0xb,0x10b,0xf,0x60b,0x3b,0x10f,0x60f,0x3f'
[audio format for output stream 0:1 @ 0x3383ee0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
[auto-inserted resampler 0 @ 0x33696c0] ch:2 chl:stereo fmt:s16 r:32000Hz -> ch:2 chl:stereo fmt:fltp r:48000Hz
[mpeg2video @ 0x3396e00] detected 4 logical cores
[mpeg2video @ 0x3396e00] intra_quant_bias = 96 inter_quant_bias = 0
Output #0, dvd, to 'test.mpeg':
Metadata:
encoder : Lavf54.63.102
Stream #0:0, 0, 1/90000: Video: mpeg2video, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 1/25, q=2-31, 6000 kb/s, 90k tbn, 25 tbc
Stream #0:1, 0, 1/90000: Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo -> mpeg2video)
Stream #0:0 -> #0:1 (pcm_s16le -> ac3)
Press [q] to stop, [?] for help
[dvd @ 0x33965a0] First SCR: 0 First DTS: 45000
frame= 131 fps= 25 q=2.9 Lsize= 4216kB time=00:00:05.27 bitrate=6545.9kbits/s
video:3850kB audio:289kB subtitle:0 global headers:0kB muxing overhead 1.871097%
### start recording ffmpeg with --enable-libv4l2: video OK, no sound, lots of v4l2-errors ###
ffmpeg -loglevel debug -f alsa -ac 2 -i hw:SAA7134 -f video4linux2 -i /dev/video0 -flags +ilme+ildct -aspect 4/3 -target pal-dvd -y test.mpeg > test.log 2>&1
ffmpeg version N-50436-g1d5b35c Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 3 2013 19:03:18 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local --enable-ffplay --enable-libv4l2
libavutil 52. 17.103 / 52. 17.103
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.102 / 54. 63.102
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 41.100 / 3. 41.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-i' ... matched as input file with argument 'hw:SAA7134'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'video4linux2'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-flags' ... matched as AVOption 'flags' with argument '+ilme+ildct'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)) with argument '4/3'.
Reading option '-target' ... matched as option 'target' (specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ...)) with argument 'pal-dvd'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'test.mpeg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file hw:SAA7134.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Successfully parsed a group of options.
Opening an input file: hw:SAA7134.
[alsa @ 0x2b58680] All info found
[alsa @ 0x2b58680] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:SAA7134':
Duration: N/A, start: 1362333848.816497, bitrate: 1024 kb/s
Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument video4linux2.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x2b6a100] fd:3 capabilities:5010015
[video4linux2,v4l2 @ 0x2b6a100] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x2b6a100] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x2b6a100] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x2b6a100] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x2b6a100] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x2b6a100] Current standard: PAL-BG, id: 7, frameperiod: 1/25
libv4l2: error dequeuing buf: Resource temporarily unavailable
=========> many more libv4l2-errors <===========
[video4linux2,v4l2 @ 0x2b6a100] All info found
[video4linux2,v4l2 @ 0x2b6a100] Estimating duration from bitrate, this may be inaccurate
Input #1, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1362333848.912498, bitrate: 124416 kb/s
Stream #1:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576, 1/1000000, 124416 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file test.mpeg.
Applying option aspect (set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)) with argument 4/3.
Applying option target (specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ...)) with argument pal-dvd.
Successfully parsed a group of options.
Opening an output file: test.mpeg.
Successfully opened the file.
[buffer @ 0x2b6e380] Setting entry with key 'video_size' to value '720x576'
[buffer @ 0x2b6e380] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x2b6e380] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x2b6e380] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x2b6e380] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x2b6e380] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 1:0 @ 0x2b58560] w:720 h:576 pixfmt:yuv420p tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[scale @ 0x2b6ea00] Setting 'w' to value '720'
[scale @ 0x2b6ea00] Setting 'h' to value '576'
[scale @ 0x2b6ea00] Setting 'flags' to value '0x4'
[scaler for output stream 0:0 @ 0x2b6e5a0] w:720 h:576 flags:'0x4' interl:0
[scaler for output stream 0:0 @ 0x2b6e5a0] w:720 h:576 fmt:yuv420p sar:0/1 -> w:720 h:576 fmt:yuv420p sar:0/1 flags:0x4
[abuffer @ 0x2b3c180] Setting entry with key 'time_base' to value '1/32000'
[abuffer @ 0x2b3c180] Setting entry with key 'sample_rate' to value '32000'
[abuffer @ 0x2b3c180] Setting entry with key 'sample_fmt' to value 's16'
[abuffer @ 0x2b3c180] Setting entry with key 'channel_layout' to value '0x3'
[graph 1 input from stream 0:0 @ 0x2b6ebc0] tb:1/32000 samplefmt:s16 samplerate:32000 chlayout:0x3
[aformat @ 0x2b3b920] Setting entry with key 'sample_fmts' to value 'fltp'
[aformat @ 0x2b3b920] Setting entry with key 'sample_rates' to value '48000'
[aformat @ 0x2b3b920] Setting entry with key 'channel_layouts' to value '0x4,0x3,0x103,0x7,0x603,0x33,0x107,0x607,0x37,0xc,0xb,0x10b,0xf,0x60b,0x3b,0x10f,0x60f,0x3f'
[audio format for output stream 0:1 @ 0x2b3c400] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
[auto-inserted resampler 0 @ 0x2b3e760] ch:2 chl:stereo fmt:s16 r:32000Hz -> ch:2 chl:stereo fmt:fltp r:48000Hz
[mpeg2video @ 0x2b6f880] detected 4 logical cores
[mpeg2video @ 0x2b6f880] intra_quant_bias = 96 inter_quant_bias = 0
Output #0, dvd, to 'test.mpeg':
Metadata:
encoder : Lavf54.63.102
Stream #0:0, 0, 1/90000: Video: mpeg2video, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 1/25, q=2-31, 6000 kb/s, 90k tbn, 25 tbc
Stream #0:1, 0, 1/90000: Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo -> mpeg2video)
Stream #0:0 -> #0:1 (pcm_s16le -> ac3)
Press [q] to stop, [?] for help
libv4l2: error dequeuing buf: Resource temporarily unavailable
==============>many more libv4l2-errors<===========
[dvd @ 0x2b6f080] First SCR: 0 First DTS: 45000
libv4l2: error dequeuing buf: Resource temporarily unavailable
==============>many more libv4l2-errors<===========
frame= 13 fps=0.0 q=2.7 size= 526kB time=00:00:00.57 bitrate=7536.3kbits/s
libv4l2: error dequeuing buf: Resource temporarily unavailable
frame= 26 fps= 26 q=3.6 size= 912kB time=00:00:01.08 bitrate=6894.0kbits/s
libv4l2: error dequeuing buf: Resource temporarily unavailable
==============>many more libv4l2-errors<===========
(...)
frame= 1641 fps= 25 q=4.3 size= 52626kB time=00:01:05.69 bitrate=6562.6kbits/s
libv4l2: error dequeuing buf: Resource temporarily unavailable
==============>many more libv4l2-errors<===========
frame= 1654 fps= 25 q=5.4 size= 53106kB time=00:01:06.20 bitrate=6571.2kbits/s
libv4l2: error dequeuing buf: Resource temporarily unavailable
==============>many more libv4l2-errors<===========
video:49103kB audio:3654kB subtitle:0 global headers:0kB muxing overhead 1.882066%
Received signal 2: terminating.
comment:22 Changed 4 months ago by holden
Hello,
for the issue of ffmpeg compiled with --enable-lib4vl2 I will try to look into that, although I am a bit busy these days so I can only work on it on weekends :(
For the audio issue, I'm sure it should work, it must be some settings. Sadly all the transmissions are in dvb-t now here in Italy, so I cannot test with analog TV.
I'd suggest you to try this: acquire only video with ffmpeg and see if you can hear something by running in another terminal:
arecord -D hw:SAA7134 -f cd | aplay
while you do that, open alsamixer and play around, in particular make sure you test all the capture inputs (Line 1, Line 2 and Video). If that works, ffmpeg should work too. Anyway this is probably another issue, so I'd kindly ask you to please open a new ticket.
ps. I've noticed with my card that if I set capture on Video, and run the command above, I see in alsamixer that something changes it back to Line 2. Once I switch to Video again I can hear the typical noise of untuned TV station.
comment:23 follow-up: ↓ 24 Changed 4 months ago by llarevo
Thanks a lot so far. At least I'm a step forward with the analog tv capturing. Just let me know when I shall perform more tests regarding the libv4l2-issue.
I going to discuss the sound issue on the ffmpeg-users mailing list first, because arecord doesn't work (some connection refused-error) and with
sox -c 2 -t alsa hw:1,0 -t alsa default
I get sound only with tvtime, mplayer or mencoder, but not with ffmpeg. Depending on the results of the discussion, I gonna open up another ticket.
comment:24 in reply to: ↑ 23 Changed 3 months ago by holden
Replying to llarevo:
Thanks a lot so far. At least I'm a step forward with the analog tv capturing. Just let me know when I shall perform more tests regarding the libv4l2-issue.
The libv4l2-issue is hopefully fixed, please test git head when you have time. Thanks.
comment:25 Changed 3 months ago by llarevo
Initial tests look very good. I will post detailed results later.
comment:26 Changed 3 months ago by llarevo
This Bug has been repaired. Detailed result from the ffmpeg testcases above follow.
1. compiled without --enable-libv4l2
1.1 ffmpeg -y -loglevel debug -f v4l2 -s vga -r 25 -i /dev/video0 out.mpg
ffmpeg version N-50974-g7d15cd4 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 19 2013 12:36:50 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local --enable-ffplay
libavutil 52. 19.100 / 52. 19.100
libavcodec 55. 0.100 / 55. 0.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 45.104 / 3. 45.104
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option 'out.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option s (set frame size (WxH or abbreviation)) with argument vga.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x192f180] fd:3 capabilities:5010015
[video4linux2,v4l2 @ 0x192f180] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x192f180] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x192f180] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x192f180] Current standard: PAL-BG, id: 7, frameperiod: 1/25
[video4linux2,v4l2 @ 0x192f180] The driver does not allow to change time per frame
[video4linux2,v4l2 @ 0x192f180] All info found
[video4linux2,v4l2 @ 0x192f180] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1363693144.026008, bitrate: 92160 kb/s
Stream #0:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out.mpg.
Successfully parsed a group of options.
Opening an output file: out.mpg.
Successfully opened the file.
[buffer @ 0x1919520] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x1919520] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x1919520] Setting entry with key 'time_base' to value '1/25'
[buffer @ 0x1919520] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x1919520] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x1919520] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x19199a0] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[graph 0 input from stream 0:0 @ 0x19199a0] TB:0.040000 FRAME_RATE:25.000000 SAMPLE_RATE:nan
[mpeg1video @ 0x19312c0] detected 4 logical cores
[mpeg1video @ 0x19312c0] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x1930d60] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
Metadata:
encoder : Lavf55.0.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
[force CFR for input from stream 0:0 @ 0x191a760] N:0 PTS:0 T:0.000000 POS:nan INTERLACED:0 -> PTS:0 T:0.000000
[force CFR for input from stream 0:0 @ 0x191a760] N:1 PTS:40025 T:1601.000000 POS:nan INTERLACED:0 -> PTS:1 T:0.040000
[mpeg @ 0x1930d60] First SCR: 0 First DTS: 45000
[force CFR for input from stream 0:0 @ 0x191a760] N:2 PTS:80003 T:3200.120000 POS:nan INTERLACED:0 -> PTS:2 T:0.080000
[force CFR for input from stream 0:0 @ 0x191a760] N:3 PTS:120005 T:4800.200000 POS:nan INTERLACED:0 -> PTS:3 T:0.120000
[force CFR for input from stream 0:0 @ 0x191a760] N:4 PTS:160003 T:6400.120000 POS:nan INTERLACED:0 -> PTS:4 T:0.160000
[force CFR for input from stream 0:0 @ 0x191a760] N:5 PTS:200026 T:8001.040000 POS:nan INTERLACED:0 -> PTS:5 T:0.200000
[force CFR for input from stream 0:0 @ 0x191a760] N:6 PTS:240028 T:9601.120000 POS:nan INTERLACED:0 -> PTS:6 T:0.240000
[force CFR for input from stream 0:0 @ 0x191a760] N:7 PTS:280028 T:11201.120000 POS:nan INTERLACED:0 -> PTS:7 T:0.280000
[force CFR for input from stream 0:0 @ 0x191a760] N:8 PTS:320029 T:12801.160000 POS:nan INTERLACED:0 -> PTS:8 T:0.320000
[force CFR for input from stream 0:0 @ 0x191a760] N:9 PTS:360030 T:14401.200000 POS:nan INTERLACED:0 -> PTS:9 T:0.360000
[force CFR for input from stream 0:0 @ 0x191a760] N:10 PTS:400029 T:16001.160000 POS:nan INTERLACED:0 -> PTS:10 T:0.400000
[force CFR for input from stream 0:0 @ 0x191a760] N:11 PTS:440029 T:17601.160000 POS:nan INTERLACED:0 -> PTS:11 T:0.440000
[force CFR for input from stream 0:0 @ 0x191a760] N:12 PTS:480031 T:19201.240000 POS:nan INTERLACED:0 -> PTS:12 T:0.480000
N:13 PTS:520031 T:20801.240000 POS:nan INTERLACED:0 -> PTS:13 T:0.520000.7kbits/s
[force CFR for input from stream 0:0 @ 0x191a760] N:14 PTS:560031 T:22401.240000 POS:nan INTERLACED:0 -> PTS:14 T:0.560000
[force CFR for input from stream 0:0 @ 0x191a760] N:15 PTS:600030 T:24001.200000 POS:nan INTERLACED:0 -> PTS:15 T:0.600000
[force CFR for input from stream 0:0 @ 0x191a760] N:16 PTS:640032 T:25601.280000 POS:nan INTERLACED:0 -> PTS:16 T:0.640000
[force CFR for input from stream 0:0 @ 0x191a760] N:17 PTS:680033 T:27201.320000 POS:nan INTERLACED:0 -> PTS:17 T:0.680000
[force CFR for input from stream 0:0 @ 0x191a760] N:18 PTS:720033 T:28801.320000 POS:nan INTERLACED:0 -> PTS:18 T:0.720000
[force CFR for input from stream 0:0 @ 0x191a760] N:19 PTS:760033 T:30401.320000 POS:nan INTERLACED:0 -> PTS:19 T:0.760000
[force CFR for input from stream 0:0 @ 0x191a760] N:20 PTS:800033 T:32001.320000 POS:nan INTERLACED:0 -> PTS:20 T:0.800000
[force CFR for input from stream 0:0 @ 0x191a760] N:21 PTS:840035 T:33601.400000 POS:nan INTERLACED:0 -> PTS:21 T:0.840000
[force CFR for input from stream 0:0 @ 0x191a760] N:22 PTS:880035 T:35201.400000 POS:nan INTERLACED:0 -> PTS:22 T:0.880000
[force CFR for input from stream 0:0 @ 0x191a760] N:23 PTS:920036 T:36801.440000 POS:nan INTERLACED:0 -> PTS:23 T:0.920000
[force CFR for input from stream 0:0 @ 0x191a760] N:24 PTS:960035 T:38401.400000 POS:nan INTERLACED:0 -> PTS:24 T:0.960000
[force CFR for input from stream 0:0 @ 0x191a760] N:25 PTS:1000037 T:40001.480000 POS:nan INTERLACED:0 -> PTS:25 T:1.000000
N:26 PTS:1040037 T:41601.480000 POS:nan INTERLACED:0 -> PTS:26 T:1.0400007kbits/s
[force CFR for input from stream 0:0 @ 0x191a760] N:27 PTS:1080015 T:43200.600000 POS:nan INTERLACED:0 -> PTS:27 T:1.080000
[force CFR for input from stream 0:0 @ 0x191a760] N:28 PTS:1120037 T:44801.480000 POS:nan INTERLACED:0 -> PTS:28 T:1.120000
[force CFR for input from stream 0:0 @ 0x191a760] N:29 PTS:1160038 T:46401.520000 POS:nan INTERLACED:0 -> PTS:29 T:1.160000
[force CFR for input from stream 0:0 @ 0x191a760] N:30 PTS:1200038 T:48001.520000 POS:nan INTERLACED:0 -> PTS:30 T:1.200000
[force CFR for input from stream 0:0 @ 0x191a760] N:31 PTS:1240038 T:49601.520000 POS:nan INTERLACED:0 -> PTS:31 T:1.240000
[force CFR for input from stream 0:0 @ 0x191a760] N:32 PTS:1280039 T:51201.560000 POS:nan INTERLACED:0 -> PTS:32 T:1.280000
[force CFR for input from stream 0:0 @ 0x191a760] N:33 PTS:1320039 T:52801.560000 POS:nan INTERLACED:0 -> PTS:33 T:1.320000
[force CFR for input from stream 0:0 @ 0x191a760] N:34 PTS:1360039 T:54401.560000 POS:nan INTERLACED:0 -> PTS:34 T:1.360000
[force CFR for input from stream 0:0 @ 0x191a760] N:35 PTS:1400040 T:56001.600000 POS:nan INTERLACED:0 -> PTS:35 T:1.400000
[force CFR for input from stream 0:0 @ 0x191a760] N:36 PTS:1440041 T:57601.640000 POS:nan INTERLACED:0 -> PTS:36 T:1.440000
[force CFR for input from stream 0:0 @ 0x191a760] N:37 PTS:1480041 T:59201.640000 POS:nan INTERLACED:0 -> PTS:37 T:1.480000
N:38 PTS:1520041 T:60801.640000 POS:nan INTERLACED:0 -> PTS:38 T:1.5200003kbits/s
[force CFR for input from stream 0:0 @ 0x191a760] N:39 PTS:1560042 T:62401.680000 POS:nan INTERLACED:0 -> PTS:39 T:1.560000
[force CFR for input from stream 0:0 @ 0x191a760] N:40 PTS:1600041 T:64001.640000 POS:nan INTERLACED:0 -> PTS:40 T:1.600000
[force CFR for input from stream 0:0 @ 0x191a760] N:41 PTS:1640021 T:65600.840000 POS:nan INTERLACED:0 -> PTS:41 T:1.640000
[force CFR for input from stream 0:0 @ 0x191a760] N:42 PTS:1680023 T:67200.920000 POS:nan INTERLACED:0 -> PTS:42 T:1.680000
[force CFR for input from stream 0:0 @ 0x191a760] N:43 PTS:1720022 T:68800.880000 POS:nan INTERLACED:0 -> PTS:43 T:1.720000
[force CFR for input from stream 0:0 @ 0x191a760] N:44 PTS:1760045 T:70401.800000 POS:nan INTERLACED:0 -> PTS:44 T:1.760000
[force CFR for input from stream 0:0 @ 0x191a760] N:45 PTS:1800045 T:72001.800000 POS:nan INTERLACED:0 -> PTS:45 T:1.800000
[force CFR for input from stream 0:0 @ 0x191a760] N:46 PTS:1840047 T:73601.880000 POS:nan INTERLACED:0 -> PTS:46 T:1.840000
[force CFR for input from stream 0:0 @ 0x191a760] N:47 PTS:1880045 T:75201.800000 POS:nan INTERLACED:0 -> PTS:47 T:1.880000
[force CFR for input from stream 0:0 @ 0x191a760] N:48 PTS:1920046 T:76801.840000 POS:nan INTERLACED:0 -> PTS:48 T:1.920000
[force CFR for input from stream 0:0 @ 0x191a760] N:49 PTS:1960047 T:78401.880000 POS:nan INTERLACED:0 -> PTS:49 T:1.960000
[force CFR for input from stream 0:0 @ 0x191a760] N:50 PTS:2000024 T:80000.960000 POS:nan INTERLACED:0 -> PTS:50 T:2.000000
N:51 PTS:2040047 T:81601.880000 POS:nan INTERLACED:0 -> PTS:51 T:2.0400002kbits/s
[force CFR for input from stream 0:0 @ 0x191a760] N:52 PTS:2080025 T:83201.000000 POS:nan INTERLACED:0 -> PTS:52 T:2.080000
[force CFR for input from stream 0:0 @ 0x191a760] N:53 PTS:2120049 T:84801.960000 POS:nan INTERLACED:0 -> PTS:53 T:2.120000
[force CFR for input from stream 0:0 @ 0x191a760] N:54 PTS:2160048 T:86401.920000 POS:nan INTERLACED:0 -> PTS:54 T:2.160000
[force CFR for input from stream 0:0 @ 0x191a760] N:55 PTS:2200049 T:88001.960000 POS:nan INTERLACED:0 -> PTS:55 T:2.200000
[force CFR for input from stream 0:0 @ 0x191a760] N:56 PTS:2240049 T:89601.960000 POS:nan INTERLACED:0 -> PTS:56 T:2.240000
[force CFR for input from stream 0:0 @ 0x191a760] N:57 PTS:2280050 T:91202.000000 POS:nan INTERLACED:0 -> PTS:57 T:2.280000
[force CFR for input from stream 0:0 @ 0x191a760] N:58 PTS:2320050 T:92802.000000 POS:nan INTERLACED:0 -> PTS:58 T:2.320000
[force CFR for input from stream 0:0 @ 0x191a760] N:59 PTS:2360049 T:94401.960000 POS:nan INTERLACED:0 -> PTS:59 T:2.360000
[force CFR for input from stream 0:0 @ 0x191a760] N:60 PTS:2400051 T:96002.040000 POS:nan INTERLACED:0 -> PTS:60 T:2.400000
[force CFR for input from stream 0:0 @ 0x191a760] N:61 PTS:2440051 T:97602.040000 POS:nan INTERLACED:0 -> PTS:61 T:2.440000
[force CFR for input from stream 0:0 @ 0x191a760] N:62 PTS:2480051 T:99202.040000 POS:nan INTERLACED:0 -> PTS:62 T:2.480000
[force CFR for input from stream 0:0 @ 0x191a760] N:63 PTS:2520052 T:100802.080000 POS:nan INTERLACED:0 -> PTS:63 T:2.520000
N:64 PTS:2560030 T:102401.200000 POS:nan INTERLACED:0 -> PTS:64 T:2.560000kbits/s
[force CFR for input from stream 0:0 @ 0x191a760] N:65 PTS:2600054 T:104002.160000 POS:nan INTERLACED:0 -> PTS:65 T:2.600000
[force CFR for input from stream 0:0 @ 0x191a760] N:66 PTS:2640054 T:105602.160000 POS:nan INTERLACED:0 -> PTS:66 T:2.640000
[force CFR for input from stream 0:0 @ 0x191a760] N:67 PTS:2680054 T:107202.160000 POS:nan INTERLACED:0 -> PTS:67 T:2.680000
[force CFR for input from stream 0:0 @ 0x191a760] N:68 PTS:2720055 T:108802.200000 POS:nan INTERLACED:0 -> PTS:68 T:2.720000
[force CFR for input from stream 0:0 @ 0x191a760] N:69 PTS:2760055 T:110402.200000 POS:nan INTERLACED:0 -> PTS:69 T:2.760000
[force CFR for input from stream 0:0 @ 0x191a760] N:70 PTS:2800056 T:112002.240000 POS:nan INTERLACED:0 -> PTS:70 T:2.800000
[force CFR for input from stream 0:0 @ 0x191a760] N:71 PTS:2840034 T:113601.360000 POS:nan INTERLACED:0 -> PTS:71 T:2.840000
[force CFR for input from stream 0:0 @ 0x191a760] N:72 PTS:2880056 T:115202.240000 POS:nan INTERLACED:0 -> PTS:72 T:2.880000
[force CFR for input from stream 0:0 @ 0x191a760] N:73 PTS:2920057 T:116802.280000 POS:nan INTERLACED:0 -> PTS:73 T:2.920000
[force CFR for input from stream 0:0 @ 0x191a760] N:74 PTS:2960057 T:118402.280000 POS:nan INTERLACED:0 -> PTS:74 T:2.960000
[force CFR for input from stream 0:0 @ 0x191a760] N:75 PTS:3000060 T:120002.400000 POS:nan INTERLACED:0 -> PTS:75 T:3.000000
[force CFR for input from stream 0:0 @ 0x191a760] N:76 PTS:3040058 T:121602.320000 POS:nan INTERLACED:0 -> PTS:76 T:3.040000
N:77 PTS:3080036 T:123201.440000 POS:nan INTERLACED:0 -> PTS:77 T:3.080000kbits/s
[force CFR for input from stream 0:0 @ 0x191a760] N:78 PTS:3120059 T:124802.360000 POS:nan INTERLACED:0 -> PTS:78 T:3.120000
[force CFR for input from stream 0:0 @ 0x191a760] N:79 PTS:3160059 T:126402.360000 POS:nan INTERLACED:0 -> PTS:79 T:3.160000
[force CFR for input from stream 0:0 @ 0x191a760] N:80 PTS:3200060 T:128002.400000 POS:nan INTERLACED:0 -> PTS:80 T:3.200000
[force CFR for input from stream 0:0 @ 0x191a760] N:81 PTS:3240060 T:129602.400000 POS:nan INTERLACED:0 -> PTS:81 T:3.240000
[force CFR for input from stream 0:0 @ 0x191a760] N:82 PTS:3280060 T:131202.400000 POS:nan INTERLACED:0 -> PTS:82 T:3.280000
[force CFR for input from stream 0:0 @ 0x191a760] N:83 PTS:3320061 T:132802.440000 POS:nan INTERLACED:0 -> PTS:83 T:3.320000
[force CFR for input from stream 0:0 @ 0x191a760] N:84 PTS:3360062 T:134402.480000 POS:nan INTERLACED:0 -> PTS:84 T:3.360000
[force CFR for input from stream 0:0 @ 0x191a760] N:85 PTS:3400062 T:136002.480000 POS:nan INTERLACED:0 -> PTS:85 T:3.400000
[force CFR for input from stream 0:0 @ 0x191a760] N:86 PTS:3440062 T:137602.480000 POS:nan INTERLACED:0 -> PTS:86 T:3.440000
frame= 87 fps= 25 q=30.4 Lsize= 362kB time=00:00:03.44 bitrate= 862.1kbits/s
video:359kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.712646%
1.2 ffmpeg -y -loglevel debug -f v4l2 -s vga -i /dev/video0 out.mpg
ffmpeg version N-50974-g7d15cd4 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 19 2013 12:36:50 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local --enable-ffplay
libavutil 52. 19.100 / 52. 19.100
libavcodec 55. 0.100 / 55. 0.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 45.104 / 3. 45.104
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option 'out.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option s (set frame size (WxH or abbreviation)) with argument vga.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x268d0e0] fd:3 capabilities:5010015
[video4linux2,v4l2 @ 0x268d0e0] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x268d0e0] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x268d0e0] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x268d0e0] Current standard: PAL-BG, id: 7, frameperiod: 1/25
[video4linux2,v4l2 @ 0x268d0e0] All info found
[video4linux2,v4l2 @ 0x268d0e0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1363693217.386804, bitrate: 92160 kb/s
Stream #0:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out.mpg.
Successfully parsed a group of options.
Opening an output file: out.mpg.
Successfully opened the file.
[buffer @ 0x26864a0] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x26864a0] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x26864a0] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x26864a0] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x26864a0] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x26864a0] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x267e560] w:640 h:480 pixfmt:yuv420p tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[mpeg1video @ 0x268ef20] detected 4 logical cores
[mpeg1video @ 0x268ef20] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x268e9c0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
Metadata:
encoder : Lavf55.0.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
[mpeg @ 0x268e9c0] First SCR: 0 First DTS: 45000
frame= 216 fps= 25 q=31.0 Lsize= 598kB time=00:00:08.60 bitrate= 569.6kbits/s
video:592kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.973371%
2. compiled with --enable-libv4l2
2.1 ffmpeg -y -loglevel debug -f v4l2 -s vga -r 25 -i /dev/video0 out.mpg
ffmpeg version N-50974-g7d15cd4 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 16 2013 13:14:09 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local --enable-ffplay --enable-libv4l2
libavutil 52. 19.100 / 52. 19.100
libavcodec 55. 0.100 / 55. 0.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 45.104 / 3. 45.104
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option 'out.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option s (set frame size (WxH or abbreviation)) with argument vga.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x25d4180] fd:4 capabilities:5010015
[video4linux2,v4l2 @ 0x25d4180] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x25d4180] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x25d4180] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x25d4180] Current standard: PAL-BG, id: 7, frameperiod: 1/25
[video4linux2,v4l2 @ 0x25d4180] The driver does not allow to change time per frame
[video4linux2,v4l2 @ 0x25d4180] All info found
[video4linux2,v4l2 @ 0x25d4180] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1363692612.900232, bitrate: 92160 kb/s
Stream #0:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out.mpg.
Successfully parsed a group of options.
Opening an output file: out.mpg.
Successfully opened the file.
[buffer @ 0x25be6e0] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x25be6e0] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x25be6e0] Setting entry with key 'time_base' to value '1/25'
[buffer @ 0x25be6e0] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x25be6e0] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x25be6e0] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x25d4100] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[graph 0 input from stream 0:0 @ 0x25d4100] TB:0.040000 FRAME_RATE:25.000000 SAMPLE_RATE:nan
[mpeg1video @ 0x25d9c40] detected 4 logical cores
[mpeg1video @ 0x25d9c40] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x25d9700] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
Metadata:
encoder : Lavf55.0.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:0 PTS:0 T:0.000000 POS:nan INTERLACED:0 -> PTS:0 T:0.000000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:1 PTS:40024 T:1600.960000 POS:nan INTERLACED:0 -> PTS:1 T:0.040000
[mpeg @ 0x25d9700] First SCR: 0 First DTS: 45000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:2 PTS:80023 T:3200.920000 POS:nan INTERLACED:0 -> PTS:2 T:0.080000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:3 PTS:120028 T:4801.120000 POS:nan INTERLACED:0 -> PTS:3 T:0.120000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:4 PTS:160026 T:6401.040000 POS:nan INTERLACED:0 -> PTS:4 T:0.160000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:5 PTS:200027 T:8001.080000 POS:nan INTERLACED:0 -> PTS:5 T:0.200000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:6 PTS:240027 T:9601.080000 POS:nan INTERLACED:0 -> PTS:6 T:0.240000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:7 PTS:280027 T:11201.080000 POS:nan INTERLACED:0 -> PTS:7 T:0.280000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:8 PTS:320006 T:12800.240000 POS:nan INTERLACED:0 -> PTS:8 T:0.320000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:9 PTS:360006 T:14400.240000 POS:nan INTERLACED:0 -> PTS:9 T:0.360000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:10 PTS:400028 T:16001.120000 POS:nan INTERLACED:0 -> PTS:10 T:0.400000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:11 PTS:440029 T:17601.160000 POS:nan INTERLACED:0 -> PTS:11 T:0.440000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:12 PTS:480029 T:19201.160000 POS:nan INTERLACED:0 -> PTS:12 T:0.480000
N:13 PTS:520030 T:20801.200000 POS:nan INTERLACED:0 -> PTS:13 T:0.520000.7kbits/s
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:14 PTS:560030 T:22401.200000 POS:nan INTERLACED:0 -> PTS:14 T:0.560000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:15 PTS:600031 T:24001.240000 POS:nan INTERLACED:0 -> PTS:15 T:0.600000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:16 PTS:640030 T:25601.200000 POS:nan INTERLACED:0 -> PTS:16 T:0.640000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:17 PTS:680010 T:27200.400000 POS:nan INTERLACED:0 -> PTS:17 T:0.680000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:18 PTS:720032 T:28801.280000 POS:nan INTERLACED:0 -> PTS:18 T:0.720000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:19 PTS:760011 T:30400.440000 POS:nan INTERLACED:0 -> PTS:19 T:0.760000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:20 PTS:800032 T:32001.280000 POS:nan INTERLACED:0 -> PTS:20 T:0.800000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:21 PTS:840034 T:33601.360000 POS:nan INTERLACED:0 -> PTS:21 T:0.840000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:22 PTS:880033 T:35201.320000 POS:nan INTERLACED:0 -> PTS:22 T:0.880000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:23 PTS:920034 T:36801.360000 POS:nan INTERLACED:0 -> PTS:23 T:0.920000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:24 PTS:960035 T:38401.400000 POS:nan INTERLACED:0 -> PTS:24 T:0.960000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:25 PTS:1000035 T:40001.400000 POS:nan INTERLACED:0 -> PTS:25 T:1.000000
N:26 PTS:1040036 T:41601.440000 POS:nan INTERLACED:0 -> PTS:26 T:1.0400005kbits/s
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:27 PTS:1080036 T:43201.440000 POS:nan INTERLACED:0 -> PTS:27 T:1.080000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:28 PTS:1120037 T:44801.480000 POS:nan INTERLACED:0 -> PTS:28 T:1.120000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:29 PTS:1160036 T:46401.440000 POS:nan INTERLACED:0 -> PTS:29 T:1.160000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:30 PTS:1200037 T:48001.480000 POS:nan INTERLACED:0 -> PTS:30 T:1.200000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:31 PTS:1240038 T:49601.520000 POS:nan INTERLACED:0 -> PTS:31 T:1.240000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:32 PTS:1280037 T:51201.480000 POS:nan INTERLACED:0 -> PTS:32 T:1.280000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:33 PTS:1320038 T:52801.520000 POS:nan INTERLACED:0 -> PTS:33 T:1.320000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:34 PTS:1360039 T:54401.560000 POS:nan INTERLACED:0 -> PTS:34 T:1.360000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:35 PTS:1400039 T:56001.560000 POS:nan INTERLACED:0 -> PTS:35 T:1.400000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:36 PTS:1440039 T:57601.560000 POS:nan INTERLACED:0 -> PTS:36 T:1.440000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:37 PTS:1480040 T:59201.600000 POS:nan INTERLACED:0 -> PTS:37 T:1.480000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:38 PTS:1520041 T:60801.640000 POS:nan INTERLACED:0 -> PTS:38 T:1.520000
N:39 PTS:1560042 T:62401.680000 POS:nan INTERLACED:0 -> PTS:39 T:1.5600006kbits/s
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:40 PTS:1600042 T:64001.680000 POS:nan INTERLACED:0 -> PTS:40 T:1.600000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:41 PTS:1640042 T:65601.680000 POS:nan INTERLACED:0 -> PTS:41 T:1.640000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:42 PTS:1680024 T:67200.960000 POS:nan INTERLACED:0 -> PTS:42 T:1.680000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:43 PTS:1720042 T:68801.680000 POS:nan INTERLACED:0 -> PTS:43 T:1.720000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:44 PTS:1760042 T:70401.680000 POS:nan INTERLACED:0 -> PTS:44 T:1.760000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:45 PTS:1800044 T:72001.760000 POS:nan INTERLACED:0 -> PTS:45 T:1.800000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:46 PTS:1840044 T:73601.760000 POS:nan INTERLACED:0 -> PTS:46 T:1.840000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:47 PTS:1880044 T:75201.760000 POS:nan INTERLACED:0 -> PTS:47 T:1.880000
[force CFR for input from stream 0:0 @ 0x25bf2a0] N:48 PTS:1920045 T:76801.800000 POS:nan INTERLACED:0 -> PTS:48 T:1.920000
frame= 49 fps= 25 q=10.5 Lsize= 212kB time=00:00:01.92 bitrate= 904.5kbits/s
video:209kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.456739%
Received signal 2: terminating.
2.2 ffmpeg -y -loglevel debug -f v4l2 -s vga -i /dev/video0 out.mpg
ffmpeg version N-50974-g7d15cd4 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 16 2013 13:14:09 with gcc 4.7.2 (GCC) 20121109 (Red Hat 4.7.2-8)
configuration: --prefix=/usr/local --enable-ffplay --enable-libv4l2
libavutil 52. 19.100 / 52. 19.100
libavcodec 55. 0.100 / 55. 0.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 45.104 / 3. 45.104
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument 'vga'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option 'out.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option s (set frame size (WxH or abbreviation)) with argument vga.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x304e0e0] fd:4 capabilities:5010015
[video4linux2,v4l2 @ 0x304e0e0] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x304e0e0] input_channel: 0, input_name: Television
[video4linux2,v4l2 @ 0x304e0e0] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x304e0e0] Current standard: PAL-BG, id: 7, frameperiod: 1/25
[video4linux2,v4l2 @ 0x304e0e0] All info found
[video4linux2,v4l2 @ 0x304e0e0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1363692796.662234, bitrate: 92160 kb/s
Stream #0:0, 1, 1/1000000: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 1/1000000, 92160 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out.mpg.
Successfully parsed a group of options.
Opening an output file: out.mpg.
Successfully opened the file.
[buffer @ 0x30474a0] Setting entry with key 'video_size' to value '640x480'
[buffer @ 0x30474a0] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 0x30474a0] Setting entry with key 'time_base' to value '1/1000000'
[buffer @ 0x30474a0] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x30474a0] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x30474a0] Setting entry with key 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x303f560] w:640 h:480 pixfmt:yuv420p tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[mpeg1video @ 0x3053740] detected 4 logical cores
[mpeg1video @ 0x3053740] intra_quant_bias = 96 inter_quant_bias = 0
[mpeg @ 0x30531e0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
Metadata:
encoder : Lavf55.0.100
Stream #0:0, 0, 1/90000: Video: mpeg1video, yuv420p, 640x480, 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
[mpeg @ 0x30531e0] First SCR: 0 First DTS: 45000
frame= 166 fps= 25 q=31.0 Lsize= 424kB time=00:00:06.60 bitrate= 526.3kbits/s
video:421kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.685030%
Received signal 2: terminating.



Typo: The regression was not introduced in 2009 but in 2010.
Needless to say, that I can perform additional tests on request.