Opened 3 days ago

Last modified 2 days ago

#11193 new defect

Dolby Vision metadata not written to MPEG-TS unlike MP4

Reported by: SubJunk Owned by:
Priority: normal Component: ffmpeg
Version: 7.0 Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by SubJunk)

Summary of the bug:
If I have an input file with a Dolby Vision video stream, it is easy to have the Dolby Vision metadata added to the output file if it is MP4, by adding -strict unofficial to it, e.g. with the input file dv.mkv with a MediaInfo reading that includes:

HDR format                               : Dolby Vision, Version 1.0, Profile 8.1, dvhe.08.06, BL+RPU, no metadata compression, HDR10 compatible / SMPTE ST 2086, Version HDR10, HDR10 compatible / SMPTE ST 2094 App 4, Version HDR10+ Profile B, HDR10+ Profile B compatible
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 806
MaxCLL_Original                          : 806 cd/m2
Maximum Frame-Average Light Level        : 78
MaxFALL_Original                         : 78 cd/m2

FFmpeg outputs a MP4 file with DV metadata:

./ffmpeg -i dv.mkv -c:v copy -f mp4 -strict unofficial output.mp4
...
HDR format                               : SMPTE ST 2086, Version 1.0, dvhe.08.06, BL+RPU, no metadata compression, HDR10 compatible / Dolby Vision, Version 1, HDR10 compatible / SMPTE ST 2094 App 4, HDR10+ Profile B compatible
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 806 cd/m2
Maximum Frame-Average Light Level        : 78 cd/m2

which is good, but the same does not work for MPEG-TS:

./ffmpeg -i dv.mkv -c:v copy -f mpegts -strict unofficial output.ts.
...
HDR format                               : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 806 cd/m2
Maximum Frame-Average Light Level        : 78 cd/m2

where it has output different HDR format metadata that is just for compatibility, not the DV part.

An interesting note is that if I run the MPEG-TS output through tsMuxeR, it corrects the metadata to be:

HDR format                               : Dolby Vision, Version 1.0, Profile 8.1, dvhe.08.06, BL+RPU, extended metadata compression, HDR10 compatible / SMPTE ST 2094 App 4, Version HDR10+ Profile B, HDR10+ Profile B compatible

which allows players to recognize it as Dolby Vision again. I include that note just in case it is helpful.

I can provide a sample input if anyone wants too

Change History (2)

comment:1 by SubJunk, 3 days ago

Description: modified (diff)

comment:2 by SubJunk, 2 days ago

Version: unspecified7.0
Note: See TracTickets for help on using tickets.