[FFmpeg-trac] #9315(undetermined:new): MXF lgop created by ffmpeg plays out of order frames in Premiere Pro
FFmpeg
trac at avcodec.org
Sun Jul 4 14:10:47 EEST 2021
#9315: MXF lgop created by ffmpeg plays out of order frames in Premiere Pro
-------------------------------------+-------------------------------------
Reporter: Alex | Owner: (none)
Type: defect | Status: new
Priority: normal | Component:
| undetermined
Version: git-master | Resolution:
Keywords: MXF H264 | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Alex):
Re-encoding still produces out-of-order frames in Premiere Pro, although
in a different order
I just tried re-encoding the original file with:
{{{
ffmpeg -i .\mxf_xavc_long_gop_input.mxf -c:v libx264
ffmpeg_mxf_re_encoded.mxf
ffmpeg version 2021-06-30-git-de8e6e67e7-full_build-www.gyan.dev Copyright
(c) 2000-2021 the FFmpeg developers
built with gcc 10.3.0 (Rev2, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-
w32threads --disable-autodetect --enable-fontconfig --enable-iconv
--enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-
libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh
--enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca
--enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e
--enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx
--enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
--enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
--enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
--enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-
libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-
libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
--enable-libmp3lame --enable-libshine --enable-libtheora --enable-
libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm
--enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-
libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-
libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 3.100 / 59. 3.100
libavformat 59. 3.101 / 59. 3.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.103 / 8. 0.103
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 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
Input #0, mxf, from '.\mxf_xavc_long_gop_input.mxf':
Metadata:
operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
toolkit_version_num: 5.3.0.0.1
uid : 4d96ec40-dc9b-11eb-8de7-00d861c7e796
generation_uid : 4d96ec41-dc9b-11eb-94dc-00d861c7e796
company_name : Adobe Inc.
product_name : Premiere Pro
product_version_num: 1.0.0.0.1
product_version : 15.2.0
application_platform: win32
product_uid : 0c3919fe-46e8-11e5-a151-feff819cdc9f
modification_date: 2021-07-04T07:41:54.468000Z
material_package_umid:
0x060A2B340101010501010D1213000000A2E9A60199930597D73500D861C7E796
timecode : 00:00:00;00
Duration: 00:00:01.00, start: 0.000000, bitrate: 12083 kb/s
Stream #0:0: Video: h264 (High 4:2:2), yuv422p10le(tv, progressive),
1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 29.97 tbn
Metadata:
file_package_umid:
0x060A2B340101010501010D12139EDD55A8E9A601999305974D7F00D861C7E796
file_package_name: Source Package
track_name : Track 2
Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid:
0x060A2B340101010501010D12139EDD55A8E9A601999305974D7F00D861C7E796
file_package_name: Source Package
track_name : Track 3
Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid:
0x060A2B340101010501010D12139EDD55A8E9A601999305974D7F00D861C7E796
file_package_name: Source Package
track_name : Track 4
Stream #0:3: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid:
0x060A2B340101010501010D12139EDD55A8E9A601999305974D7F00D861C7E796
file_package_name: Source Package
track_name : Track 5
Stream #0:4: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid:
0x060A2B340101010501010D12139EDD55A8E9A601999305974D7F00D861C7E796
file_package_name: Source Package
track_name : Track 6
File 'ffmpeg_mxf_re_encoded.mxf' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[libx264 @ 0000023e5c0b6580] using SAR=1/1
[libx264 @ 0000023e5c0b6580] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000023e5c0b6580] profile High 4:2:2, level 4.0, 4:2:2, 10-bit
Output #0, mxf, to 'ffmpeg_mxf_re_encoded.mxf':
Metadata:
operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
toolkit_version_num: 5.3.0.0.1
uid : 4d96ec40-dc9b-11eb-8de7-00d861c7e796
generation_uid : 4d96ec41-dc9b-11eb-94dc-00d861c7e796
timecode : 00:00:00;00
material_package_umid:
0x060A2B340101010501010D1213000000A2E9A60199930597D73500D861C7E796
product_version_num: 1.0.0.0.1
modification_date: 2021-07-04T07:41:54.468000Z
application_platform: win32
product_uid : 0c3919fe-46e8-11e5-a151-feff819cdc9f
encoder : Lavf59.3.101
Stream #0:0: Video: h264, yuv422p10le(tv, progressive), 1920x1080 [SAR
1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbn
Metadata:
file_package_umid:
0x060A2B340101010501010D12139EDD55A8E9A601999305974D7F00D861C7E796
file_package_name: Source Package
track_name : Track 2
encoder : Lavc59.3.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Stream #0:1: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid:
0x060A2B340101010501010D12139EDD55A8E9A601999305974D7F00D861C7E796
file_package_name: Source Package
track_name : Track 3
encoder : Lavc59.3.100 pcm_s16le
frame= 30 fps=0.0 q=-1.0 Lsize= 243kB time=00:00:01.00
bitrate=1989.1kbits/s speed=2.71x
video:107kB audio:94kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 20.969059%
[libx264 @ 0000023e5c0b6580] frame I:1 Avg QP:28.41 size: 17644
[libx264 @ 0000023e5c0b6580] frame P:23 Avg QP:33.75 size: 3518
[libx264 @ 0000023e5c0b6580] frame B:6 Avg QP:41.81 size: 1848
[libx264 @ 0000023e5c0b6580] consecutive B-frames: 63.3% 26.7% 10.0% 0.0%
[libx264 @ 0000023e5c0b6580] mb I I16..4: 52.7% 35.5% 11.8%
[libx264 @ 0000023e5c0b6580] mb P I16..4: 1.4% 4.3% 1.7% P16..4:
0.9% 0.4% 0.2% 0.0% 0.0% skip:91.2%
[libx264 @ 0000023e5c0b6580] mb B I16..4: 0.2% 0.3% 0.7% B16..8:
4.0% 0.4% 0.1% direct: 0.0% skip:94.3% L0:34.9% L1:63.5% BI: 1.6%
[libx264 @ 0000023e5c0b6580] 8x8 transform intra:49.6% inter:14.1%
[libx264 @ 0000023e5c0b6580] coded y,uvDC,uvAC intra: 11.7% 0.0% 0.0%
inter: 0.3% 0.0% 0.0%
[libx264 @ 0000023e5c0b6580] i16 v,h,dc,p: 70% 26% 4% 0%
[libx264 @ 0000023e5c0b6580] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 20% 41%
1% 0% 0% 0% 0% 0%
[libx264 @ 0000023e5c0b6580] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 20% 26%
4% 3% 3% 4% 3% 4%
[libx264 @ 0000023e5c0b6580] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0000023e5c0b6580] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000023e5c0b6580] ref P L0: 74.1% 16.7% 9.2%
[libx264 @ 0000023e5c0b6580] ref B L0: 84.7% 13.3% 2.0%
[libx264 @ 0000023e5c0b6580] kb/s:876.32
}}}
Digging a bit deeper, it seems that the original file has all the frames
in order, whereas the resulting files have the frames out of order, and
Premiere Pro doesn't seem to want to deal with it.
Original file:
{{{
ffprobe -show_frames -select_streams v:0 .\mxf_xavc_long_gop_input.mxf
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=1
pkt_duration_time=0.033367
pkt_pos=204800
pkt_size=96750
width=1920
height=1080
pix_fmt=yuv422p10le
sample_aspect_ratio=1:1
pict_type=B
coded_picture_number=1
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=1
pkt_pts_time=0.033367
pkt_dts=1
pkt_dts_time=0.033367
best_effort_timestamp=1
best_effort_timestamp_time=0.033367
pkt_duration=1
pkt_duration_time=0.033367
pkt_pos=323072
pkt_size=10779
width=1920
height=1080
pix_fmt=yuv422p10le
sample_aspect_ratio=1:1
pict_type=B
coded_picture_number=2
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
... etc
}}}
Result file (of remux)
{{{
ffprobe -show_frames -select_streams v:0 .\ffmpeg_mxf_output.mxf
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=1
pkt_pts_time=0.033367
pkt_dts=1
pkt_dts_time=0.033367
best_effort_timestamp=1
best_effort_timestamp_time=0.033367
pkt_duration=1
pkt_duration_time=0.033367
pkt_pos=83968
pkt_size=96750
width=1920
height=1080
pix_fmt=yuv422p10le
sample_aspect_ratio=1:1
pict_type=B
coded_picture_number=1
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=2
pkt_pts_time=0.066733
pkt_dts=2
pkt_dts_time=0.066733
best_effort_timestamp=2
best_effort_timestamp_time=0.066733
pkt_duration=1
pkt_duration_time=0.033367
pkt_pos=185344
pkt_size=10779
width=1920
height=1080
pix_fmt=yuv422p10le
sample_aspect_ratio=1:1
pict_type=B
coded_picture_number=2
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=1
pkt_duration_time=0.033367
pkt_pos=7168
pkt_size=72613
width=1920
height=1080
pix_fmt=yuv422p10le
sample_aspect_ratio=1:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
etc...
}}}
Re-Encoded file
{{{
ffprobe -show_frames -select_streams v:0 .\ffmpeg_mxf_re_encoded.mxf
[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=2
pkt_dts_time=0.066733
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=1
pkt_duration_time=0.033367
pkt_pos=7168
pkt_size=17644
width=1920
height=1080
pix_fmt=yuv422p10le
sample_aspect_ratio=1:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[SIDE_DATA]
side_data_type=H.26[45] User Data Unregistered SEI message
[/SIDE_DATA]
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=2
pkt_pts_time=0.066733
pkt_dts=3
pkt_dts_time=0.100100
best_effort_timestamp=2
best_effort_timestamp_time=0.066733
pkt_duration=1
pkt_duration_time=0.033367
pkt_pos=50176
pkt_size=2227
width=1920
height=1080
pix_fmt=yuv422p10le
sample_aspect_ratio=1:1
pict_type=B
coded_picture_number=2
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=1
pkt_pts_time=0.033367
pkt_dts=4
pkt_dts_time=0.133467
best_effort_timestamp=4
best_effort_timestamp_time=0.133467
pkt_duration=1
pkt_duration_time=0.033367
pkt_pos=29184
pkt_size=16777
width=1920
height=1080
pix_fmt=yuv422p10le
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=1
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
[/FRAME]
etc
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9315#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list