Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Display Modes
Old 12th October 2025, 10:16   #1  |  Link
Loomes
Registered User
 
Join Date: Nov 2003
Location: Germany, Berlin
Posts: 51
Incompatible HDR10+ Injection

For my source mkv file, MediaInfo shows the follwing video info:

Code:
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@Main
HDR format                               : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 55 min 49 s
Bit rate                                 : 3 644 kb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.018
Stream size                              : 1.42 GiB (89%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1 170 cd/m2
Maximum Frame-Average Light Level        : 320 cd/m2
Now I'm using hdr10plus_tool to extract the HDR10+ info:
Code:
hdr10plus_tool extract source.mkv -o source_hdrinfo.json
I inject the JSON into the target, which has no HDR info yet:
Code:
hdr10plus_tool.exe inject -i target.hevc -j source_hdrinfo.json -o target_injected.hevc
After muxing to MKV, the target file shows the following:
Quote:
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@Main
HDR format : SMPTE ST 2094 App 4, Version 1
Codec ID : V_MPEGH/ISO/HEVC
Duration : 55 min 49 s
Bit rate : 12.5 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.063
Stream size : 4.86 GiB (100%)
Default : Yes
Forced : No
...which now has a "HDR format" but is obviously missing Mastering infos etc. The JSON file has about 78.000 kb and 4.338.417 lines, looks okay afaik, but the resulting file is not recognized as HDR by my TV and shows no difference to the original target file (without HDR).

How can I do a proper injection here?
Loomes is offline   Reply With Quote
Old 12th October 2025, 17:21   #2  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 1,004
Mastering display and content light level info is located in the SEI, I'm not sure how hdr10plus_tool handles that, but from the result I assume it's not handling that.
(And the matrix transfer primaries chromaloc are located in VUI in SPS, your result seems not containing that as well)
(Which actually, is probably the real reason why it's not recognized, not the lack of mastering and cll info)
Z2697 is offline   Reply With Quote
Old 12th October 2025, 20:44   #3  |  Link
Loomes
Registered User
 
Join Date: Nov 2003
Location: Germany, Berlin
Posts: 51
Are there other cli tools to do HDR10+ injection?
Loomes is offline   Reply With Quote
Old 12th October 2025, 22:29   #4  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 1,004
IDK but it doesn't matter. Fix your base bitstream.
You can use FFmpeg bitstream filter hevc_metadata to fix the VUI info, don't really have a good idea about the mastering and cll SEI but that's just a little bonus.

Code:
ffmpeg -i a.265 -bsf:v hevc_metadata=colour_primaries=9:transfer_characteristics=16:matrix_coefficients=9:video_full_range_flag=0 -c copy b.265

Last edited by Z2697; 12th October 2025 at 22:36.
Z2697 is offline   Reply With Quote
Old 12th October 2025, 23:18   #5  |  Link
Loomes
Registered User
 
Join Date: Nov 2003
Location: Germany, Berlin
Posts: 51
Thanks, but meanwhile the author of the tool told me that the target file needs to be already HDR, not SDR, like mine is.
Loomes is offline   Reply With Quote
Reply

Tags
hdr, hdr10+, hdr10plus_tool, hevc. h.265

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.