2023-11-01, 07:39 AM
Okay, so I figured out there's a QSV tonemapping filter, which is used by Jellyfin as well. Use the first line of the code below to get the full output of the vpp_qsv filter, which includes quite a few other filter options. I have not tested to see if VPP tonemapping is more accurate, has costs to brightness or quality, etc... I do now know that the filter you're using above simply CLIPS the out-of-range colors, which is not the best application of tonemapping. You might want to consider hable or reinhard -- you can see here (https://ayosec.github.io/ffmpeg-filters-...nemap.html) brief information about the options for non-QSV tonemapping. You could also look at the defaults in Jellyfin to get an idea of what to use if you don't want to use the QSV version -- disable HWA and take a look at the recommended defaults for tonemapping.
There's also an OpenCL and straight VAAPI tonemapping option, so either of those might work for you as well. The QSV option is extremely simple...I think.
I left in the options that you might want to use like ProcAmp if you want to enhance the brightness (can also change saturation, hue), w/h in case you want to scale, format and scale_mode for additional flexibility, out_range in case you want to set this explicitly (should be Limited in nearly all cases), and out_color_X options so you can set these according to your tonemapping.
There's also an OpenCL and straight VAAPI tonemapping option, so either of those might work for you as well. The QSV option is extremely simple...I think.
Code:
bitmap@server:testing$ ffmpeg -h filter=vpp_qsv
Filter vpp_qsv
Quick Sync Video "VPP"
Inputs:
#0: default (video)
Outputs:
#0: default (video)
vpp_qsv AVOptions:
procamp <int> ..FV....... Enable ProcAmp (from 0 to 1) (default 0)
brightness <float> ..FV....... ProcAmp brightness (from -100 to 100) (default 0)
w <string> ..FV....... Output video width(0=input video width, -1=keep input video aspect) (default "cw")
h <string> ..FV....... Output video height(0=input video height, -1=keep input video aspect) (default "w*ch/cw")
format <string> ..FV....... Output pixel format (default "same")
scale_mode <int> ..FV....... scaling & format conversion mode (mode compute(3), vd(4) and ve(5) are only available on some platforms) (from 0 to 5) (default auto)
auto 0 ..FV....... auto mode
low_power 1 ..FV....... low power mode
hq 2 ..FV....... high quality mode
compute 3 ..FV....... compute
vd 4 ..FV....... vd
ve 5 ..FV....... ve
out_range <int> ..FV....... Output color range (from 0 to 2) (default 0)
full 2 ..FV....... Full range
limited 1 ..FV....... Limited range
jpeg 2 ..FV....... Full range
mpeg 1 ..FV....... Limited range
tv 1 ..FV....... Limited range
pc 2 ..FV....... Full range
out_color_matrix <string> ..FV....... Output color matrix coefficient set
out_color_primaries <string> ..FV....... Output color primaries
out_color_transfer <string> ..FV....... Output color transfer characteristics
tonemap <int> ..FV....... Perform tonemapping (0=disable tonemapping, 1=perform tonemapping if the input has HDR metadata) (from 0 to 1) (default 0)
I left in the options that you might want to use like ProcAmp if you want to enhance the brightness (can also change saturation, hue), w/h in case you want to scale, format and scale_mode for additional flexibility, out_range in case you want to set this explicitly (should be Limited in nearly all cases), and out_color_X options so you can set these according to your tonemapping.
Jellyfin 10.10.0 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage