1 (edited by Joachim Otahal 21-05-2020 08:14:03)

Topic: "try to recover HDR colors" not working for x264 10 bit?

It works fine for h265, but not for h264.
x264 vide properties: h264 high 10 L6.0, yuv420p10le, 3840x2160.

Detailed properties:
Video
ID                             : 1
Format                         : AVC
Format/Info                    : Advanced Video Codec
Format profile                 : High 10@L6
Format settings                : CABAC / 16 Ref Frames
Format settings, CABAC         : Yes
Format settings, Reference fra : 16 frames
Codec ID                       : V_MPEG4/ISO/AVC
Duration                       : 1 h 46 min
Bit rate                       : 4 898 kb/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
Scan type                      : Progressive
Bits/(Pixel*Frame)             : 0.025
Writing library                : x264 core 159

Any hint? I could use ffdshow to color correct that, but the SVP routine gives better results.

Re: "try to recover HDR colors" not working for x264 10 bit?

http://joumxyzptlk.de/tmp/h264-10-bit.mkv (10 MB) if a short test file is needed.

Re: "try to recover HDR colors" not working for x264 10 bit?

because it isn't HDR?

Re: "try to recover HDR colors" not working for x264 10 bit?

Thank you for the hint. Did I miss an encoding option? The original is HDR, but with 80 GB way too big.
My command line is this:
c:\prog\ffmpeg\bin\ffmpeg.exe -stats -n -i "x265.10bit.HDR.mkv" -max_muxing_queue_size 1024 -map 0:v:0? -map 0:a? -map 0:s? -map 0:t? -acodec aac -b:a 384k -c:s copy -map_metadata 0 -vf hqdn3d=2:1:2:1 -vcodec libx264 -preset:v veryslow -tune:v Film -crf 20 "x265.10bit.HDR.crf20.aac384.filter.mkv"

As far as my search goes: x264 does support 10 Bit, but not the HDR flag as far as I can see here http://www.chaneru.com/Roku/HLS/X264_Settings.htm, even though it seems to be possible. I haven't found it yet. x265 has plenty of documentation on HDR flagging, but it is so slow compared to the little space gain (when disabling the strong intra filter) that it is rather worthless, the HDR is the only thing that actually seems to make a difference.

I'd rather run in through latest svt-av1 https://ci.appveyor.com/project/tianjun … v1/history than x265. Especially since they fixed my various "These sample make it crash reproducible" bug reports... The fixees are not included in SVT-AV1 0.8.3, probably will be in 0.8.4.

Re: "try to recover HDR colors" not working for x264 10 bit?

PS: ffmpeg version git-2020-04-03-52523b6
I just found several threads and bug reports about ffmpeg (or rather libav as some say) not transferring the HDR flags in quite some situations, even with x265. And those discussions are not old, looks like I have to check with newer ffmpeg as well...