Converting HLG HDR Video to PQ HDR Video (HDR10)
I've been trying to convert an HLG video to PQ... thread below continues with findings.
21 Replies
Excuse the tag, couldn't find another more relevant one.
screengrab of original video playing in MPV https://thisismy.technology/TDF/TOfaZaTu89.jpg
screengrab of PQ converted playing in MPV https://thisismy.technology/TDF/QuroZido56.jpg
Above converted was achieved with
ffmpeg -i input -pix_fmt p010le -c:v hevc_nvenc -b:v 19M -vf zscale=transfer=smpte2084 -to 00:03 testpq.mp4
So, you're happy with this? Or do you want to tweak the output a bit? Looking for speedups?
-vf zscale=transfer=linear,tonemap=clip,zscale=transfer=smpte2084
https://thisismy.technology/TDF/YerinEVe30.jpgI'd be very careful with clip 😅
I think I'm happy with it... lol. will do a longer encode and see what the real rate is... only 1x would be pretty disappointing given i've probably got >6 hours of these to do
well I could just go to sleep and have it all be done in the morning i spose 😅
instead of
clip
, look into npl
, tonemap
filters, desat
, peak
with tonemap, you might be interested in bt2390
not sure if you're on windows or linux, but opencl has hardware accel for tonemapping, which might work hehyeah im actually on windows since this machine has a 3070 in it
GG @TheDevFreak, you just advanced to level 3 !
I think I may just settle with the default output from
-vf zscale=transfer=smpte2084
. Asked around a few friends and most of them seem to actually prefer that to the original without knowing which was the original or nothappy to hear it, best of luck :OBSHeart:
thanks for the help! It looks like 1x is probably the best i'll get but I can live with that
huh.. That seems a bit slow. I know I'm not doing 2160p60, but I am curious what is taking so long 😛
I'm getting around 170fps on 1080p
2160p25 to be fair but that is a little odd
my guess is its CPU decoded, and thats whats slowing you down
source is 2160p25, HEVC, 19Mbps
Well I would think thats the slowdown but the other testing I had done (yielding worse results) in nvencc was cpu decoded and getting >=100fps
and my cpu is barely being hit; 25% or so
1080p decode with cuda hw accel is about 500fps
Cpu decode is 380fps
CPU decode + zscale about 200fps.
soo, Guess I'm wrong. Its probably zscale and copying shit all over the place that is the primary time sink
yeahhh probably
and yeah, mercy be upon ye if you plan on trying to get libplacebo hardware accelerated via vulkan. That was painful, time consuming, and I failed. Maybe things have changed in the past two years, but I would really not want to try that again 😅
ah well; i'll just let it cook.
and hope the output quality is good enough... should be fine