Opened 4 years ago

Last modified 15 months ago

#8777 new enhancement

ffmpeg HDR signaling

Reported by: Helg1980 Owned by:
Priority: normal Component: ffmpeg
Version: unspecified Keywords:
Cc: dc Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


I'm using a great program FFMPEG with support for HEVC_NVENC 10bit and HWACCEL CUVID, but I ran into this problem: I can't set the parameters Light level Maxcll and Max fall, this is necessary to correctly transmit the brightness of the HDR content (I can't find anywhere on the Internet How to write these parameters correctly).
Here's my line.:

ffmpeg -loglevel debug -threads:v 4 -threads:a 8 \
-hwaccel cuvid \
-i "/run/media/helg/WDC/" \
-b:v 40M -maxrate:v 50M -rc vbr_hq -2pass 1 -c:v hevc_nvenc -preset slow -sei hdr -profile:v main10 -level:v 5.1 \
-color_primaries bt2020 -color_trc arib-std-b67 -colorspace bt2020nc -color_range tv -maxcll 1000 -maxfall 100 \
-flags -global_header -max_muxing_queue_size 1024 \
-c:a aac -b:a 384k \
-f matroska -y "/run/media/helg/WDC/HLG.mkv"

The terminal returns an error: Unrecognized option 'maxcll'.

Please tell me what I'm doing wrong?

(my system: Manjaro Linux, GeForce GTX 1050ti, ffmpeg version n4.2.3 )

Change History (6)

comment:1 by hydra3333, 4 years ago

maybe try posting to list ffmpeg-user ?

comment:2 by hydra3333, 4 years ago

a simple google search yielded
-maxcll "1000,300"
which does not look like yours ?

in reply to:  2 comment:3 by Helg1980, 4 years ago

Replying to hydra3333:

a simple google search yielded
-maxcll "1000,300"
which does not look like yours ?

I forgot to write at the beginning that this is what I need to develop the program in the Linux environment. The fact is that the described method using "nvhsp" only works for Windows. And it turns out that at the moment it is impossible to develop a full-fledged application for Linux, I see this as a problem.

comment:4 by klobliu, 3 years ago

Maybe patch below can meet your demand.
ffmpeg command:
ffmpeg -i HDR_X265_master2.mp4 -vcodec hevc_nvenc -bsf:v hevc_metadata=transfer_characteristics=16:colour_primaries=9:video_full_range_flag=0:matrix_coefficients=9:max_cll="1000|1000":master_display="G(13250|34500)B(7500|3000)R(34000|16000)WP(15635|16450)L(10000000|100)" with_sei_video_265.mp4 -y

And here is fork release.

Last edited 3 years ago by klobliu (previous) (diff)

comment:5 by Balling, 2 years ago

Meanwhile dolby vision decoding is done (no dynamic metadata, no EL decoding yet) and this one is nice:

This will allow to color manage D93 to D65, e.g., when dealing with BT.1886 anime from Japan that uses different ambient light.

comment:6 by dc, 15 months ago

Cc: dc added
Note: See TracTickets for help on using tickets.