[FFmpeg-user] Video frame duplication in FFMPEG output for MXF source

Christian Johannesen chrisjohannesen at gmail.com
Tue Nov 3 20:17:45 CET 2015


Hi -

I'm having a specific issue when I try to process a 1080i 59.94 MXF to a
MP4 at 23.98. The output video freezes on one frame while the audio
continues. On the output file, one frame of the credits displays from frame
2499 to 2579, then another frame from 2580 to 2603 and a third frame plays
from 2604 to 2627 after which the video playback resumes, but the audio is
out of sync from the amount of video was paused. I created a 2 minute
sub-clip with XF Reader and the issue persisted.

I tested the same source file with Adobe Media Encoder which did not have
any issues processing the video, so I can't say that the source file was
created incorrectly, or there are issues with it.

Thanks,
Chris

ffmpeg -i D:\MEDIA\opening_credits.mxf -filter_complex
"[0:0]pullup,dejudder[v1]";"[0:1][0:2]amerge=inputs=2,pan=2c|c0=c0|c1=c1[a1]"
-r 24000/1001 -map "[v1]" -colorspace 1 -color_primaries 1 -color_trc 1
-pix_fmt yuv420p -c:v libx264 -crf 19 -map "[a1]" -ar 48k -cutoff 18k -b:a
128k -movflags +write_colr+faststart D:\MEDIA\opening_credits.mp4

ffmpeg version N-76419-gdee7440 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--enable-decklink --enable-zlib
  libavutil      55.  5.100 / 55.  5.100
  libavcodec     57. 13.102 / 57. 13.102
  libavformat    57. 13.100 / 57. 13.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 14.101 /  6. 14.101
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Guessed Channel Layout for  Input Stream #0.5 : mono
Guessed Channel Layout for  Input Stream #0.6 : mono
Guessed Channel Layout for  Input Stream #0.7 : mono
Guessed Channel Layout for  Input Stream #0.8 : mono
Guessed Channel Layout for  Input Stream #0.9 : mono
Guessed Channel Layout for  Input Stream #0.10 : mono
Guessed Channel Layout for  Input Stream #0.11 : mono
Guessed Channel Layout for  Input Stream #0.12 : mono
Guessed Channel Layout for  Input Stream #0.13 : mono
Guessed Channel Layout for  Input Stream #0.14 : mono
Guessed Channel Layout for  Input Stream #0.15 : mono
Guessed Channel Layout for  Input Stream #0.16 : mono
Input #0, mxf, from 'D:\MEDIA\opening_credits.mxf':
  Metadata:
    product_name    : MXFTk Advanced
    uid             : 0a72d630-8254-11e5-9cd4-78acc098f62d
    generation_uid  : 0a72d630-8254-11e5-9cd5-78acc098f62d
    company_name    : OpenCube
    application_platform: Microsoft Windows 7 Professional Service Pack 1
(Build 7601)
    product_uid     : 3a4fe380-0d01-11e4-869f-3cd92b5c1dfc
    product_version : 2.7.4.20150421
    modification_date: 2015-11-03 12:55:16
    material_package_umid:
0x060A2B340101010501010D2013000000083B0EA0825411E59CD278ACC098F62D
    timecode        : 00:59:59;00
  Duration: 00:01:52.38, start: 0.000000, bitrate: 118426 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv), 1920x1080 [SAR 1:1
DAR 16:9], Closed Captions, 100000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn,
59.94 tbc
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:9: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152
kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:10: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit),
1152 kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:11: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit),
1152 kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:12: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit),
1152 kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:13: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit),
1152 kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:14: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit),
1152 kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:15: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit),
1152 kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
    Stream #0:16: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit),
1152 kb/s
    Metadata:
      file_package_umid:
0x060A2B340101010501010D2013000000083C6E30825411E59CD278ACC098F62D
[Parsed_amerge_2 @ 0000006986610cc0] No channel layout for input 1
[Parsed_amerge_2 @ 0000006986610cc0] Input channel layouts overlap: output
layout will be determined by the number of distinct input channels
[Parsed_pan_3 @ 0000006986613ac0] Pure channel mapping detected: 0 1
[libx264 @ 0000006986cc8fe0] using SAR=1/1
[libx264 @ 0000006986cc8fe0] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 0000006986cc8fe0] profile High, level 4.0
[libx264 @ 0000006986cc8fe0] 264 - core 148 r2638 7599210 - H.264/MPEG-4
AVC codec - Copyleft 2003-2015 - 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=34
lookahead_threads=5 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=23
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=19.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'D:\MEDIA\opening_credits.mp4':
  Metadata:
    product_name    : MXFTk Advanced
    uid             : 0a72d630-8254-11e5-9cd4-78acc098f62d
    generation_uid  : 0a72d630-8254-11e5-9cd5-78acc098f62d
    company_name    : OpenCube
    application_platform: Microsoft Windows 7 Professional Service Pack 1
(Build 7601)
    product_uid     : 3a4fe380-0d01-11e4-869f-3cd92b5c1dfc
    product_version : 2.7.4.20150421
    modification_date: 2015-11-03 12:55:16
    material_package_umid:
0x060A2B340101010501010D2013000000083B0EA0825411E59CD278ACC098F62D
    timecode        : 00:59:59;00
    encoder         : Lavf57.13.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p(bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 fps, 24k tbn,
23.98 tbc (default)
    Metadata:
      encoder         : Lavc57.13.102 libx264
    Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000
Hz, stereo, s16, 128 kb/s (default)
    Metadata:
      encoder         : Lavc57.13.102 libvo_aacenc
Stream mapping:
  Stream #0:0 (mpeg2video) -> pullup
  Stream #0:1 (pcm_s24le) -> amerge:in0
  Stream #0:2 (pcm_s24le) -> amerge:in1
  dejudder -> Stream #0:0 (libx264)
  pan -> Stream #0:1 (libvo_aacenc)
Press [q] to stop, [?] for help
[mp4 @ 00000069866115c0] Starting second pass: moving the moov atom to the
beginning of the file69
frame= 2848 fps= 47 q=-1.0 Lsize=  166616kB time=00:01:58.70
bitrate=11498.7kbits/s dup=186 drop=69
video:164790kB audio:1757kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.041554%
[libx264 @ 0000006986cc8fe0] frame I:25    Avg QP:12.11  size:135657
[libx264 @ 0000006986cc8fe0] frame P:1838  Avg QP:18.17  size: 82155
[libx264 @ 0000006986cc8fe0] frame B:985   Avg QP:17.44  size: 14570
[libx264 @ 0000006986cc8fe0] consecutive B-frames: 47.0% 19.9%  2.0% 31.0%
[libx264 @ 0000006986cc8fe0] mb I  I16..4: 33.8% 63.5%  2.7%
[libx264 @ 0000006986cc8fe0] mb P  I16..4:  1.2% 26.7%  0.4%  P16..4: 20.7%
 9.1%  5.2%  0.0%  0.0%    skip:36.8%
[libx264 @ 0000006986cc8fe0] mb B  I16..4:  0.0%  2.6%  0.0%  B16..8: 13.3%
 1.8%  0.5%  direct: 2.0%  skip:79.8%  L0:50.7% L1:39.2% BI:10.1%
[libx264 @ 0000006986cc8fe0] 8x8 transform intra:93.4% inter:79.9%
[libx264 @ 0000006986cc8fe0] coded y,uvDC,uvAC intra: 86.9% 71.2% 26.0%
inter: 18.6% 16.7% 0.7%
[libx264 @ 0000006986cc8fe0] i16 v,h,dc,p: 66% 18%  5% 12%
[libx264 @ 0000006986cc8fe0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 11% 52%  5%
 4%  4%  4%  5%  5%
[libx264 @ 0000006986cc8fe0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 19% 24%  6%
 7%  7%  6%  5%  4%
[libx264 @ 0000006986cc8fe0] i8c dc,h,v,p: 53% 29% 15%  3%
[libx264 @ 0000006986cc8fe0] Weighted P-Frames: Y:10.5% UV:5.0%
[libx264 @ 0000006986cc8fe0] ref P L0: 55.1% 11.3% 21.5% 11.3%  0.7%
[libx264 @ 0000006986cc8fe0] ref B L0: 84.4% 14.3%  1.3%
[libx264 @ 0000006986cc8fe0] ref B L1: 95.4%  4.6%
[libx264 @ 0000006986cc8fe0] kb/s:11364.64


More information about the ffmpeg-user mailing list