[FFmpeg-user] Questions about readout important metadata from DPX files ("logarthmic/linear") and recreate DPX with same metadata

Christoph Gerstbauer christophgerstbauer at gmail.com
Mon Mar 9 13:30:21 CET 2015


Hello

I am testing longterm archiving of DPX sequences with ffv1. (DPX 
encoding to FFV1 and recreating DPX from the FFV1 archivemaster)

As far as I tested I can say (for the ffv1-supported pixelformats 
"gbrp10le" and "gbrp12le") it works lossless. All FrameMD5s are equal:

Original DPX (RGB 10bit log,  pix_fmt=gbrp10le)
-> transcoded to ffv1 - FrameMD5 OK (pix_fmt=gbrp10le)
-> transcode back to DPX (gbrp10le) but LINEAR, not logarthmic (I have 
no idea how to save metadata "logarthmic" into DPX) - FrameMD5 OK

Now I have a problem with the lost metadata of interpretation of the RGB 
values.
The Original has LOGARITHMIC 10bit (RGB 10bit log), the ffmpeg created 
DPX has LINEAR 10bit (RGB 10bit) as can be seen here:

Original DPX:

C:\Users\gersti>mediainfo "I:\DPX\_DPX examples\ARRI SCAN\LOG_ORIGINAL.dpx"
General
Complete name                            : I:\DPX\_DPX examples\ARRI 
SCAN\LOG_ORIGINAL.dpx
Format                                   : DPX
Format version                           : Version 2
File size                                : 25.3 MiB
Encoded date                             : 2011:06:03:19:25:40+10
Writing library                          : ARRISCAN084

Image
Format                                   : DPX
Format version                           : Version 2
Width                                    : 3 072 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 1.422
Bit depth                                : 10 bits
Compression mode                         : Lossless
Stream size                              : 25.3 MiB (100%)
Writing library                          : ARRISCAN084
Encoded date                             : 2011:06:03:19:25:40+10
Color primaries                          : Logarithmic


Recreated DPX:

C:\Users\gersti>mediainfo "I:\DPX\_DPX examples\ARRI 
SCAN\LOG_ORIGINAL_To_FFv1_to_DPX.dpx"
General
Complete name                            : I:\DPX\_DPX examples\ARRI 
SCAN\LOG_ORIGINAL_To_FFv1_to_DPX.dpx
Format                                   : DPX
Format version                           : Version 2
File size                                : 25.3 MiB
Writing library                          : Lavc56.13.100

Image
Format                                   : DPX
Format version                           : Version 2
Width                                    : 3 072 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 1.422
Bit depth                                : 10 bits
Compression mode                         : Lossless
Stream size                              : 25.3 MiB (100%)
Writing library                          : Lavc56.13.100
Color primaries                          : Linear


Therefore my questions are:

1.) How can I read out the "logarthmic" or "linear" metadata information 
with ffprobe?
ffprobes "-show_streams", "-show_format"  or "-show_frames" shows me 
nothing I can use:
     color_space=unknown (should this be RGB at gbrp10le?)
     color_transfer=unknown
     color_primaries=unknown (should this be "logarithmic" or "linear" 
like in the mediainfo information block?)
used ffmpeg version:
ffmpeg version 2.5.4 Copyright (c) 2000-2015 the FFmpeg developers
built on Feb 16 2015 15:15:26 with gcc 4.8 (GCC)



2.) If ffmpeg is able to read out this information from the original DPX 
how can I save it back into the recreated DPX?
     Maybe with -color_primaries <value>?

3.) How can I read out the DPX Version information like mediainfo does? 
(Version 2)

Thanks for your help!

Best Regards
Christoph



More information about the ffmpeg-user mailing list