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.

 

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th September 2024, 03:10   #1  |  Link
djesteban
Registered User
 
djesteban's Avatar
 
Join Date: Aug 2008
Posts: 115
Edit max-cll metadata in hevc stream

Hi,

Anyone know if there's a way to edit the max-cll value from a hevc stream? I know FFmpeg as a hevc_metadata bitstream filter, but it doesn't seem to have the specific argument to modify this value.

Thanks in advance
djesteban is offline   Reply With Quote
Old 4th September 2024, 13:46   #2  |  Link
djesteban
Registered User
 
djesteban's Avatar
 
Join Date: Aug 2008
Posts: 115
Actually max-cll is only the option passed to x265, but when encoded they are two separate values:
- Max Content Light Level
- Max Frame-Average Light Level

There's a way to edit these values inside a mkv with mkvpropedit, but I'd rather edit then directly in the hevc stream
djesteban is offline   Reply With Quote
Old 9th September 2024, 16:56   #3  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
Quote:
Originally Posted by djesteban View Post
Actually max-cll is only the option passed to x265, but when encoded they are two separate values:
- Max Content Light Level
- Max Frame-Average Light Level

There's a way to edit these values inside a mkv with mkvpropedit, but I'd rather edit then directly in the hevc stream
Particularly for adaptive streaming, the values need to be included again for every fragment.

That said, I'm not aware of any real-world player that uses MaxFALL, and only a few that use MaxCLL. Knowing the brightness of the brightest single pixel in a two hour movie really isn't that useful in figuring out how to tone map any given scene.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 11th September 2024, 04:11   #4  |  Link
djesteban
Registered User
 
djesteban's Avatar
 
Join Date: Aug 2008
Posts: 115
Quote:
Originally Posted by benwaggoner View Post
Particularly for adaptive streaming, the values need to be included again for every fragment.

That said, I'm not aware of any real-world player that uses MaxFALL, and only a few that use MaxCLL. Knowing the brightness of the brightest single pixel in a two hour movie really isn't that useful in figuring out how to tone map any given scene.
I realize that; I was simply wondering if it is possible to edit these values in an HEVC stream. From what I’ve read (here (Annex D) and here), MaxFALL and MaxCLL are stored as Supplemental Enhancement Information (SEI) data, but I’m not sure if it’s possible to manipulate these SEI message payloads. Additionally, I noticed that the HEVC metadata FFmpeg can modify, seems to be limited to VUI parameters (according to ITU-T H.265 Annex E), so perhaps that’s the extent of what can be easily edited.

Thanks for your input though, appreciated!
djesteban is offline   Reply With Quote
Old 11th September 2024, 18:29   #5  |  Link
Ritsuka
Registered User
 
Join Date: Mar 2007
Posts: 100
It's possible, but I don't know (and never checked) if there is already some program to do so.
Ritsuka is offline   Reply With Quote
Old 12th September 2024, 00:44   #6  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Posts: 51
If it's SEI, then perhaps you can encode a dummy stream with the correct value, then swap the corresponding NALU.
Z2697 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 23:11.


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