[FFmpeg-user] problem with audio/video sync after conversion
Arlo Leach
lists at arlomedia.com
Fri Jun 22 00:07:47 CEST 2012
> I think that adding '-async 2 -vsync 1' would help.
I was hopeful! But this had no noticeable effect.
> uncut console output from a failing test case?
Here it is with the new version:
/usr/bin/ffmpeg -i infile.mp4 -f mp4 -vcodec libx264 -vpre medium -acodec libfaac -g 15 -r 15 -b:v 360k -ar 22050 -b:a 48k -async 2 -vsync 1 -s 512x288 -t 900 outfile.mp4 2>&1
ffmpeg version N-41797-g3821632 Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 21 2012 10:22:20 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enab libavutil 51. 59.100 / 51. 59.100
libavcodec 54. 29.100 / 54. 29.100
libavformat 54. 10.100 / 54. 10.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 82.100 / 2. 82.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'infile.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2012-06-08 20:01:51
Duration: 00:00:15.82, start: 0.000000, bitrate: 1677 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1575 kb/s, 29.97 fps, 29.97 tbr, 29970 tbn, 59.94 tbc
Metadata:
creation_time : 2012-06-08 20:01:51
handler_name : Mainconcept MP4 Video Media Handler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 93 kb/s
Metadata:
creation_time : 2012-06-08 20:01:51
handler_name : Mainconcept MP4 Sound Media Handler
[buffer @ 0xd027ba0] w:1280 h:720 pixfmt:yuv420p tb:1/29970 fr:2997/100 sar:1/1 sws_param:flags=2
[ffmpeg_buffersink @ 0xd01b260] No opaque field provided
[scale @ 0xd028640] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:512 h:288 fmt:yuv420p sar:1/1 flags:0x4
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000:max_soft_comp=0.000042.
[aresample @ 0xd0519e0] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:22050Hz
[libx264 @ 0xd005c20] using SAR=1/1
[libx264 @ 0xd005c20] using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
[libx264 @ 0xd005c20] profile High, level 2.1
[libx264 @ 0xd005c20] 264 - core 119 r2106 07efeb4 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=15 keyint_min=8 Output #0, mp4, to 'outfile.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2012-06-08 20:01:51
encoder : Lavf54.10.100
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 512x288 [SAR 1:1 DAR 16:9], q=10-51, 360 kb/s, 15 tbn, 15 tbc
Metadata:
creation_time : 2012-06-08 20:01:51
handler_name : Mainconcept MP4 Video Media Handler
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 22050 Hz, stereo, s16, 48 kb/s
Metadata:
creation_time : 2012-06-08 20:01:51
handler_name : Mainconcept MP4 Sound Media Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
frame= 26 fps=0.0 q=31.0 size= 1kB time=00:00:00.-6 bitrate= -96.4kbits/s dup=1 drop=20
frame= 50 fps= 50 q=20.0 size= 130kB time=00:00:01.53 bitrate= 692.0kbits/s dup=1 drop=44
frame= 81 fps= 53 q=21.0 size= 234kB time=00:00:03.60 bitrate= 531.5kbits/s dup=1 drop=75
frame= 112 fps= 55 q=21.0 size= 333kB time=00:00:05.66 bitrate= 481.1kbits/s dup=1 drop=107
frame= 141 fps= 56 q=21.0 size= 434kB time=00:00:07.60 bitrate= 468.0kbits/s dup=1 drop=135
frame= 175 fps= 58 q=21.0 size= 543kB time=00:00:09.86 bitrate= 451.1kbits/s dup=1 drop=170
frame= 203 fps= 57 q=21.0 size= 642kB time=00:00:11.73 bitrate= 447.9kbits/s dup=1 drop=198
frame= 231 fps= 57 q=21.0 size= 739kB time=00:00:13.60 bitrate= 444.9kbits/s dup=1 drop=225
frame= 240 fps= 54 q=-1.0 Lsize= 931kB time=00:00:15.83 bitrate= 481.7kbits/s dup=1 drop=234
video:846kB audio:76kB subtitle:0 global headers:0kB muxing overhead 1.044666%
[libx264 @ 0xd005c20] frame I:17 Avg QP:11.71 size: 25000
[libx264 @ 0xd005c20] frame P:79 Avg QP:14.36 size: 4501
[libx264 @ 0xd005c20] frame B:144 Avg QP:17.03 size: 591
[libx264 @ 0xd005c20] consecutive B-frames: 17.5% 7.5% 0.0% 75.0%
[libx264 @ 0xd005c20] mb I I16..4: 15.3% 50.1% 34.7%
[libx264 @ 0xd005c20] mb P I16..4: 2.7% 9.8% 1.9% P16..4: 28.1% 14.4% 10.4% 0.0% 0.0% skip:32.7%
[libx264 @ 0xd005c20] mb B I16..4: 0.2% 0.2% 0.1% B16..8: 21.2% 3.4% 0.8% direct: 2.5% skip:71.7% L0:39.9% L1:51.6% BI: 8.5%
[libx264 @ 0xd005c20] final ratefactor: 17.06
[libx264 @ 0xd005c20] 8x8 transform intra:56.9% inter:65.5%
[libx264 @ 0xd005c20] coded y,uvDC,uvAC intra: 63.5% 81.2% 75.3% inter: 11.0% 17.7% 6.0%
[libx264 @ 0xd005c20] i16 v,h,dc,p: 49% 15% 14% 22%
[libx264 @ 0xd005c20] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 16% 37% 4% 4% 5% 4% 3% 5%
[libx264 @ 0xd005c20] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 19% 15% 4% 7% 9% 6% 6% 7%
[libx264 @ 0xd005c20] i8c dc,h,v,p: 59% 18% 18% 5%
[libx264 @ 0xd005c20] Weighted P-Frames: Y:12.7% UV:12.7%
[libx264 @ 0xd005c20] ref P L0: 74.0% 5.5% 13.8% 6.7% 0.0%
[libx264 @ 0xd005c20] ref B L0: 90.3% 7.4% 2.2%
[libx264 @ 0xd005c20] ref B L1: 96.3% 3.7%
[libx264 @ 0xd005c20] kb/s:432.82
_______________________________
Arlo Leach
http://arlomedia.com
More information about the ffmpeg-user
mailing list