cth103 / libdcp

Library for reading and writing Digital Cinema Packages (DCPs).
GNU General Public License v2.0
22 stars 11 forks source link

Suggestion on support writing Dolby EDR metadata into CPLs #12

Closed izwb003 closed 5 months ago

izwb003 commented 5 months ago

Hi Carl, this issue is a enhancement suggestion because I know in some cases it will be useful.

According to ST 429-16:2014, CPLs can have additional composition metadatas like luminance, soundconfiguration, subtitlelanguagelist, etc. In cpl.h I can see that most of these information can be written into CPLs by using libdcp. However, it did not provide a universal method to write ExtensionMetadata data, defined in ST 429-16:2014 4.4.2.15. I'm sure that libdcp can write such a data because the Bv2.1 label (defined in RDD52:2020) like this:

<cpl-meta:ExtensionMetadata scope="http://isdcf.com/ns/cplmd/app"> 
 <cpl-meta:Name>Application</cpl-meta:Name> 
 <cpl-meta:PropertyList> 
 <cpl-meta:Property> 
 <cpl-meta:Name>DCP Constraints Profile</cpl-meta:Name> 
 <cpl-meta:Value>SMPTE-RDD-52:2020-Bv2.1</cpl-meta:Value> 
 </cpl-meta:Property> 
 </cpl-meta:PropertyList> 
</cpl-meta:ExtensionMetadata>

and the sign-language video language label like this:

<ExtensionMetadata scope="http://isdcf.com/2017/10/SignLanguageVideo"> 
 <Name>Sign Language Video</Name> 
 <PropertyList> 
 <Property> 
 <Name>Language Tag</Name> 
 <Value>DESCRIPTION</Value> 
 </Property> 
 </PropertyList> 
</ExtensionMetadata>

are all this kind of data, and libdcp can write them. What I know is, for Dolby Vision DCPs played in Dolby Cinema, it also uses this kind of data to write a Dolby EDR metadata like this into the CPL:

<cpl-meta:ExtensionMetadata scope="http://www.dolby.com/schemas/2014/EDR-Metadata">
 <cpl-meta:Name>Dolby EDR</cpl-meta:Name>
 <cpl-meta:PropertyList>
 <cpl-meta:Property>
 <cpl-meta:Name>image transfer function</cpl-meta:Name> 
 <cpl-meta:Value>PQ10K</cpl-meta:Value>
 </cpl-meta:Property>
 </cpl-meta:PropertyList>
</cpl-meta:ExtensionMetadata>

As Dolby will make more theaters available in Dolby Vision, I believe if libdcp can provide a method like CPL::set_dolby_edr_metadata(), or a universal CPL::add_extensionmetadata() for some other applications, it will be very helpful. If necessary I can provide an example CPL file. Thank you for your hard work.

cth103 commented 5 months ago

Hi, good idea, I added support for the Dolby EDR tag on the main branch.

izwb003 commented 5 months ago

Hi, good idea, I added support for the Dolby EDR tag on the main branch.

That's amazing! Would you consider making this option an experimental feature into DCP o-matic? Thank you.

cth103 commented 5 months ago

You mean just adding the metadata, or something more complicated?

izwb003 commented 5 months ago

You mean just adding the metadata, or something more complicated?

I think it will be great if experimental features are enabled, then make a checkbox about this, like '''"[]Mark the DCP as Dolby Vision"''' at somewhere. If checked then write this to the CPL otherwise not.

Then people who really needs that can simply turn it on by clicking on it. I don't think something more complicated like trimming to 108nit can be handled by DCP-o-matic correctly - that's what users should do.

izwb003 commented 5 months ago

Also I have to mention that according to ISDCF DCNC, Dolby Vision DCPs have a mark -DVis at the second string of the DCP's name. If you accept to add it please consider to edit the ISDCF naming of the DCP as well. Thanks!

cth103 commented 5 months ago

Sounds reasonable! I added it to the main tracker here: https://dcpomatic.com/bugs/view.php?id=2799

izwb003 commented 5 months ago

Sounds reasonable! I added it to the main tracker here: https://dcpomatic.com/bugs/view.php?id=2799

Thank you for considering that! I will close this issue then.