[FFmpeg-user] problem with audio/video sync after conversion
Arlo Leach
lists at arlomedia.com
Tue Jun 19 23:27:00 CEST 2012
> Which version of ffmpeg? Full uncut output please--does it mention any
> warnings/errors?
I noticed a message in the output about "-b is ambiguous," so I updated my conversion command to this:
/usr/bin/ffmpeg -i sculpture_original.mp4 -f mp4 -vcodec libx264 -vpre medium -acodec libfaac -g 15 -r:v 15 -b:v 360k -r:a 22050 -b:a 48k -s 512x288 -t 900 sculpture_converted.mp4 2>&1
Now I get the following output, which includes version info:
ffmpeg version N-34622-g701e534, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 9 2011 13:09:49 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 --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 51. 24. 1 / 51. 24. 1
libavcodec 53. 29. 0 / 53. 29. 0
libavformat 53. 20. 0 / 53. 20. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 47. 0 / 2. 47. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (2997/100)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sculpture_original.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 @ 0x173a9ea0] w:1280 h:720 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[scale @ 0x173afb60] w:1280 h:720 fmt:yuv420p -> w:512 h:288 fmt:yuv420p flags:0x4
[libx264 @ 0x173aafc0] using SAR=1/1
[libx264 @ 0x173aafc0] using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
[libx264 @ 0x173aafc0] profile High, level 2.1
[libx264 @ 0x173aafc0] 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=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 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 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=360 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00
Output #0, mp4, to 'sculpture_converted.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2012-06-08 20:01:51
encoder : Lavf53.20.0
Stream #0:0(eng): Video: h264 (![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 (@[0][0][0] / 0x0040), 48000 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= 23 fps= 0 q=12.0 size= 18kB time=00:00:00.53 bitrate= 269.3kbits/s dup=0 drop=18
frame= 39 fps= 38 q=19.0 size= 115kB time=00:00:01.60 bitrate= 588.4kbits/s dup=0 drop=35
frame= 60 fps= 39 q=13.0 size= 174kB time=00:00:03.00 bitrate= 475.4kbits/s dup=0 drop=55
frame= 81 fps= 40 q=18.0 size= 238kB time=00:00:04.40 bitrate= 443.7kbits/s dup=0 drop=77
frame= 102 fps= 40 q=16.0 size= 322kB time=00:00:05.80 bitrate= 455.0kbits/s dup=0 drop=97
frame= 122 fps= 40 q=13.0 size= 387kB time=00:00:07.13 bitrate= 444.3kbits/s dup=0 drop=117
frame= 143 fps= 40 q=16.0 size= 474kB time=00:00:08.53 bitrate= 455.3kbits/s dup=0 drop=139
frame= 163 fps= 40 q=16.0 size= 538kB time=00:00:09.86 bitrate= 446.5kbits/s dup=0 drop=159
frame= 184 fps= 40 q=17.0 size= 602kB time=00:00:11.26 bitrate= 437.7kbits/s dup=0 drop=179
frame= 206 fps= 41 q=15.0 size= 692kB time=00:00:12.73 bitrate= 445.1kbits/s dup=0 drop=201
frame= 224 fps= 40 q=17.0 size= 762kB time=00:00:13.93 bitrate= 447.9kbits/s dup=0 drop=220
frame= 239 fps= 40 q=-1.0 Lsize= 953kB time=00:00:15.80 bitrate= 494.1kbits/s dup=0 drop=234
video:852kB audio:90kB global headers:0kB muxing overhead 1.131066%
[libx264 @ 0x173aafc0] frame I:17 Avg QP:11.84 size: 21265
[libx264 @ 0x173aafc0] frame P:79 Avg QP:12.79 size: 5133
[libx264 @ 0x173aafc0] frame B:143 Avg QP:14.21 size: 733
[libx264 @ 0x173aafc0] consecutive B-frames: 17.6% 7.5% 1.3% 73.6%
[libx264 @ 0x173aafc0] mb I I16..4: 35.7% 27.6% 36.7%
[libx264 @ 0x173aafc0] mb P I16..4: 6.0% 5.6% 4.4% P16..4: 32.0% 14.1% 12.2% 0.0% 0.0% skip:25.7%
[libx264 @ 0x173aafc0] mb B I16..4: 0.3% 0.1% 0.1% B16..8: 18.6% 4.9% 1.0% direct: 2.8% skip:72.3% L0:36.2% L1:52.5% BI:11.3%
[libx264 @ 0x173aafc0] final ratefactor: 17.39
[libx264 @ 0x173aafc0] 8x8 transform intra:30.4% inter:51.3%
[libx264 @ 0x173aafc0] coded y,uvDC,uvAC intra: 67.8% 78.0% 69.4% inter: 14.5% 19.1% 4.5%
[libx264 @ 0x173aafc0] i16 v,h,dc,p: 44% 18% 27% 12%
[libx264 @ 0x173aafc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 18% 36% 4% 4% 5% 4% 3% 5%
[libx264 @ 0x173aafc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 21% 20% 4% 6% 7% 5% 4% 5%
[libx264 @ 0x173aafc0] i8c dc,h,v,p: 57% 19% 20% 4%
[libx264 @ 0x173aafc0] Weighted P-Frames: Y:12.7% UV:12.7%
[libx264 @ 0x173aafc0] ref P L0: 76.4% 5.2% 13.0% 5.4% 0.0%
[libx264 @ 0x173aafc0] ref B L0: 91.1% 6.8% 2.0%
[libx264 @ 0x173aafc0] ref B L1: 96.9% 3.1%
[libx264 @ 0x173aafc0] kb/s:437.75
For comparison, here's the output when converting the jug_original video, which does not result in any problems. I see a similar but slightly different message about "codec frame rate differs from container frame rate":
ffmpeg version N-34622-g701e534, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 9 2011 13:09:49 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 --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 51. 24. 1 / 51. 24. 1
libavcodec 53. 29. 0 / 53. 29. 0
libavformat 53. 20. 0 / 53. 20. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 47. 0 / 2. 47. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Seems stream 1 codec frame rate differs from container frame rate: 5994.00 (5994/1) -> 29.97 (2997/100)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'jug_original.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2012-06-08 18:40:28
Duration: 00:00:11.92, start: 0.000000, bitrate: 13894 kb/s
Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 64 kb/s
Metadata:
creation_time : 2012-06-08 18:40:28
handler_name : ?Apple Alias Data Handler
Stream #0:1(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 13839 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 5994 tbc
Metadata:
creation_time : 2012-06-08 18:40:28
handler_name : ?Apple Alias Data Handler
[buffer @ 0xb027ce0] w:1280 h:720 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
[scale @ 0xb00f4e0] w:1280 h:720 fmt:yuv420p -> w:512 h:288 fmt:yuv420p flags:0x4
[libx264 @ 0xb010ae0] using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
[libx264 @ 0xb010ae0] profile High, level 2.1
[libx264 @ 0xb010ae0] 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=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 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 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=360 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00
Output #0, mp4, to 'jug_converted.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2012-06-08 18:40:28
encoder : Lavf53.20.0
Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 512x288, q=10-51, 360 kb/s, 15 tbn, 15 tbc
Metadata:
creation_time : 2012-06-08 18:40:28
handler_name : ?Apple Alias Data Handler
Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, mono, s16, 48 kb/s
Metadata:
creation_time : 2012-06-08 18:40:28
handler_name : ?Apple Alias Data Handler
Stream mapping:
Stream #0:1 -> #0:0 (h264 -> libx264)
Stream #0:0 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
frame= 12 fps= 0 q=0.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=0 drop=9
frame= 28 fps= 28 q=27.0 size= 49kB time=00:00:00.86 bitrate= 464.6kbits/s dup=0 drop=24
frame= 43 fps= 28 q=23.0 size= 97kB time=00:00:01.86 bitrate= 426.8kbits/s dup=0 drop=40
frame= 58 fps= 28 q=26.0 size= 144kB time=00:00:02.86 bitrate= 412.0kbits/s dup=0 drop=54
frame= 72 fps= 28 q=23.0 size= 195kB time=00:00:03.80 bitrate= 420.7kbits/s dup=0 drop=68
frame= 87 fps= 28 q=26.0 size= 244kB time=00:00:04.80 bitrate= 416.1kbits/s dup=0 drop=84
frame= 102 fps= 29 q=22.0 size= 295kB time=00:00:05.80 bitrate= 417.0kbits/s dup=0 drop=98
frame= 118 fps= 29 q=23.0 size= 352kB time=00:00:06.86 bitrate= 420.3kbits/s dup=0 drop=114
frame= 131 fps= 29 q=23.0 size= 404kB time=00:00:07.73 bitrate= 428.0kbits/s dup=0 drop=128
frame= 147 fps= 29 q=23.0 size= 464kB time=00:00:08.80 bitrate= 432.4kbits/s dup=0 drop=144
frame= 163 fps= 29 q=25.0 size= 523kB time=00:00:09.86 bitrate= 434.3kbits/s dup=0 drop=159
frame= 180 fps= 30 q=26.0 size= 597kB time=00:00:11.00 bitrate= 444.6kbits/s dup=0 drop=176
frame= 180 fps= 29 q=-1.0 Lsize= 630kB time=00:00:11.86 bitrate= 434.9kbits/s dup=0 drop=177
video:552kB audio:70kB global headers:0kB muxing overhead 1.344181%
[libx264 @ 0xb010ae0] frame I:12 Avg QP:22.69 size: 20688
[libx264 @ 0xb010ae0] frame P:73 Avg QP:22.83 size: 3387
[libx264 @ 0xb010ae0] frame B:95 Avg QP:26.02 size: 727
[libx264 @ 0xb010ae0] consecutive B-frames: 14.4% 26.7% 56.7% 2.2%
[libx264 @ 0xb010ae0] mb I I16..4: 21.8% 43.2% 35.0%
[libx264 @ 0xb010ae0] mb P I16..4: 1.4% 1.9% 0.4% P16..4: 35.8% 19.7% 9.7% 0.0% 0.0% skip:31.0%
[libx264 @ 0xb010ae0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 25.5% 6.4% 0.8% direct: 0.9% skip:66.3% L0:25.0% L1:55.9% BI:19.1%
[libx264 @ 0xb010ae0] final ratefactor: 22.28
[libx264 @ 0xb010ae0] 8x8 transform intra:44.8% inter:63.9%
[libx264 @ 0xb010ae0] coded y,uvDC,uvAC intra: 89.5% 89.5% 60.7% inter: 17.1% 16.0% 1.0%
[libx264 @ 0xb010ae0] i16 v,h,dc,p: 14% 15% 44% 27%
[libx264 @ 0xb010ae0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 23% 14% 5% 6% 8% 8% 8% 9%
[libx264 @ 0xb010ae0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 19% 13% 7% 8% 8% 7% 7% 7%
[libx264 @ 0xb010ae0] i8c dc,h,v,p: 41% 21% 25% 13%
[libx264 @ 0xb010ae0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0xb010ae0] ref P L0: 66.7% 19.7% 10.8% 2.7%
[libx264 @ 0xb010ae0] ref B L0: 91.2% 7.8% 1.0%
[libx264 @ 0xb010ae0] ref B L1: 95.8% 4.2%
[libx264 @ 0xb010ae0] kb/s:376.42<br>
_______________________________
Arlo Leach
773.769.6106
http://arlomedia.com
More information about the ffmpeg-user
mailing list