View Full Version : Edit max-cll metadata in hevc stream
djesteban
4th September 2024, 03:10
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
4th September 2024, 13:46
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
benwaggoner
9th September 2024, 16:56
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.
djesteban
11th September 2024, 04:11
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) (https://www.itu.int/rec/T-REC-H.265-202309-S/en) and here (https://magewell.com/blog/82/detail)), 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!
Ritsuka
11th September 2024, 18:29
It's possible, but I don't know (and never checked) if there is already some program to do so.
Z2697
12th September 2024, 00:44
If it's SEI, then perhaps you can encode a dummy stream with the correct value, then swap the corresponding NALU.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.