Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#67 | Link |
Registered User
Join Date: Jul 2024
Posts: 5
|
Thanks for the tips but neither AviSynth+ nor DGHDRtoSDR are suitable alternatives - I need to use ffmpeg. In the end I decided to go for OpenCL:
Code:
ffmpeg -i hdr.mp4 -vf format=p010,hwupload,tonemap_opencl=tonemap=mobius:format=nv12:m=bt709:p=bt709:r=tv,hwdownload,format=nv12 thumb-%06d.jpg |
![]() |
![]() |
![]() |
#68 | Link | |
Registered User
Join Date: Jun 2024
Location: South Africa
Posts: 346
|
Quote:
Code:
ffmpeg -init_hw_device opencl -i HDR.mkv -vf hwupload,tonemap_opencl=tonemap=reinhard:param=0.1:desat=0:format=nv12:t=bt709:p=bt709:m=bt709:r=tv,hwdownload,format=nv12 SDR.mp4 Code:
ffmpeg -i HDR.mkv -vf zscale=t=linear:npl=291,format=gbrpf32le,zscale=1920:-1:f=spline36,tonemap=reinhard:param=0.6:desat=0,zscale=t=709:p=709:m=709:r=limited:dither=error_diffusion,format=yuv420p,sidedata=delete OUTPUT |
|
![]() |
![]() |
![]() |
#69 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,113
|
I still do not understand why zscale is not available when you use a plain vanilla current version of FFmpeg. Could you upload a short sample of your source file and specify the desired target size so forum members could do some experimentation?
Cheers manolito |
![]() |
![]() |
![]() |
#70 | Link |
Registered User
Join Date: Jul 2024
Posts: 5
|
I'm using a fork of ffmpeg called Plex Transcoder which is used by Plex (among other things) for thumbnail generation. In it's default state it will create washed out thumbnails for HDR content so I hijacked the command and inserted the OpenCL tonemap filter.
On my desktop I can just do zscale+tonemap which looks way better of course. Maybe someday I'll investigate how the thumbnails are stored on disk and replace them myself, although that sounds tedious and like something I'll eventually forget to do. |
![]() |
![]() |
![]() |
#71 | Link |
Registered User
Join Date: Jun 2024
Location: South Africa
Posts: 346
|
Code:
ffmpeg -init_hw_device opencl -i HDR.mkv -vf hwupload,tonemap_opencl=tonemap=reinhard:param=0.1:desat=0:format=nv12:t=bt709:p=bt709:m=bt709:r=tv,hwdownload,format=nv12 OUTPUT |
![]() |
![]() |
![]() |
#72 | Link | |
Registered User
Join Date: Jul 2024
Posts: 5
|
Quote:
|
|
![]() |
![]() |
![]() |
#73 | Link |
Registered User
Join Date: Jun 2024
Location: South Africa
Posts: 346
|
I agree and am of the encoding philosophy to keep the picture "as is." (Except in cases where work is needed, such as debanding anime or fixing problematic material.) What nags me is that, while there are standard ways of tone mapping, for example the ITU-R recommendations, it seems that in practice, one always has to tune the parameters a bit. I wish this were a "solved problem" but we're not there yet and subjectivity is involved.
At present, I have a project where I'm tone mapping the Lord of the Rings 4K remastering down to SDR 1080p, trying to match the remastered 1080p Extended Edition I have access to, and while I'm getting excellent results, it is challenging to match the reference exactly, and getting one scene right may fail another. Last edited by GeoffreyA; 23rd July 2024 at 07:56. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|