Opened 4 months ago
Last modified 3 months ago
#10793 new enhancement
I hope that FFMPEG can re-encode 12-BIT APPLE PRORES MXF encoded by ADOBE PREMIERE WITHOUT A BIT-DEPTH degrade.
Reported by: | 李星辰 | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | prores pixfmt mxf |
Cc: | 李星辰 | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
FFMPEG CANNOT RE-ENCODE 12-BIT APPLE PRORES MXF encoded by ADOBE PREMIERE PRO CC2018 and higher version WITHOUT A BIT-DEPTH degrade.
How to reproduce:
% ffmpeg -c:v prores -i input.mxf -c:v prores -profile:v 5 -pix_fmt yuv444p12le -f mxf output.mxf ffmpeg version: N-113169-ge1c1dc8347-tessus built on 2024-01-01 13:50 "/Users/lixingchen/Downloads/ffmpeg 3" \ -r 60/1 -f mxf -i \ "/Volumes/A029/T203/00015.MXF" \ -map 0:v:0 -map 0:a:0 \ -vsync cfr -pix_fmt yuv444p12 -r 60/1 -timecode 00:09:50:00 -strict unofficial \ -c:v prores -profile:v 5 -c:a copy \ -r 60/1 \ -f mxf -signal_standard 7 \ "/Volumes/A029/T203/00015-1.MXF" ffmpeg version N-113169-ge1c1dc8347-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2024 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.17) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay libavutil 58. 36.100 / 58. 36.100 libavcodec 60. 36.100 / 60. 36.100 libavformat 60. 20.100 / 60. 20.100 libavdevice 60. 4.100 / 60. 4.100 libavfilter 9. 16.100 / 9. 16.100 libswscale 7. 6.100 / 7. 6.100 libswresample 4. 13.100 / 4. 13.100 libpostproc 57. 4.100 / 57. 4.100 -vsync is deprecated. Use -fps_mode [mxf @ 0x7f9dfab04500] Stream #0: not enough frames to estimate rate; consider increasing probesize [aist#0:1/pcm_s24le @ 0x7f9dd9f04b80] Guessed Channel Layout: stereo Input #0, mxf, from '/Volumes/A029/T203/00015.MXF': Metadata: operational_pattern_ul: 060e2b34.04010101.0d010201.01010900 uid : adab4424-2f25-4dc7-92ff-000c00000000 generation_uid : adab4424-2f25-4dc7-92ff-000c00000001 company_name : FFmpeg product_name : OP1a Muxer product_version_num: 60.20.100.0.0 product_version : 60.20.100 application_platform: Lavf (darwin) product_uid : adab4424-2f25-4dc7-92ff-29bd000c0002 toolkit_version_num: 60.20.100.0.0 material_package_umid: 0x060A2B340101010501010D0013AA87EC5294713403AA87EC005294713403AA00 timecode : 00:09:50:00 Duration: 00:00:44.00, start: 0.000000, bitrate: 2051728 kb/s Stream #0:0: Video: h264 (High 10), yuv420p10le(tv, bt709, progressive), 4096x2160 [SAR 1:1 DAR 256:135], 60 tbr, 60 tbn Metadata: file_package_umid: 0x060A2B340101010501010D0013AA87EC5294713403AA87EC005294713403AA01 Stream #0:1: Audio: pcm_s24le, 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s Metadata: file_package_umid: 0x060A2B340101010501010D0013AA87EC5294713403AA87EC005294713403AA01 Multiple -r options specified for stream 0, only the last option '-r 60/1' will be used. **Incompatible pixel format 'yuv444p12le' for codec 'prores', auto-selecting format 'yuv444p10le'** Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> prores (native)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help Output #0, mxf, to '/Volumes/A029/T203/00015-1.MXF': Metadata: operational_pattern_ul: 060e2b34.04010101.0d010201.01010900 uid : adab4424-2f25-4dc7-92ff-000c00000000 generation_uid : adab4424-2f25-4dc7-92ff-000c00000001 product_uid : adab4424-2f25-4dc7-92ff-29bd000c0002 material_package_umid: 0x060A2B340101010501010D0013AA87EC5294713403AA87EC005294713403AA00 product_version_num: 60.20.100.0.0 toolkit_version_num: 60.20.100.0.0 application_platform: Lavf (darwin) timecode : 00:09:50:00 encoder : Lavf60.20.100 Stream #0:0: Video: prores (XQ) (ap4x / 0x78347061), yuv444p10le(tv, bt709, progressive), 4096x2160 [SAR 1:1 DAR 256:135], q=2-31, 200 kb/s, 60 fps, 60 tbn Metadata: file_package_umid: 0x060A2B340101010501010D0013AA87EC5294713403AA87EC005294713403AA01 encoder : Lavc60.36.100 prores Stream #0:1: Audio: pcm_s24le, 48000 Hz, stereo, s32 (24 bit), 2304 kb/s Metadata: file_package_umid: 0x060A2B340101010501010D0013AA87EC5294713403AA87EC005294713403AA01 frame= 4 fps=2.0 q=-0.0 size= 19968kB time=00:00:00.06 bitrate=2453655.6kbiframe= 8 fps=3.2 q=-0.0 size= 39936kB time=00:00:00.13 bitrate=2453674.0kbiframe= 12 fps=4.0 q=-0.0 size= 55040kB time=00:00:00.20 bitrate=2254438.4kbiframe= 17 fps=4.8 q=-0.0 size= 80128kB time=00:00:00.28 bitrate=2316738.9kbiframe= 26 fps=6.5 q=-0.0 size= 125440kB time=00:00:00.43 bitrate=2371396.8kbiframe= 29 fps=6.4 q=-0.0 size= 145664kB time=00:00:00.48 bitrate=2468855.8kbiframe= 39 fps=7.8 q=-0.0 size= 193024kB time=00:00:00.65 bitrate=2432696.3kbiframe= 44 fps=8.0 q=-0.0 size= 220416kB time=00:00:00.73 bitrate=2462248.2kbiframe= 54 fps=9.0 q=-0.0 size= 272896kB time=00:00:00.90 bitrate=2483960.0kbiframe= 59 fps=9.1 q=-0.0 size= 297984kB time=00:00:00.98 bitrate=2482460.1kbiframe= 65 fps=9.3 q=-0.0 size= 328192kB time=00:00:01.08 bitrate=2481738.2kbiframe= 74 fps=9.8 q=-0.0 size= 373504kB time=00:00:01.23 bitrate=2480874.8kbiframe= 79 fps=9.8 q=-0.0 size= 398592kB time=00:00:01.31 bitrate=2479948.0kbiframe= 88 fps= 10 q=-0.0 size= 443904kB time=00:00:01.46 bitrate=2479405.1kbiframe= 92 fps= 10 q=-0.0 size= 463872kB time=00:00:01.53 bitrate=2478287.1kbiframe= 103 fps= 11 q=-0.0 size= 519168kB time=00:00:01.71 bitrate=2477489.4kbiframe= 108 fps= 11 q=-0.0 size= 544512kB time=00:00:01.80 bitrate=2478134.6kbiframe= 114 fps= 11 q=-0.0 size= 574720kB time=00:00:01.90 bitrate=2477950.7kbiframe= 122 fps= 11 q=-0.0 size= 615168kB time=00:00:02.03 bitrate=2478421.5kbiframe= 128 fps= 11 q=-0.0 size= 645376kB time=00:00:02.13 bitrate=2478244.2kbiframe= 138 fps= 11 q=-0.0 size= 699136kB time=00:00:02.30 bitrate=2490140.0kbiframe= 141 fps= 11 q=-0.0 size= 714496kB time=00:00:02.35 bitrate=2490702.7kbiframe= 147 fps= 11 q=-0.0 size= 744704kB time=00:00:02.45 bitrate=2490047.0kbiframe= 154 fps= 11 q=-0.0 size= 779776kB time=00:00:02.56 bitrate=2488801.6kbiframe= 160 fps= 11 q=-0.0 size= 809984kB time=00:00:02.66 bitrate=2488270.5kbiframe= 170 fps= 12 q=-0.0 size= 860416kB time=00:00:02.83 bitrate=2487716.0kbiframe= 176 fps= 12 q=-0.0 size= 890624kB time=00:00:02.93 bitrate=2487270.2kbiframe= 184 fps= 12 q=-0.0 size= 930816kB time=00:00:03.06 bitrate=2486492.6kbiframe= 189 fps= 12 q=-0.0 size= 955904kB time=00:00:03.15 bitrate=2485957.3kbiframe= 195 fps= 12 q=-0.0 size= 986112kB time=00:00:03.25 bitrate=2485609.1kbiframe= 202 fps= 12 q=-0.0 size= 1021952kB time=00:00:03.36 bitrate=2486682.2kbiframe= 208 fps= 12 q=-0.0 size= 1053952kB time=00:00:03.46 bitrate=2490569.4kbiframe= 218 fps= 12 q=-0.0 size= 1107712kB time=00:00:03.63 bitrate=2497535.1kbiframe= 223 fps= 12 q=-0.0 size= 1133312kB time=00:00:03.71 bitrate=2497961.7kbiframe= 234 fps= 12 q=-0.0 size= 1188608kB time=00:00:03.90 bitrate=2496686.3k ...
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (3)
follow-up: 2 comment:1 by , 4 months ago
comment:2 by , 4 months ago
Replying to Balling:
Dup of #8054
But in #8054, nobody tells the composer how to solve this problem.
The ONE SOLUTION is to do a workaround to encode as something else fighting with a time-wasting encoder like libopenjpeg which supports 12-BIT YUV OR RGB. This time-wasting workaround is NOT and definitely SHOULD NOT included in my film-process work.
And the OTHER SOLUTION is to make a VERY HUGE FILE of a few TBs with a no-time-wasting encoder like RGB 12-BIT DPX, with a no-need cost of several Seagate EXOS hard disks.
this is the two possible workaround to maintain original 12-BIT RGB OR YUV IMAGE:
- % ffmpeg -c:v prores -i input.mxf -c:v libopenjpeg -pix_fmt yuv444p12le -f mxf output.mxf
-- a time-wasting encoder but the output file will be highly compressed
- % ffmpeg -c:v prores -i input.mxf -c:v dpx -pix_fmt gbrp12le -f image2 output.%06d.dpx
-- a no-time-wasting encoder but the output file will be a few TBs, requires the cost of an extra hard disk.
comment:3 by , 3 months ago
Priority: | critical → normal |
---|
This does not appear to have anything to do with MXF. Try using the HT (high-throughput) mode in libopenjpeg. I forget whether lavc's native encoder has support for high-bitdepth HTJ2K. Also I don't think this should be marked as "critical".
Dup of #8054