Jhp3507 0 Posted October 31, 2023 Share Posted October 31, 2023 This is a somewhat specific feature request. An option in the advanced transcoding menu would certainly suffice. Situation: Emby does not support HDR->SDR tonemapping in HW on AMD GPU/APUs. Could it be implemented, that in these situations an automatic fallback to SW transcoding is done (if the Option is checked). All other „normal“ transcoding i.e. 4K SDR-> 1080p SDR would still be in HW. At the moment I always need to manually switch to SW transcoding if i have to transcode a HDR file and watch it in a somewhat good looking way. Thank you for the consideration. Link to comment Share on other sites More sharing options...
GrimReaper 3318 Posted October 31, 2023 Share Posted October 31, 2023 Doesn't selecting Enable HDR tonemapping with either hardware or software transcoding already do that, according helper text? Link to comment Share on other sites More sharing options...
Jhp3507 0 Posted October 31, 2023 Author Share Posted October 31, 2023 I just double checked it. Unfortunately this does not seem to work for me. As long as HW transcoding is enabled, the picture is characteristically dim and dull. It shows that AMD AMF is used. When I enable SW it correctly tonemaps the image (with an obviously higher load on the cpu). Link to comment Share on other sites More sharing options...
GrimReaper 3318 Posted October 31, 2023 Share Posted October 31, 2023 I don't have a machine with AMD hardware to test but would be interested to see the pipeline there. @softworkz Link to comment Share on other sites More sharing options...
softworkz 3341 Posted November 1, 2023 Share Posted November 1, 2023 (edited) @Jhp3507- Can you please post ffmpeg logs from the cases you mention? In cases where software tone mapping is needed further processing depends on where scaling is required. If scaling is required, Emby Server will do the scaling first, because it is a much "cheaper" operation - and even more when we do the tone-mapping on the down-scaled-video rather than on the original video frames. Edited November 1, 2023 by softworkz Link to comment Share on other sites More sharing options...
Jhp3507 0 Posted November 1, 2023 Author Share Posted November 1, 2023 ffmpeg-transcode-df3c9dd1-704b-4fc3-b327-eaa70d76d6a3_1.txt Link to comment Share on other sites More sharing options...
rbjtech 4293 Posted November 1, 2023 Share Posted November 1, 2023 (edited) So I don't see any tonemapping being done in the above ffmpeg command line - nor do i see a Processing Plan being listed ? On a transcode with QSV (and I assume Nvidia) - you get something like this stated before the command - >>>>>> Processing Plan Name CanDoInHW WillDoInHW Reason QuickSync Intel UHD Graphics 770 - H.... >> True True Hardware Codec VideoInput >> True True Same adapter Id (0), same hardware context (D3D11) Scaling >> True True ToneMapping (when possible) >> True True VideoOutput >> True True Hardware encoder QuickSync Intel UHD Graphics 770 - H.... >> True True Hardware Codec >>>>>> Video Processing Steps for [0:0]: H.265 (HEVC) Step HW-Context Format SW-Format Size Next HEVC_QSV >> QSV qsv p010 3840x2160 >> vpp_qsv vpp_qsv >> QSV qsv p010 720x404 >> setparams setparams >> QSV qsv p010 720x404 >> hwmap hwmap >> OPENCL opencl p010 720x404 >> tonemap_opencl tonemap_opencl >> OPENCL opencl nv12 720x404 >> hwmap hwmap >> QSV qsv nv12 720x404 >> This 'may' need the Diagnostics Option Plugin - do you have that installed ? If TM is being included - then you can clearly see it in the ffmpeg line - in my example -filter_complex "[0:0]vpp_qsv@f1=width=720:height=404:async_depth=8,setparams@f2=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwmap@f3=mode=+read:derive_device=opencl,tonemap_opencl@f4=tonemap=hable:format=nv12:desat=0,hwmap@f5=mode=+write:derive_device=qsv:reverse=1:extra_hw_frames=16[f5_out0]" Edited November 1, 2023 by rbjtech Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now