F5F Stay Refreshed Hardware Desktop Issues with AV1 and HDR10 are common. Check settings, update drivers, and ensure proper codecs support.

Issues with AV1 and HDR10 are common. Check settings, update drivers, and ensure proper codecs support.

Issues with AV1 and HDR10 are common. Check settings, update drivers, and ensure proper codecs support.

S
Sv3tnetS
Member
193
07-10-2024, 05:29 AM
#1
Hi All, TL;DR Do either the MKV container or MP4 container support 4K AV1 content with HDR10? I've been having issues getting it to work. More Details: Recently I've been backing up my own and my father's Blu Ray collections which consist of both regular Blu Rays and 4K/HDR Blu Rays. I haven't had any trouble with the regular Blu Rays yet, but lately I've noticed some strange issues with the 4K HDR ones. For some context, I recently got an AMD RX 7800XT which has support for both AV1 decoding and encoding. I decided I should try to compress the 80GB 4K Blu Rays using AV1 because why not! The movie I used as a test subject was my Dune 4K Blu Ray, which contained both Dolby Vision metadata and HDR10 metadata according to dovi_tools The 4K Blu Rays are encoded using HEVC/H265 which my graphics card should support for decoding, and starting with the 1.7.x builds of Handbrake, they also support AMF AV1 encoding so I gave that a try. I found out that Handbrake doesn't support AMF decoding at all, so I was limited to around 40fps by the CPU decoding. This wasn't that big of a problem personally, but still kinda irritating. So I used the FFMPEG command line executable since they support AMF decoding through both the existing DirectX 11 Video Acceleration API and the new Vulkan Video API. This did technically work, and I was now able to transcode at closer to 80fps! Although when I went back to play the 4K AV1 MP4s, VLC wasn't tone mapping the HDR properly and everything was washed out. Strange. I checked that the original media was tone mapped properly by VLC, which it was (not desaturated at least). I did a bit of research and found out that some people were reporting that the MP4 container doesn't support all of the metadata needed for HDR (which I eventually proved false... Sort of) so I retired the transcoding but now into an MKV file. Same problem, although the HDR10 metadata was being detected by VLC, just without tone mapping for some reason. So the AV1 MP4 didn't have the proper metadata and wasn't getting tone mapped, and the MKV had the correct metadata but still wasn't being tone mapped. I re-tried the same steps, but instead of AV1, I used HEVC so basically I was just compressing the original by reducing the bitrate. That time, both as an MP4 and MKV, the HDR10 metadata and tone mapping worked properly in VLC. I was able to use dovi_tools again to verify that HDR10 metadata was present in at least the AV1 MKV as well as the HEVC MKV and MP4, so I'm beginning to think it might be a problem with VLC. I tried using Handbrake anyway to create the 4K AV1 files instead of just FFMPEG and confirmed the same exact behavior; metadata was present for both codecs in and MKV container, but VLC didn't tonemap the AV1 video properly. I made sure VLC was updated, same with FFMPEG and Handbrake. Any insights would be welcome
S
Sv3tnetS
07-10-2024, 05:29 AM #1

Hi All, TL;DR Do either the MKV container or MP4 container support 4K AV1 content with HDR10? I've been having issues getting it to work. More Details: Recently I've been backing up my own and my father's Blu Ray collections which consist of both regular Blu Rays and 4K/HDR Blu Rays. I haven't had any trouble with the regular Blu Rays yet, but lately I've noticed some strange issues with the 4K HDR ones. For some context, I recently got an AMD RX 7800XT which has support for both AV1 decoding and encoding. I decided I should try to compress the 80GB 4K Blu Rays using AV1 because why not! The movie I used as a test subject was my Dune 4K Blu Ray, which contained both Dolby Vision metadata and HDR10 metadata according to dovi_tools The 4K Blu Rays are encoded using HEVC/H265 which my graphics card should support for decoding, and starting with the 1.7.x builds of Handbrake, they also support AMF AV1 encoding so I gave that a try. I found out that Handbrake doesn't support AMF decoding at all, so I was limited to around 40fps by the CPU decoding. This wasn't that big of a problem personally, but still kinda irritating. So I used the FFMPEG command line executable since they support AMF decoding through both the existing DirectX 11 Video Acceleration API and the new Vulkan Video API. This did technically work, and I was now able to transcode at closer to 80fps! Although when I went back to play the 4K AV1 MP4s, VLC wasn't tone mapping the HDR properly and everything was washed out. Strange. I checked that the original media was tone mapped properly by VLC, which it was (not desaturated at least). I did a bit of research and found out that some people were reporting that the MP4 container doesn't support all of the metadata needed for HDR (which I eventually proved false... Sort of) so I retired the transcoding but now into an MKV file. Same problem, although the HDR10 metadata was being detected by VLC, just without tone mapping for some reason. So the AV1 MP4 didn't have the proper metadata and wasn't getting tone mapped, and the MKV had the correct metadata but still wasn't being tone mapped. I re-tried the same steps, but instead of AV1, I used HEVC so basically I was just compressing the original by reducing the bitrate. That time, both as an MP4 and MKV, the HDR10 metadata and tone mapping worked properly in VLC. I was able to use dovi_tools again to verify that HDR10 metadata was present in at least the AV1 MKV as well as the HEVC MKV and MP4, so I'm beginning to think it might be a problem with VLC. I tried using Handbrake anyway to create the 4K AV1 files instead of just FFMPEG and confirmed the same exact behavior; metadata was present for both codecs in and MKV container, but VLC didn't tonemap the AV1 video properly. I made sure VLC was updated, same with FFMPEG and Handbrake. Any insights would be welcome

H
HoleInoneHusky
Junior Member
45
07-10-2024, 05:29 AM
#2
I looked into the details and gathered some additional insights, though a solution remains elusive. For anyone reading this, the scale video filter in FFMPEG seems to interfere with HDR mapping. Additionally, FFMPEG attempted to convert bt2020 raw files directly to bt709 without proper tonemapping, leading to faded colors. Handbrake functions but runs much slower. It would be great if future updates included better AMD GPU video decoding support.
H
HoleInoneHusky
07-10-2024, 05:29 AM #2

I looked into the details and gathered some additional insights, though a solution remains elusive. For anyone reading this, the scale video filter in FFMPEG seems to interfere with HDR mapping. Additionally, FFMPEG attempted to convert bt2020 raw files directly to bt709 without proper tonemapping, leading to faded colors. Handbrake functions but runs much slower. It would be great if future updates included better AMD GPU video decoding support.