[FFmpeg-user] Fwd: problem with analyzeduration

Маджугин Александр madzhugin at yandex.ru
Wed Mar 7 00:02:58 CET 2012



-------- Пересылаемое сообщение  --------
27.02.2012, 23:05, "Маджугин Александр" <madzhugin at yandex.ru>:

Hi.
I have faced the following problem - i have to make a photo with webcam and i have to do it quickly.
But while running ffmpeg analizes input stream too long - about 2-3 sec.
I tried to use the option "-analyzeduration 0", however, it didn't give any result - ffmpeg analizes input stream anyway.
I also tried to describe input stream totally, but it didn't give any result again.

I use the following command:
"ffmpeg -f video4linux2,v4l2 -analyzeduration 0 -s 640x480 -qscale 0 -r 30 -pix_fmt yuyv422 -i /dev/video0 -f image2 -c:v mjpeg -pix_fmt yuvj422p -vframes 1 out.jpg"

I get out:
--------------------------------------------------------------------------------------------------------------------------------
"ffmpeg version 0.9.1-4:0.9.1-0ubuntu1~jon1~lucid1, Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan  7 2012 15:05:17 with gcc 4.4.3
  configuration: --extra-version='4:0.9.1-0ubuntu1~jon1~lucid1' --arch=i386 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  WARNING: library configuration mismatch
  avutil      configuration: --extra-version='4:0.9.1ubuntu1~jon1~lucid1' --arch=i386 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-frei0r --enable-libopenjpeg --enable-gpl --enable-postproc --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-libx264 --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avconv
  avcodec     configuration: --extra-version='4:0.9.1ubuntu1~jon1~lucid1' --arch=i386 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-frei0r --enable-libopenjpeg --enable-gpl --enable-postproc --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-libx264 --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avconv
  avformat    configuration: --extra-version='4:0.9.1-0ubuntu1~jon1~lucid1' --arch=i386 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avconv
  avdevice    configuration: --extra-version='4:0.9.1-0ubuntu1~jon1~lucid1' --arch=i386 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avconv
  avfilter    configuration: --extra-version='4:0.9.1-0ubuntu1~jon1~lucid1' --arch=i386 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avconv
  swscale     configuration: --extra-version='4:0.9.1-0ubuntu1~jon1~lucid1' --arch=i386 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avconv
  postproc    configuration: --extra-version='4:0.9.1-0ubuntu1~jon1~lucid1' --arch=i386 --prefix=/usr --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avconv
  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  52.  0. 0 / 52.  0. 0
[video4linux2,v4l2 @ 0x972b580] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 455998.312997, bitrate: 147456 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 tbr, 1000k tbn, 30 tbc
[buffer @ 0x972bb60] w:640 h:480 pixfmt:yuyv422 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x972c000] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0x972faa0] w:640 h:480 fmt:yuyv422 -> w:640 h:480 fmt:yuvj422p flags:0x4
Output #0, image2, to 'out.jpg':
  Metadata:
    encoder         : Lavf53.24.2
    Stream #0:0: Video: mjpeg, yuvj422p, 640x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mjpeg)
Press [q] to stop, [?] for help
frame=    1 fps=  0 q=1.6 Lsize=       0kB time=00:00:00.03 bitrate=   0.0kbits/s
video:29kB audio:0kB global headers:0kB muxing overhead -100.000000%
--------------------------------------------------------------------------------------------------------------------------------

Whats wrong with it?

P.S.
--------------------------------------------------------------------------------------------------------------------------------
$ uname -a
Linux kiosk 3.2.5-030205-generic #201202061401 SMP Mon Feb 6 19:11:06 UTC 2012 i686 GNU/Linux
--------------------------------------------------------------------------------------------------------------------------------
$ lsusb
..
Bus 001 Device 004: ID 0458:7060 KYE Systems Corp. (Mouse Systems)
..
--------------------------------------------------------------------------------------------------------------------------------
$ modinfo uvcvideo
filename:       /lib/modules/3.2.5-030205-generic/kernel/drivers/media/video/uvc/uvcvideo.ko
version:        1.1.1
license:        GPL
description:    USB Video Class driver
author:         Laurent Pinchart <laurent.pinchart at ideasonboard.com>
srcversion:     8C7099B998ADA2049B68BD6
alias:          usb:v*p*d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v1C4Fp3000d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v1B3Bp2951d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v19ABp1000d00*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v19ABp1000d01[0-1]*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v19ABp1000d012[0-6]dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v199Ep8102d*dc*dsc*dp*icFFisc01ip00*
alias:          usb:v18ECp3290d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v18ECp3288d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v18ECp3188d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v18CDpCAFEd*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v1871p0306d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v17EFp480Bd*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v17DCp0202d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v174Fp8A34d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v174Fp8A33d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v174Fp8A31d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v174Fp8A12d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v174Fp5931d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v174Fp5212d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v152Dp0310d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v13D3p5103d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v0E8Dp0004d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v0AC8p3420d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v0AC8p3410d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v0AC8p332Dd*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v06F8p300Cd*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v05E3p0505d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v05C8p0403d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v05ACp8501d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v058Fp3820d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v04F2pB071d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v046Dp08C7d*dc*dsc*dp*icFFisc01ip00*
alias:          usb:v046Dp08C6d*dc*dsc*dp*icFFisc01ip00*
alias:          usb:v046Dp08C5d*dc*dsc*dp*icFFisc01ip00*
alias:          usb:v046Dp08C3d*dc*dsc*dp*icFFisc01ip00*
alias:          usb:v046Dp08C2d*dc*dsc*dp*icFFisc01ip00*
alias:          usb:v046Dp08C1d*dc*dsc*dp*icFFisc01ip00*
alias:          usb:v045Ep0723d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v045Ep00F8d*dc*dsc*dp*ic0Eisc01ip00*
alias:          usb:v0458p706Ed*dc*dsc*dp*ic0Eisc01ip00*
depends:        videodev
intree:         Y
vermagic:       3.2.5-030205-generic SMP mod_unload modversions 686
parm:           clock:Video buffers timestamp clock
parm:           nodrop:Don't drop incomplete frames (uint)
parm:           quirks:Forced device quirks (uint)
parm:           trace:Trace level bitmask (uint)
parm:           timeout:Streaming control requests timeout (uint)
-------- Завершение пересылаемого сообщения --------


More information about the ffmpeg-user mailing list