[FFmpeg-trac] #2696(undetermined:new): Audio/Video sync issues when reducing fps from 59.94 to 29.97
FFmpeg
trac at avcodec.org
Fri Jun 21 09:22:40 CEST 2013
#2696: Audio/Video sync issues when reducing fps from 59.94 to 29.97
-------------------------------------+-------------------------------------
Reporter: smblr75 | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
When I transcode the source video (dejavu_20mb.mp4) which is at 59.97 fps
down to 29.97 fps (dejavu_2997.mp4), I can see some lip sync issues
indicating that there is some audio/video sync issue.
I don't see any problem when I transcode at the same fps (dejavu_5994.mp4)
How to reproduce:
{{{
ffmpeg -i dejavu_20mb.mp4 -r 29.97 dejavu_2997.mp4
ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
built on May 27 2013 10:30:08 with gcc 3.4.6 (GCC) 20060404 (Red Hat
3.4.6-9)
configuration: --enable-gpl --enable-version3 --enable-zlib --enable-
bzlib --enable-pthreads --enable-libvorbis --enable-libtheora --enable-
libspeex --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-
libopencore_amrwb --enable-libopencore_amrnb --enable-libfdk_aac --enable-
libvpx --enable-libgsm --extra-libs=-static --enable-nonfree --enable-
libfreetype
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.106 / 54. 59.106
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dejavu_20mb.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2013-06-10 21:03:17
Duration: 00:02:41.34, start: 0.000000, bitrate: 1039 kb/s
Stream #0:0(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
stereo, s16, 1536 kb/s
Metadata:
creation_time : 2013-06-10 21:10:02
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
1280x720, 8684 kb/s, 59.94 fps, 59.94 tbr, 5994 tbn, 11988 tbc
Metadata:
creation_time : 2013-06-10 21:10:02
handler_name : Apple Alias Data Handler
[libx264 @ 0x1cc905e0] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.1 Cache64
[libx264 @ 0x1cc905e0] profile High, level 3.1
[libx264 @ 0x1cc905e0] 264 - core 128 - H.264/MPEG-4 AVC codec - Copyleft
2003-2012 - 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=3
lookahead_threads=1 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=250 keyint_min=25
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'dejavu_2997.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf54.59.106
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
1280x720, q=-1--1, 11988 tbn, 29.97 tbc
Metadata:
creation_time : 2013-06-10 21:10:02
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, s16, 139 kb/s
Metadata:
creation_time : 2013-06-10 21:10:02
handler_name : Apple Alias Data Handler
Stream mapping:
Stream #0:1 -> #0:0 (h264 -> libx264)
Stream #0:0 -> #0:1 (pcm_s16le -> libfdk_aac)
Press [q] to stop, [?] for help
Truncating packet of size 48235 to 21094kB time=00:00:10.45
bitrate=1327.0kbits/s dup=0 drop=305
[h264 @ 0x1d32f340] AVC: nal size 7357
Last message repeated 1 times
[h264 @ 0x1d32f340] concealing 2250 DC, 2250 AC, 2250 MV errors in P frame
frame= 314 fps= 19 q=-1.0 Lsize= 2206kB time=00:00:10.51
bitrate=1718.6kbits/s dup=0 drop=308
video:2014kB audio:180kB subtitle:0 global headers:0kB muxing overhead
0.563787%
[libx264 @ 0x1cc905e0] frame I:3 Avg QP:22.44 size: 52646
[libx264 @ 0x1cc905e0] frame P:95 Avg QP:24.12 size: 13286
[libx264 @ 0x1cc905e0] frame B:216 Avg QP:26.36 size: 2970
[libx264 @ 0x1cc905e0] consecutive B-frames: 7.0% 1.3% 7.6% 84.1%
[libx264 @ 0x1cc905e0] mb I I16..4: 26.8% 46.5% 26.7%
[libx264 @ 0x1cc905e0] mb P I16..4: 4.9% 7.4% 1.2% P16..4: 45.3%
8.6% 5.8% 0.0% 0.0% skip:26.7%
[libx264 @ 0x1cc905e0] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 34.6%
1.6% 0.2% direct: 1.4% skip:62.0% L0:47.3% L1:49.4% BI: 3.3%
[libx264 @ 0x1cc905e0] 8x8 transform intra:52.9% inter:84.7%
[libx264 @ 0x1cc905e0] coded y,uvDC,uvAC intra: 43.8% 51.0% 13.3% inter:
9.3% 23.1% 0.4%
[libx264 @ 0x1cc905e0] i16 v,h,dc,p: 32% 28% 10% 30%
[libx264 @ 0x1cc905e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 14% 29% 18% 4%
4% 3% 4% 6%
[libx264 @ 0x1cc905e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 22% 19% 11% 5%
6% 4% 4% 4%
[libx264 @ 0x1cc905e0] i8c dc,h,v,p: 54% 21% 22% 3%
[libx264 @ 0x1cc905e0] Weighted P-Frames: Y:1.1% UV:1.1%
[libx264 @ 0x1cc905e0] ref P L0: 51.4% 10.5% 28.7% 9.4% 0.0%
[libx264 @ 0x1cc905e0] ref B L0: 68.8% 21.5% 9.8%
[libx264 @ 0x1cc905e0] ref B L1: 83.7% 16.3%
[libx264 @ 0x1cc905e0] kb/s:1574.27
}}}
Following transcode does not have this lip sync issue:
{{{
ffmpeg -i dejavu_20mb.mp4 dejavu_5994.mp4
ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
built on May 27 2013 10:30:08 with gcc 3.4.6 (GCC) 20060404 (Red Hat
3.4.6-9)
configuration: --enable-gpl --enable-version3 --enable-zlib --enable-
bzlib --enable-pthreads --enable-libvorbis --enable-libtheora --enable-
libspeex --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-
libopencore_amrwb --enable-libopencore_amrnb --enable-libfdk_aac --enable-
libvpx --enable-libgsm --extra-libs=-static --enable-nonfree --enable-
libfreetype
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.106 / 54. 59.106
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dejavu_20mb.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2013-06-10 21:03:17
Duration: 00:02:41.34, start: 0.000000, bitrate: 1039 kb/s
Stream #0:0(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
stereo, s16, 1536 kb/s
Metadata:
creation_time : 2013-06-10 21:10:02
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
1280x720, 8684 kb/s, 59.94 fps, 59.94 tbr, 5994 tbn, 11988 tbc
Metadata:
creation_time : 2013-06-10 21:10:02
handler_name : Apple Alias Data Handler
[libx264 @ 0x894d3c0] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.1 Cache64
[libx264 @ 0x894d3c0] profile High, level 3.2
[libx264 @ 0x894d3c0] 264 - core 128 - H.264/MPEG-4 AVC codec - Copyleft
2003-2012 - 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=3
lookahead_threads=1 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=250 keyint_min=25
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'dejavu_5994.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf54.59.106
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
1280x720, q=-1--1, 11988 tbn, 59.94 tbc
Metadata:
creation_time : 2013-06-10 21:10:02
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, s16, 139 kb/s
Metadata:
creation_time : 2013-06-10 21:10:02
handler_name : Apple Alias Data Handler
Stream mapping:
Stream #0:1 -> #0:0 (h264 -> libx264)
Stream #0:0 -> #0:1 (pcm_s16le -> libfdk_aac)
Press [q] to stop, [?] for help
Truncating packet of size 48235 to 21094kB time=00:00:10.45
bitrate=1628.7kbits/s
[h264 @ 0x8fec440] AVC: nal size 7357
Last message repeated 1 times
[h264 @ 0x8fec440] concealing 2250 DC, 2250 AC, 2250 MV errors in P frame
frame= 623 fps= 24 q=-1.0 Lsize= 2498kB time=00:00:10.51
bitrate=1945.9kbits/s dup=1 drop=0
video:2301kB audio:180kB subtitle:0 global headers:0kB muxing overhead
0.696050%
[libx264 @ 0x894d3c0] frame I:5 Avg QP:23.28 size: 39919
[libx264 @ 0x894d3c0] frame P:180 Avg QP:25.53 size: 8264
[libx264 @ 0x894d3c0] frame B:438 Avg QP:28.27 size: 1526
[libx264 @ 0x894d3c0] consecutive B-frames: 5.8% 1.0% 1.4% 91.8%
[libx264 @ 0x894d3c0] mb I I16..4: 28.0% 54.2% 17.8%
[libx264 @ 0x894d3c0] mb P I16..4: 3.3% 3.7% 0.6% P16..4: 40.9% 5.7%
3.7% 0.0% 0.0% skip:42.1%
[libx264 @ 0x894d3c0] mb B I16..4: 0.1% 0.0% 0.0% B16..8: 27.4% 0.5%
0.1% direct: 0.3% skip:71.6% L0:43.7% L1:54.7% BI: 1.5%
[libx264 @ 0x894d3c0] 8x8 transform intra:49.9% inter:86.0%
[libx264 @ 0x894d3c0] coded y,uvDC,uvAC intra: 39.5% 51.3% 12.0% inter:
4.9% 13.7% 0.1%
[libx264 @ 0x894d3c0] i16 v,h,dc,p: 30% 31% 13% 26%
[libx264 @ 0x894d3c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 14% 32% 17% 3%
3% 3% 4% 6%
[libx264 @ 0x894d3c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 24% 19% 9% 5%
5% 4% 4% 3%
[libx264 @ 0x894d3c0] i8c dc,h,v,p: 57% 21% 21% 2%
[libx264 @ 0x894d3c0] Weighted P-Frames: Y:0.6% UV:0.6%
[libx264 @ 0x894d3c0] ref P L0: 52.0% 10.6% 29.1% 8.4% 0.0%
[libx264 @ 0x894d3c0] ref B L0: 65.4% 22.8% 11.8%
[libx264 @ 0x894d3c0] ref B L1: 81.0% 19.0%
[libx264 @ 0x894d3c0] kb/s:1812.97
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2696>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list