cdgriffith / FastFlix

FastFlix is a free GUI for H.264, HEVC and AV1 hardware and software encoding!
https://fastflix.org/
MIT License
1.15k stars 58 forks source link

YouTube won't recognize my exports as HDR #231

Closed dimuthu44 closed 11 months ago

dimuthu44 commented 3 years ago

Hi, I have a MOV file which exported with Apple Prores 422 HQ. since I cannot play it directly on my Samsung TV, I converted it using FastFlix (4.2.3) and voila, it plays as HDR without any loss in quality on my 4K TV. (Kudos guys) However If I upload the same converted media to YouTube, it doesn't detect it as HDR. I tried playing around with YT HDR metadata injection tool as well but no luck. (Been experimenting with it for the whole weekend :( )

Is there any known issue regarding this? It's pretty strange to me a Samsung device recognize the export as HDR but YouTube does not...

Thanks in advance!

cdgriffith commented 3 years ago

Looking at their HDR page under supported encodings, it seems that they don't support H.265 for HDR. https://support.google.com/youtube/answer/7126552?hl=en#zippy=%2Cupload-requirements%2Chdr-video-file-encoding%2Chdr-metadata

I see that the raw x264 encoder (not through FastFlix / FFmpeg) has the mastering-display option, so may be possible to grab those options from the "Raw Commands" section of FastFlix and convert them to command line args for x264 itself. (Would have to do a FFmpeg YUV pipe > x264, then merge the resulting output back into a container with FFmpeg or similar with the audio. It's not a pretty thing.) https://www.videolan.org/developers/x264.html

I would quickly try throwing the video into a mp4 container instead of an mkv (while still H.265) just in case that makes a difference to them.

cdgriffith commented 3 years ago

Doing a quick google it does seems others are having luck with H.265 https://mavicpilots.com/threads/uploading-hdr-video-to-youtube-what-you-need-to-know.48268/ so I will try myself in the next few days and report back any findings

dimuthu44 commented 3 years ago

Hi Chris, thanks for responding. I guess YouTube acts strangely when it comes to HDR since it's still fresh technology. I've seen in a blog in MysteryBox that they managed to trigger a bug in YT workflow for HDR which they took 4 complete days to encode a 4K HDR movie, and I wouldn't surprise if this is one of them. Just to make sure, I also waited 4 complete days now to see if they flag my content as HDR before posting this :D Thanks again for the help and please let me know your findings. (If it helps, I tried with Apple ProRes 4444 as the source as well, but no luck, will do some testing tomorrow as well and post back)

dimuthu44 commented 3 years ago

Quick update. I threw the video in to mp4 container as you suggested and now HDR is getting tagged on YT. But if I threw in a LUT for HDR -> SDR down conversion, the colors goes off. So in short, HDR works that way but SDR looks dull. (which might be in-line with YT not yet supporting H.265 officially, but see below)

I tried exporting my original file to H.264 (Which is very time consuming in Adobe Premier pro which is why I wanted to use FastFlix in the first place), then re-encoded to H.265 file in FastFlix, and threw in a LUT for down conversion and voila, Heaven, all seems to be working. I might have to live with this for some time it seems.

I haven't yet played with mastering-display raw commands, but will report back.

cdgriffith commented 11 months ago

A few years later YouTube finally seems to be better about HDR uploads. They support both PQ and HLG in MKV, MP4, and MOV containers. https://support.google.com/youtube/answer/7126552?hl=en#

I have uploaded in all three with success using H.265 and DNxHR HQX 10-bit.

I have noticed it takes HOURS after the original upload before the HDR versions will start showing up. So don't panic if you don't see them for a bit.

Will also add that HDR options won't show on an incompatible device or browser. So make sure that other HDR videos on YouTube show that HDR option in the quality list before checking for your own.