Opened 2 years ago

Last modified 2 months ago

#8493 reopened enhancement

Allow setting mastering display metadata and content light level information in Quitcktime files

Reported by: hubner Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm trying encode a Quicktime file with HDR metadata.

I was able to set the color space, the color primaries, and the color transfer characteristics but it is not possible to set the mastering display metadata and the content light level information. I had a look at the code and it seems that in the mov decoder the information is already parsed from the file. However, in the mov encoder the atoms for these metadata are not written yet.

In #7756 a similar enhancement is requested but for HEVC instead of Quicktime.

Attachments (2)

MedioInfo_Comparison.JPG (202.2 KB ) - added by hubner 2 years ago.
ffmpeg-20200122-150846.log (12.0 KB ) - added by hubner 2 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 by Carl Eugen Hoyos, 2 years ago

Component: ffmpegavformat
Keywords: mov added; quicktime removed
Priority: normalwish

Please provide a sample input file (with the information requested) and the command line you tested together with the complete, uncut console output to make this a valid ticket.

by hubner, 2 years ago

Attachment: MedioInfo_Comparison.JPG added

comment:2 by hubner, 2 years ago

Unfortunately I don't have a sample file. All I've got is the comparison of the MediaInfo output from customers where they compare their files with the one I generate.

I don't use the command line to encode the mov file but use the FFmpeg dlls directly.

comment:3 by Carl Eugen Hoyos, 2 years ago

Please test if you can reproduce the issue with the command line utility or provide (simplified) source code that allows to reproduce.

by hubner, 2 years ago

Attachment: ffmpeg-20200122-150846.log added

comment:4 by hubner, 2 years ago

The command line equivalent what I'm doing at the moment looks like this:

ffmpeg -f lavfi -i testsrc -frames:v 100 -c:v prores_ks -pix_fmt yuv422p10 -profile:v standard -colorspace 9 -color_trc 16 -color_primaries 9 test.mov

The goal is to create a video with HDR10 color metadata. The colorspace, transfer characteristic, and the primaries can be already set using the command line or the libraries but at the moment there is no way of setting the other metadata (mastering display, content light level information).

comment:5 by hubner, 2 years ago

I checked the code and there are already structs (AVMasteringDisplayMetadata, AVContentLightMetadata) that can store the information I need but at the moment they are only used for matroska de- and encoding and HEVC decoding.
In version 4.1 the data were also parsed when decoding mov files but it seems that this was removed.

I think to be able to generate the file I need the mov encoder would have to write the clli and the mdcv atoms.

comment:6 by Carl Eugen Hoyos, 2 years ago

Please provide a sample file that contains the missing information.

in reply to:  4 comment:7 by gdgsdg123, 2 years ago

Replying to hubner:

The goal is to create a video with HDR10 color metadata.

Check this.

comment:8 by Carl Eugen Hoyos, 2 years ago

Resolution: needs_more_info
Status: newclosed

comment:9 by Carl Eugen Hoyos, 2 years ago

Resolution: needs_more_info
Status: closedreopened

Although I wonder how to ever validate this...

comment:10 by hubner, 2 years ago

I'm trying to get a sample file from the customer, but for whatever reason this is apparently not so easy.

I also found that you can generate the file with the metadata that I'm interested in with Final Cut Pro but I don't have access to a Mac so I can't try it out.

You can find some information in [1] where Apple describes some stuff about
HDR. Under HDR10 it says what kind of metadata you have to set so that it
is HDR10 conform.

#7037 seems to be the same issue but for a different format.
I will check out mkvmerge to see if I can use this to fix the metadata.

Do you think that a sample file would be enough for validation?

[1] https://developer.apple.com/av-foundation/High-Dynamic-Range-Metadata-for-Apple-Devices.pdf

comment:11 by Balling, 2 months ago

This is a strange issue, the metadata is set inside SEI in hevc, not in container.

Note: See TracTickets for help on using tickets.