При записи видео такой командой получаю рассинхранизацию звука и видео в 2-3 сек:
ffmpeg -f alsa -i hw:1,0 -f video4linux2 -s 640x480 -qscale 1 -r 25 -i /dev/video0 -strict experimental -vcodec libx264 -vpre veryfast -threads 0 -b 1500k -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1 -bf 2 -acodec aac -ab 192k ~/out.mp4
Кроме того, не смотря на достаточно высокий битрейт, не движения достаточно сильно размываются.
Что может посоветовать уважаемый All?
Лог записи:
Fmpeg version 0.6-4:0.6-2ubuntu2~lucid1~ppa2, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 13 2010 08:21:28 with gcc 4.4.3
configuration: --extra-version='4:0.6-2ubuntu2~lucid1~ppa2' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version='4:0.6-2ubuntu1~lucid1~ppa1' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavcodec configuration: --extra-version='4:0.6-2ubuntu1~lucid1~ppa1' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavformat configuration: --extra-version='4:0.6-2ubuntu2~lucid1~ppa2' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavdevice configuration: --extra-version='4:0.6-2ubuntu2~lucid1~ppa2' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavfilter configuration: --extra-version='4:0.6-2ubuntu2~lucid1~ppa2' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libswscale configuration: --extra-version='4:0.6-2ubuntu2~lucid1~ppa2' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libpostproc configuration: --extra-version='4:0.6-2ubuntu2~lucid1~ppa2' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[alsa @ 0x89a8bc0]Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'hw:1,0':
Duration: N/A, start: 594384.999038, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
[video4linux2 @ 0x89b3990]Estimating duration from bitrate, this may be inaccurate
Input #1, video4linux2, from '/dev/video0':
Duration: N/A, start: 594387.028553, bitrate: 122880 kb/s
Stream #1.0: Video: rawvideo, yuyv422, 640x480, 122880 kb/s, 25 tbr, 1000k tbn, 25 tbc
[libx264 @ 0x89b6030]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0x89b6030]profile High, level 3.0
[libx264 @ 0x89b6030]x264 - core 85 Ubuntu_2:0.85.1448+git1a6d32-4 - H.264/MPEG-4 AVC codec - Copyleft 2003-2009 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=0.00:0.00 mixed_ref=0 me_range=16 chroma_me=0 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 sliced_threads=0 nr=0 decimate=1 mbaff=0 constrained_intra=0 bframes=2 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 wpredb=1 wpredp=0 keyint=300 keyint_min=25 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=1500 ratetol=2.7 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 pb_ratio=1.25 aq=1:1.00
Output #0, mp4, to 'temp.mp4':
Metadata:
encoder : Lavf52.64.2
Stream #0.0: Video: libx264 (hq), yuv420p, 640x480, q=10-51, pass 1, 1500 kb/s, 25 tbn, 25 tbc
Stream #0.1: Audio: aac, 48000 Hz, 1 channels, s16, 192 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
frame= 4 fps= 0 q=479.0 size= 0kB time=1.00 bitrate= 0.4kbits/s
frame= 8 fps= 8 q=22.0 size= 0kB time=1.79 bitrate= 0.2kbits/s
frame= 12 fps= 8 q=29.0 size= 67kB time=0.04 bitrate=13723.2kbits/s
frame= 16 fps= 8 q=29.0 size= 101kB time=0.56 bitrate=1470.3kbits/s
...
frame= 342 fps= 7 q=27.0 size= 3690kB time=51.12 bitrate= 591.3kbits/s
frame= 346 fps= 7 q=27.0 size= 3731kB time=51.64 bitrate= 591.8kbits/s
frame= 349 fps= 7 q=27.0 size= 3762kB time=52.04 bitrate= 592.2kbits/s
frame= 351 fps= 7 q=-2.0 Lsize= 3959kB time=53.52 bitrate= 606.0kbits/s
video:2615kB audio:1316kB global headers:0kB muxing overhead 0.711108%
[libx264 @ 0x89b6030]frame I:2 Avg QP:20.35 size: 19616
[libx264 @ 0x89b6030]frame P:349 Avg QP:24.01 size: 7558
[libx264 @ 0x89b6030]consecutive B-frames: 100.0% 0.0% 0.0%
[libx264 @ 0x89b6030]mb I I16..4: 33.0% 55.0% 12.0%
[libx264 @ 0x89b6030]mb P I16..4: 37.6% 23.4% 0.2% P16..4: 34.1% 3.3% 0.9% 0.0% 0.0% skip: 0.5%
[libx264 @ 0x89b6030]final ratefactor: 25.61
[libx264 @ 0x89b6030]8x8 transform intra:38.4% inter:41.0%
[libx264 @ 0x89b6030]coded y,uvDC,uvAC intra: 22.1% 99.5% 93.1% inter: 23.2% 95.1% 39.2%
[libx264 @ 0x89b6030]i16 v,h,dc,p: 52% 10% 19% 19%
[libx264 @ 0x89b6030]i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 8% 48% 8% 4% 5% 3% 6% 3%
[libx264 @ 0x89b6030]i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 11% 23% 6% 5% 7% 5% 7% 4%
[libx264 @ 0x89b6030]kb/s:1525.26
Received signal 15: terminating.