Log in

View Full Version : Pass over HDR10+ and Dolby Vision information?


Pages : 1 2 3 [4]

quietvoid
20th October 2022, 01:00
May I ask a question to this. I now extracted the RPU using
ffmpeg -i input.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - -o RPU.bin
This worked nicely and gave me a 90MB file.
But how do I get the RPU into my encoded video?

First, I have tried it in HandBrake directly (which would be the perfect way). I've added
vbv-bufsize=160000:vbv-maxrate=160000:dolby-vision-profile=8.1:dolby-vision-rpu=/Filepath/RPU.bin
as additional options. But this did not work because of:
encx265: unknown option 'dolby-vision-rpu'

Then I've tried to first encode the video with HandBrake and then inject the RPU back into the final video with:
ffmpeg -i video.m4v -c:v copy -c:a copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool inject-rpu -i - --rpu-in /Filepath/RPU.bin -o final.mp4
But this did not work because of:
Error: RpuInjector: Must be a raw HEVC bitstream file

x265 supposedly only supports RPU files from CLI, so if Handbrake is using the library it might not be able to.
I think I've seen people use ffmpeg, but I'm not sure if it actually works.

For injecting, you need to be using the raw bitstream, it can't be piped.
So demux first, inject, remux. You also can't output in mp4, it'll just be HEVC with no container.

ShortKatz
20th October 2022, 20:04
Thanks. This turned out to be more complicated than I thought. I was hoping to get an mp4 at the end, that I can play on my AppleTV.