#7163 closed enhancement (fixed)
12-bit ProRes not supported
Reported by: | Elliott | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avcodec |
Version: | git-master | Keywords: | prores |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Apple Prores 444 and 444 XQ can be either 10-bit or 12-bit, but I believe ffmpeg always decodes as 10-bit. For example, this console output shows the image as yuv444p10le. Arri claims that this file is 12-bit. Sample files such as this can be downloaded here: http://www.arri.com/camera/alexa/learn/alexa_sample_footage
In source code proresdsp.h, I see this line:
#define PRORES_BITS_PER_SAMPLE 10 ///< output precision of prores decoder
https://images.apple.com/support/finalcutpro/docs/Apple-ProRes-White-Paper-July-2009.pdf
$ ffmpeg -i /Scratch/sample\ footage/Alexa\ LogC/M001C007_161207_R00H.mov ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.39.2) configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-indev=jack --enable-opencl --disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox --enable-sdl2 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-x86asm --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac libavutil 56. 12.100 / 56. 12.100 libavcodec 58. 15.100 / 58. 15.100 libavformat 58. 10.100 / 58. 10.100 libavdevice 58. 2.100 / 58. 2.100 libavfilter 7. 13.100 / 7. 13.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 0.102 / 5. 0.102 libswresample 3. 0.101 / 3. 0.101 libpostproc 55. 0.100 / 55. 0.100 Guessed Channel Layout for Input Stream #0.1 : 5.0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Scratch/sample footage/Alexa LogC/M001C007_161207_R00H.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt ARRI creation_time : 2016-12-07T15:18:41.000000Z com.apple.finalcutstudio.media.uuid: 4AC6826A-0538-4BCC-A0B0-11F520AC11C9 com.arri.camera.CameraId: R00H com.arri.camera.CameraIndex: M com.arri.camera.CameraModel: ARRI ALEXA Mini com.arri.camera.CameraSerialNumber: 20017 com.arri.camera.ColorGammaSxS: LOG-C com.arri.camera.ExposureIndexAsa: 800 com.arri.camera.LookFileBurnedIn: No com.arri.camera.ProductionInfoOperator: GHI com.arri.camera.NdFilterDensity: 1200 com.arri.camera.NdFilterType: 1 com.arri.camera.ProductionInfoCinematographer: DEF com.arri.camera.ProductionInfoDirector: ABC com.arri.camera.ProductionInfoLocation: BOTMUC com.arri.camera.ProductionInfoProduction: ARRI com.arri.camera.ProductionInfoUser1: com.arri.camera.ProductionInfoUser2: com.arri.camera.ProjectFps: 24000 com.arri.camera.ReelName: M001R00H com.arri.camera.SensorFps: 24000 com.arri.camera.ShutterAngle: 1728 com.arri.camera.SoundReel: com.arri.camera.SupVersion: 4.02.05 com.arri.camera.SxsSerialNumber: 141101300018 com.arri.camera.UserDate: 20161207 com.arri.camera.UserTime: 15h18m41 com.arri.camera.WhiteBalanceKelvin: 5600 com.arri.camera.WhiteBalanceTintCc: 0 com.arri.camera.CameraClipName: M001C007_161207_R00H.mov com.arri.camera.Product: 2 com.arri.camera.SubProduct: 1 com.arri.camera.look.name: ARRI 709.AML com.arri.camera.look.user_lut: 0 com.apple.proapps.color.asc-cdl: com.arri.camera.look.lut3d: com.arri.camera.look.lut3d_with_cdl: com.arri.camera.look.video_param_with_target_colorspace: com.arri.camera.ProductionInfoCompany: ARRITEST com.arri.camera.SceneName: com.arri.camera.TakeName: com.arri.camera.audio.Configuration: com.arri.camera.LensSerialNumber: 0 com.arri.camera.LensType: com.arri.camera.UnitPreference: Metric com.arri.camera.WbTracking: 0 com.arri.camera.ImageOrientation: 0 com.arri.camera.ImageSharpness: 0 com.arri.camera.ImageDetail: 0 com.arri.camera.ImageDenoising: 0 com.arri.camera.DynamicMetadataVersion: 65536 com.arri.camera.audio.BluetoothEnabled: 0 com.arri.camera.sensor.PhotoSites: 2560x2145 com.arri.camera.PixelAspectRatio: 0.000000 com.arri.camera.FramelineFileName1: ARRI 6by5 1.78 Scope 2x com.arri.camera.FramelineRect1A.Name: 1.78:1anamorphic2x_scaling100% com.arri.camera.FramelineRect1A.Left: 261 com.arri.camera.FramelineRect1A.Top: 0 com.arri.camera.FramelineRect1A.Width: 1525 com.arri.camera.FramelineRect1A.Height: 858 com.arri.camera.FramelineRect1A.Type: 1 timecode : 01:55:44:01 Duration: 00:00:10.13, start: 0.000000, bitrate: 283348 kb/s Stream #0:0(eng): Video: prores (ap4x / 0x78347061), yuv444p10le(bt709, progressive), 2048x858, 271534 kb/s, SAR 1:1 DAR 1024:429, 24 fps, 24 tbr, 24 tbn, 24 tbc (default) Metadata: creation_time : 2016-12-07T15:18:41.000000Z handler_name : ?Apple Alias Data Handler encoder : Apple ProRes 4444 (XQ) Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 5.0, s32 (24 bit), 5760 kb/s (default) Metadata: creation_time : 2016-12-07T15:18:41.000000Z handler_name : ?Apple Alias Data Handler Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default) Metadata: creation_time : 2016-12-07T15:18:41.000000Z handler_name : ?Apple Alias Data Handler reel_name : M001R00H timecode : 01:55:44:01 At least one output file must be specified
Attachments (7)
Change History (33)
comment:1 by , 6 years ago
Keywords: | prores added |
---|---|
Priority: | normal → wish |
Resolution: | → needs_more_info |
Status: | new → closed |
by , 6 years ago
Attachment: | DPX12_fromResolve_stretched.png added |
---|
by , 6 years ago
Attachment: | PR422_fromResolve_stretched.png added |
---|
by , 6 years ago
Attachment: | PR444_fromResolve_stretched.png added |
---|
by , 6 years ago
Attachment: | PR444_Resolve_ffmpeg_TIFF16_stretched.png added |
---|
by , 6 years ago
Attachment: | TIFF16_original_stretched.png added |
---|
by , 6 years ago
Attachment: | ResolvePR444full.mov added |
---|
comment:2 by , 6 years ago
Here is my test. I make a 16-bit TIFF in Photoshop with a gray ramp from RGB value 12850 to 15420. This makes the result easier to see than doing a full black to white ramp. This is 2570 code values in an image 1920 pixels wide, so it looks perfectly smooth on a waveform.
I import this TIFF to Resolve, and render three ways: Prores 444, Prores 422, and DPX 12 bit RGB, all using full-range levels. Then I bring those renders back into Resolve and I stretch the contrast out so this gray section fills the whole waveform.
Now in the Prores 422, I count 80 code values in the waveform, which is exactly what I would expect for 10-bit precision. The PR444 and the DPX look nearly identical. I expect there to be 320 steps, but I’m not going to count them all. The PR444 looks a bit smoother due to dithering. This proves that the Prores 444 is 12-bit.
With ffmpeg, I convert the PR444 to 16-bit TIFF. I bring this TIFF into Resolve, and stretch the contrast, and here I count 80 steps in the waveform. This proves that ffmpeg is decoding the PR444 using 10-bit precision.
I have attached screenshots of each waveform. The original TIFF is too large to upload here, but I included the PR444 rendered from Resolve, which you can use to replicate my test.
$ ffmpeg -i ResolvePR444full.mov -pix_fmt rgb48le PR444full_ffmpeg16b.tif ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers built with Apple LLVM version 9.1.0 (clang-902.0.39.1) configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-indev=jack --enable-opencl --disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox --enable-sdl2 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-x86asm --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac libavutil 56. 12.100 / 56. 12.100 libavcodec 58. 15.100 / 58. 15.100 libavformat 58. 10.100 / 58. 10.100 libavdevice 58. 2.100 / 58. 2.100 libavfilter 7. 13.100 / 7. 13.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 0.102 / 5. 0.102 libswresample 3. 0.101 / 3. 0.101 libpostproc 55. 0.100 / 55. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ResolvePR444full.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2018-04-25T22:00:22.000000Z Duration: 00:00:00.04, start: 0.000000, bitrate: 9062 kb/s Stream #0:0(und): Video: prores (ap4h / 0x68347061), yuv444p10le(bt709/bt709/bt470m, progressive), 1920x1080, 8788 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24 tbn, 24 tbc (default) Metadata: creation_time : 2018-04-25T22:00:22.000000Z handler_name : Core Media Data Handler encoder : Apple ProRes 4444 timecode : 01:00:01:04 Stream #0:1(und): Data: none (tmcd / 0x64636D74), 0 kb/s (default) Metadata: creation_time : 2018-04-25T22:00:22.000000Z handler_name : Core Media Data Handler timecode : 01:00:01:04 File 'PR444full_ffmpeg16b.tif' already exists. Overwrite ? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> tiff (native)) Press [q] to stop, [?] for help Output #0, image2, to 'PR444full_ffmpeg16b.tif': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt encoder : Lavf58.10.100 Stream #0:0(und): Video: tiff, rgb48le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 24 fps, 24 tbn, 24 tbc (default) Metadata: creation_time : 2018-04-25T22:00:22.000000Z handler_name : Core Media Data Handler timecode : 01:00:01:04 encoder : Lavc58.15.100 tiff frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.352x video:12129kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
comment:3 by , 6 years ago
Resolution: | needs_more_info |
---|---|
Status: | closed → reopened |
by , 6 years ago
Attachment: | SMPTE ProRes rdd36-2015.pdf added |
---|
ProRes Bitstream Syntax and Decoding Process
comment:4 by , 6 years ago
Apparently it's impossible to detect the bit depth of a ProRes file, so we should have a command-line option to switch between 10 and 12. It would make sense to default to 10 for 4:2:2 sources and 12 for 4:4:4 sources, since that is how these formats are commonly used.
comment:5 by , 6 years ago
So the ffmpeg-user thread is no longer active, but does it look like from this testing by spookybathtub that these really are 12-bit files?
comment:7 by , 6 years ago
Here is unfinished patch, need to add 12-bit alpha:
https://pastebin.com/mYNJkdMH
comment:8 by , 6 years ago
Thanks for your work on this. Since there is no way to identify Prores bit depth by reading a metadata flag, I suggest to always decode Prores 444 as 12-bit by default, unless the user chooses 10-bit with a command-line flag to improve speed. Prores 422 can remain as 10-bit.
Keep in mind the alpha channel should be 16 bits. Although I have personally never seen a Prores file with alpha.
comment:9 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Version: | unspecified → git-master |
Fixed by Martin Vignali and Kieran Kunhya in ffafa53dbf06c8967aada9b7c0fc7ef9cb374fc0
Thank you for the particularly useful report!
comment:10 by , 4 years ago
FFMPEG still decodes all Arri ProRes 12 bit footage as 10 bit.
Sample footage for ProRes can be downloaded here:
https://www.arri.com/en/learn-help/learn-help-camera-system/camera-sample-footage
comment:11 by , 4 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:12 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I download random file and it is 12bit.
comment:13 by , 4 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
ffmpeg -i ./J001C012_140110_R6MS.mov ffmpeg version 4.1.4-1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared WARNING: library configuration mismatch avcodec configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-liblensfun --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './J001C012_140110_R6MS.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt ARRI creation_time : 2014-01-10T11:36:15.000000Z com.apple.finalcutstudio.media.uuid: 6b48b927-0000-4000-852e-964500000000 com.arri.camera.CameraClipName: J001C012_140110_R6MS com.arri.camera.CameraId: R6MS com.arri.camera.CameraIndex: J com.arri.camera.CameraModel: Alexa Plus 4:3 XT com.arri.camera.CameraSerialNumber: 8596 com.arri.camera.ClmEncFocusMax: 0 com.arri.camera.ClmEncFocusMin: 0 com.arri.camera.ClmEncIrisMax: 0 com.arri.camera.ClmEncIrisMin: 0 com.arri.camera.ClmEncZoomMax: 0 com.arri.camera.ClmEncZoomMin: 0 com.arri.camera.ColorGammaSxS: LOG-C com.arri.camera.DynamicMetadataVersion: 3 com.arri.camera.ExposureIndexAsa: 800 com.arri.camera.EyeIndex: SINGLE com.arri.camera.LdsEncFocusMax: 10628 com.arri.camera.LdsEncFocusMin: 901 com.arri.camera.LdsEncIrisMax: 3629 com.arri.camera.LdsEncIrisMin: 2345 com.arri.camera.LdsEncZoomMax: 5390 com.arri.camera.LdsEncZoomMin: 1553 com.arri.camera.LensSerialNumber: 13410 com.arri.camera.LensType: Fujinon Alura AZ30-80 T2.8 com.arri.camera.LookFileActive: ARRI LCC com.arri.camera.LookFileBurnedIn: No com.arri.camera.LookFileXml: <!-- ARRI Digital Camera Look File --> : <!-- This XML format is used to import color settings into the : camera("look file")--> : <adicam version="1.0" camera="alexa"> : : <Saturation> : <!-- A value from 0.0 to 2.0 --> : 1.000000 : </Saturation> : : <PrinterLight> : <!-- Offsets applied to Log C data --> : <!-- Three values from -1.0 to 1.0 --> : 0.000000 0.000000 0.000000 : </PrinterLight> : : <ToneMapLut rows="4096" cols="1"> : <!-- Tone mapping curve --> : <!-- 4096 values in the range from 0 to 4095 --> : [...] : </ToneMapLut> : : <SOPNode> : <!-- Three values each for R, G, and B --> : <Slope>1.000000 1.000000 1.000000</Slope> : <Offset>0.000000 0.000000 0.000000</Offset> : <Power>1.000000 1.000000 1.000000</Power> : </SOPNode> : : </adicam> com.arri.camera.MainVoltage: 277 com.arri.camera.MasterSlave: OFF com.arri.camera.MirrorShutterRunning: 0 com.arri.camera.NdFilterType: 0 com.arri.camera.OnBoardVoltage: 166 com.arri.camera.Product: 2 com.arri.camera.ProductionInfoCinematographer: The DP com.arri.camera.ProductionInfoCompany: The Company com.arri.camera.ProductionInfoDirector: The Director com.arri.camera.ProductionInfoLocation: somewhere com.arri.camera.ProductionInfoOperator: The Operator com.arri.camera.ProductionInfoProduction: Alexa Sample Footage com.arri.camera.ProductionInfoUser1: ProRes com.arri.camera.ProductionInfoUser2: misc Info 2 com.arri.camera.ProjectFps: 24000 com.arri.camera.ReelName: J001R6MS com.arri.camera.SceneName: Scene X com.arri.camera.SensorFps: 24000 com.arri.camera.ShutterAngle: 1728 com.arri.camera.SoundReel: The Sound com.arri.camera.SubProduct: 5 com.arri.camera.SupVersion: AlexaX_9.0:25486 com.arri.camera.SxsSerialNumber: E240CF1C420631 com.arri.camera.TakeName: Take Y com.arri.camera.TempAcomBoard: 565 com.arri.camera.TempAcomFpga: 622 com.arri.camera.TempAlogBoard: 571 com.arri.camera.TempAlogFpga: 615 com.arri.camera.TempApicBoard: 562 com.arri.camera.TempApicFpga: 635 com.arri.camera.TempSensor: 350 com.arri.camera.UnitPreference: Imperial com.arri.camera.UserDate: 20140110 com.arri.camera.UserPixelMasking: Off com.arri.camera.UserTime: 11h36m14s com.arri.camera.WhiteBalanceKelvin: 5600 com.arri.camera.WhiteBalanceTintCc: 0 timecode : 01:38:04:15 Duration: 00:00:11.04, start: 0.000000, bitrate: 224138 kb/s Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(tv, GBR, progressive), 1920x1080, 182692 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24 tbn, 24 tbc (default) Metadata: creation_time : 2014-01-10T11:36:15.000000Z handler_name : Apple Video Media Handler encoder : Apple ProRes 422 (HQ) Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default) Metadata: creation_time : 2014-01-10T11:36:15.000000Z handler_name : Apple Sound Media Handler Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default) Metadata: creation_time : 2014-01-10T11:36:15.000000Z handler_name : Time Code Media Handler reel_name : J001R6MS timecode : 01:38:04:15
Could be a version issue, but it clearly shows it as 10 bit via the yuv422p10le.
This could be due to being erroneously detected as 422, when all of the Arri Alexa samples in ProRes are in fact 444.
comment:14 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Please consider to test current FFmpeg git head, the only version supported here, before reporting any issue.
comment:15 by , 4 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Compiled against current master hash (7104c4dd88078266492b756b3422e4e516bde878):
ffmpeg version N-97224-g7104c4dd88 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libx264 --enable-pthreads --extra-libs='-lpthread -lm' --prefix=/home/aphorism/Develop/Build/ffmpeg-build --extra-cflags=-I/home/aphorism/Develop/Build/ffmpeg-build/include --extra-ldflags=-L/home/aphorism/Develop/Build/ffmpeg-build/lib --bindir=/home/aphorism/Develop/Build/ffmpeg-build/bin libavutil 56. 42.102 / 56. 42.102 libavcodec 58. 77.101 / 58. 77.101 libavformat 58. 42.100 / 58. 42.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 77.101 / 7. 77.101 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/aphorism/Videos/Footage/J001C012_140110_R6MS.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt ARRI creation_time : 2014-01-10T11:36:15.000000Z com.apple.finalcutstudio.media.uuid: 6b48b927-0000-4000-852e-964500000000 com.arri.camera.CameraClipName: J001C012_140110_R6MS com.arri.camera.CameraId: R6MS com.arri.camera.CameraIndex: J com.arri.camera.CameraModel: Alexa Plus 4:3 XT com.arri.camera.CameraSerialNumber: 8596 com.arri.camera.ClmEncFocusMax: 0 com.arri.camera.ClmEncFocusMin: 0 com.arri.camera.ClmEncIrisMax: 0 com.arri.camera.ClmEncIrisMin: 0 com.arri.camera.ClmEncZoomMax: 0 com.arri.camera.ClmEncZoomMin: 0 com.arri.camera.ColorGammaSxS: LOG-C com.arri.camera.DynamicMetadataVersion: 3 com.arri.camera.ExposureIndexAsa: 800 com.arri.camera.EyeIndex: SINGLE com.arri.camera.LdsEncFocusMax: 10628 com.arri.camera.LdsEncFocusMin: 901 com.arri.camera.LdsEncIrisMax: 3629 com.arri.camera.LdsEncIrisMin: 2345 com.arri.camera.LdsEncZoomMax: 5390 com.arri.camera.LdsEncZoomMin: 1553 com.arri.camera.LensSerialNumber: 13410 com.arri.camera.LensType: Fujinon Alura AZ30-80 T2.8 com.arri.camera.LookFileActive: ARRI LCC com.arri.camera.LookFileBurnedIn: No com.arri.camera.LookFileXml: <!-- ARRI Digital Camera Look File --> : <!-- This XML format is used to import color settings into the : camera("look file")--> : <adicam version="1.0" camera="alexa"> : : <Saturation> : <!-- A value from 0.0 to 2.0 --> : 1.000000 : </Saturation> : : <PrinterLight> : <!-- Offsets applied to Log C data --> : <!-- Three values from -1.0 to 1.0 --> : 0.000000 0.000000 0.000000 : </PrinterLight> : : <ToneMapLut rows="4096" cols="1"> : <!-- Tone mapping curve --> : <!-- 4096 values in the range from 0 to 4095 --> [...] : </ToneMapLut> : : <SOPNode> : <!-- Three values each for R, G, and B --> : <Slope>1.000000 1.000000 1.000000</Slope> : <Offset>0.000000 0.000000 0.000000</Offset> : <Power>1.000000 1.000000 1.000000</Power> : </SOPNode> : : </adicam> com.arri.camera.MainVoltage: 277 com.arri.camera.MasterSlave: OFF com.arri.camera.MirrorShutterRunning: 0 com.arri.camera.NdFilterType: 0 com.arri.camera.OnBoardVoltage: 166 com.arri.camera.Product: 2 com.arri.camera.ProductionInfoCinematographer: The DP com.arri.camera.ProductionInfoCompany: The Company com.arri.camera.ProductionInfoDirector: The Director com.arri.camera.ProductionInfoLocation: somewhere com.arri.camera.ProductionInfoOperator: The Operator com.arri.camera.ProductionInfoProduction: Alexa Sample Footage com.arri.camera.ProductionInfoUser1: ProRes com.arri.camera.ProductionInfoUser2: misc Info 2 com.arri.camera.ProjectFps: 24000 com.arri.camera.ReelName: J001R6MS com.arri.camera.SceneName: Scene X com.arri.camera.SensorFps: 24000 com.arri.camera.ShutterAngle: 1728 com.arri.camera.SoundReel: The Sound com.arri.camera.SubProduct: 5 com.arri.camera.SupVersion: AlexaX_9.0:25486 com.arri.camera.SxsSerialNumber: E240CF1C420631 com.arri.camera.TakeName: Take Y com.arri.camera.TempAcomBoard: 565 com.arri.camera.TempAcomFpga: 622 com.arri.camera.TempAlogBoard: 571 com.arri.camera.TempAlogFpga: 615 com.arri.camera.TempApicBoard: 562 com.arri.camera.TempApicFpga: 635 com.arri.camera.TempSensor: 350 com.arri.camera.UnitPreference: Imperial com.arri.camera.UserDate: 20140110 com.arri.camera.UserPixelMasking: Off com.arri.camera.UserTime: 11h36m14s com.arri.camera.WhiteBalanceKelvin: 5600 com.arri.camera.WhiteBalanceTintCc: 0 timecode : 01:38:04:15 Duration: 00:00:11.04, start: 0.000000, bitrate: 224138 kb/s Stream #0:0(eng): Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, GBR, progressive), 1920x1080, 182692 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24 tbn, 24 tbc (default) Metadata: creation_time : 2014-01-10T11:36:15.000000Z handler_name : Apple Video Media Handler encoder : Apple ProRes 422 (HQ) Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default) Metadata: creation_time : 2014-01-10T11:36:15.000000Z handler_name : Apple Sound Media Handler Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default) Metadata: creation_time : 2014-01-10T11:36:15.000000Z handler_name : Time Code Media Handler reel_name : J001R6MS timecode : 01:38:04:15
Still flagged incorrectly as yuv422p10le it seems.
comment:17 by , 4 years ago
Alexa XT ProRes samples:
https://arriwebgate.com/en/directlink/51bfeb7a32fa6e8a
Specific file is:
https://arriwebgate.com/directlink/51bfeb7a32fa6e8a/995808
Not sure if the paths are dynamically created. Here is the sample footage entry point:
https://www.arri.com/en/learn-help/learn-help-camera-system/camera-sample-footage
The file in question is an Alexa XT sample.
comment:18 by , 4 years ago
The file linked to is "J001C012_140110_R6MS.mov"
It's 10bit 422 Prores HQ
mediainfo
Format version : Version 0
Format profile : 422 HQ
Codec ID : apch
*If you need definitive proof, check with ARRI Meta Extract, it also confirms this
comment:19 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
follow-up: 21 comment:20 by , 4 years ago
Arri Meta Extract is not definitive proof. Neither is any other metadata reading tool, because there is no "bit depth" metadata flag to read in a ProRes QT. FFmpeg displays yuv422p10le not because it is "detected", rather it's the pixel format we choose to decode.
The patch for this ticket decodes 12-bit for ProRes 444 and XQ only. ProRes 422 sources are still decoded as 10-bit. I think the current behavior is mostly okay because 10-bit is typically adequate for ProRes 422 sources. I do recognize that it's possible to have 12-bit precision in a 422 file, and I have verified this myself with test patterns, but I very much doubt that you could tell the difference with real footage from a camera because of the signal-to-noise ratio.
From my perspective the current behavior is good enough. But it would be nice to have a flag for the user to choose 10 or 12 bit for all ProRes sources.
comment:21 by , 4 years ago
Replying to spookybathtub:
Arri Meta Extract is not definitive proof. Neither is any other metadata reading tool, because there is no "bit depth" metadata flag to read in a ProRes QT. FFmpeg displays yuv422p10le not because it is "detected", rather it's the pixel format we choose to decode.
I suppose it's not "definitive proof", but it's tagged fourcc "apch." This is Prores HQ 422. I suppose someone might have hex edited it for some reason, or a substituted a hacked firmware version in the camera, but that's getting pretty far fetched .
The Prores white paper says Prores HQ supports 10bit. It does not explicitly mention that 12 bit or 16 bit not supported by this profile, but that's certainly implied. It also says Prores 4444 supports up to 16bit , both RGB and YCbCr , and there are real samples of Prores 444 - just not the one linked to
follow-up: 23 comment:22 by , 4 years ago
I'm not disputing that this file is 422. I'm just saying it is theoretically possible for the 422 codec to contain 12-bit precision. From the whitepaper:
Like Apple ProRes 4444 XQ and Apple ProRes 4444, all Apple ProRes 422 codecs can in fact accept image samples even greater than 10 bits, although such high bit depths are rarely found among 4:2:2 or 4:2:0 video sources.
comment:23 by , 4 years ago
Replying to spookybathtub:
I'm not disputing that this file is 422. I'm just saying it is theoretically possible for the 422 codec to contain 12-bit precision. From the whitepaper:
Like Apple ProRes 4444 XQ and Apple ProRes 4444, all Apple ProRes 422 codecs can in fact accept image samples even greater than 10 bits, although such high bit depths are rarely found among 4:2:2 or 4:2:0 video sources.
Good point, but it's pretty ambiguous about "containing" -
Apple ProRes 422 codecs support up to 10-bit image sources... Like Apple ProRes 4444 XQ and Apple ProRes 4444, all Apple ProRes 422 codecs can in fact accept image samples even greater than 10 bits, although such high bit depths are rarely found among 4:2:2 or 4:2:0 video sources.
Does "can accept" indicate "supported" at that bit depth ? Or does that mean if you feed it 16bit YUV, it decodes from the native prores decoder at 16bits or 10bit ? eg. 8bit mpeg2 "can accept" 10bit data too, it just gets truncated to 8bits. To me, "support up to 10-bit" is critical phrasing. "up to" defines an upper limit
Have you ever seen authentic 12bit Prores 422 HQ?
follow-up: 25 comment:24 by , 4 years ago
Sorry, I misspoke before. I have edited my previous comment. I have not personally seen 12-bit 422 HQ. If someone has an Arri Alexa, they could try shooting some gradients with controlled lighting, to measure the banding difference between ProRes 422 vs ARRIRAW.
comment:25 by , 4 years ago
Replying to spookybathtub:
Sorry, I misspoke before. I have edited my previous comment. I have not personally seen 12-bit 422 HQ. If someone has an Arri Alexa, they could try shooting some gradients with controlled lighting, to measure the banding difference between ProRes 422 vs ARRIRAW.
Whether or not you "see" banding is going to depend on many factors, shooting conditions, how you debayer and process the raw, type of dithering etc... The noise from certified ProresHQ 422 is usually sufficient to conceal any banding under normal shooting conditions - and it's 10bit anyways. Not many 12 bit displays these days
If you're interested in testing Prores - the format itself - you should eliminate all the extraneous variables such as the camera, lighting, processing, out of the comparison. Arri just licenses the recording module codec from Apple
Use a certified prores vendor implementation on the list such as FCPX, Scratch, Resolve, etc.... Encode a 12bit gradient using Prores HQ 422 . Measure the output.
No doubt you can hack a format to make it do whatever. I'm saying I can't reproduce 12bit values with Prores HQ 422 on a certified prores implementation, either encoding or decoding , on a Mac or Windows - and I've checked a few certified programs. Unless something has changed recently, the format is always quantized to 10bits . If you test with a 12bit gradient, there are gaps in the data 4,8,12 etc.. But if you test 12bit Prores 4444 it's 4,5,6,7,8,9,10,11,12...
You can cross check the validity of the testing with other 10/12 bit formats like DNxHR. Same thing - 12bit works, but 10bit exhibits quantized gaps when feeding a 12bit source, as expected.
If you take a true 12bit Prores file, such as Prores 4444 (ap4h) ffmpeg decodes it as yuv444p12le. Alone, that does not necessarily mean anything. But if you examine the gradient using either the ffmpeg based decoder, or a certified prores decoder - it's smooth 4,5,6,7,8,9,10...
comment:26 by , 4 years ago
Apparently it's impossible to detect the bit depth of a ProRes file
What? We are not in HDMI, where it is the case for 4:2:2, for example, 10 bit and 12 bits consume the same amount of bandwidth, but could not you decode 12 bit and if it differs from 10 bit, it is actually 12 bits?? I mean...
Marketing documents are not helpful in this context.