[FFmpeg-trac] #1570(avdevice:new): libv4l2: error dequeuing buf: Resource temporarily unavailable
FFmpeg
trac at avcodec.org
Tue Jul 24 11:31:05 CEST 2012
#1570: libv4l2: error dequeuing buf: Resource temporarily unavailable
-------------------------------------+-------------------------------------
Reporter: llarevo | Type: defect
Status: new | Priority: normal
Component: avdevice | Version:
Keywords: | unspecified
video4linux, video4linux2, | Blocked By:
v4l2.c, regression, capture, | Reproduced by developer: 0
analog, tv |
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
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
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1570>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list