HDR in Video Enhance AI

I would love it when VEAI can do SDR2HDR.

What happen if the original video is actually a HDR one? Can something be done on the output along with using H265 main 10 so it go back to HRD again? I’ve tryed a movie that was HDR and now it’s not anymore:

You can add HDR data to the command line. DGIndexNV (a free tool) will conveniently write the HDR info to a ready-made command line, for x265; like:

X265_CL --colorprim 9 --transfer 16 --colormatrix 9 --master-display “G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)” --max-cll “1000,926” --frames 196677 --chromaloc 2

I doubt VEAI uses x265, though. So you may need a first pass to, say, ProRes HQ, and then a second pass (yourself), with x265, to re-insert the HDR data.

1 Like

So if my video already had HDR, would Video AI retain the HDR metadata?

If you are using an Nvidia GPU (perhaps others as well, but I have Nvidia), VEAI supports X.265 Main 10 via NVENC.

Well, I’ve already converted my HDR video to ProRes and it didn’t retain the HDR video. I have no interest in converting it again as it took over a day. DGDecNV is completely useless for reinserting HDR.

Most certainly not. :stuck_out_tongue: You use DGDecNV to collect the HDR information. So, you let it create a .DGI file; then you open it (with a text editor), and it will contain a last line that says something like:

X265_CL --colorprim 9 --transfer 16 --colormatrix 9 --master-display "G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)" --max-cll "0,0" --frames 162660 --chromaloc 2

X265_CL stands for X265 Command Line. So, you now take your output ProRes mov, and start encoding it with x265, using the collected HDR info (in my case, using a VapourSynth script as input file:

VSPipe -c y4m "f:\jobs\donnie.vpy" - | x265 --y4m --input - --preset medium --input-depth 10 --output-depth 10 --crf 11 --colorprim 9 --transfer 16 --colormatrix 9 --master-display "G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)" --max-cll "0,0" --frames 162660 --chromaloc 2 --output "f:\video\donnie.hevc"

no, it does not retain the HDR, and the resulting video looks bad with “wrong” colors

You cut the ears off a mule, doesn’t make him a horse

Topaz can do it! one day :wink: