#11193: Dolby Vision metadata not written to MPEG-TS unlike MP4
---------------------------------+----------------------------------
             Reporter:  SubJunk  |                    Owner:  (none)
                 Type:  defect   |                   Status:  new
             Priority:  normal   |                Component:  ffmpeg
              Version:  7.0      |               Resolution:
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+----------------------------------
Description changed by SubJunk:

Old description:

> 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.
>
> 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

New description:

 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

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11193#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to