[FFmpeg-user] video4linux2: Resource temporarily unavailable

llarevo at gmx.net llarevo at gmx.net
Thu Jul 12 20:19:34 CEST 2012


> I try to change my standard encoding tool from mencoder to ffmpeg. Now
> I've got a problem with analog capturing. When trying to capture with
> ffmpeg -f v4l2 -i /dev/video0 out.mpg, I get lots of errors:
> 
> libv4l2: error dequeuing buf: Resource temporarily unavailable (s.b.)
> 
> although I set the channel prior to the capturing via
> 
> v4lctl setchannel
> 
> Here you see an attempt with ffmpeg (after which a zero-byte outfile is
> written):
> 
> ffmpeg -f v4l2 -i /dev/video0 out.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
> 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
> --------5000 TIMES THE LINE ABOVE--------
> libv4l2: error dequeuing buf: Resource temporarily unavailable
> libv4l2: erro^C     <---------I stopped  that output--------
> Estimating duration from bitrate, this may be inaccurate
> Input #0, video4linux2,v4l2, from '/dev/video0':
>   Duration: N/A, start: 1341859570.870366, bitrate: N/A
>     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576,
> -2147483 kb/s, 1.83 tbr, 1000k tbn, 1000k tbc
> File 'out.mpeg' already exists. Overwrite ? [y/N] y
> w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
> [mpeg1video @ 0x235db00] MPEG1/2 does not support 5/1 fps
> Output #0, mpeg, to 'out.mpeg':
>     Stream #0:0: Video: mpeg1video, yuv420p, 720x576, 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.


I've tested this issue now with another hardware (Terratec Cinergy XS
USB) and capturing works good with it. So the problem comes somehow from
the interaction between ffmpeg and the hardware, because the hardware
(Terratec Cinergy 400 TV) works without any problems with other apps
like mplayer, mencoder, xawtv and tvtime. Only ffmpeg is producing the
problem.

What does the error mean and what are common reasons for it
respectively?
Is this a ffmpeg problem or a video4linux problem, or both?
What is ffmpeg doing differently with a v4l2 device in comparison to the
working apps mentioned above? 
Why does the problem appear only with ffmpeg?


Thanks
--
Felix




More information about the ffmpeg-user mailing list