Opened 22 months ago

Last modified 20 months 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: Jérôme Martinez 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.

Edit: The console output of FFmpeg indicates it _thinks_ it is adding DV metadata, so I guess the bug might be more with the formatting of the MPEG-TS DV metadata:

Output #0, mpegts, to 'file.ts':
...
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1600 [SAR 1:1 DAR 12:5], q=2-31, 23.98 fps, 23.98 tbr, 90k tbn (default)
...
      Side data:
        DOVI configuration record: version: 1.0, profile: 8, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 1

Also this is unlikely to be a MediaInfo bug, because my LG TV also does not recognize the output as Dolby Vision, while it does work with the one that tsMuxeR produced

Change History (5)

comment:1 by SubJunk, 22 months ago

Description: modified (diff)

comment:2 by SubJunk, 22 months ago

Version: unspecified7.0

comment:3 by SubJunk, 22 months ago

Description: modified (diff)

comment:4 by SubJunk, 22 months ago

Description: modified (diff)

comment:5 by Jérôme Martinez, 20 months ago

Cc: Jérôme Martinez added
Note: See TracTickets for help on using tickets.