Jellyfin Forum
Change Tone-mapping Methods - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Change Tone-mapping Methods (/t-change-tone-mapping-methods)



Change Tone-mapping Methods - iRed - 2023-09-30

Hello, I have Jellyfin running in an Ubuntu container. HWA works so far, just no tone mapping. 
I have a Ryzen 7 5800U (mobile chip). In the docs it says that there are 2 tone mapping methods
and since clinfo shows me that I have no device, I want to do it via Vulkan. Where can I change this?

Can anyone help me?


RE: Change Tone-mapping Methods - TheDreadPirate - 2023-09-30

Further down the doc, did you install the OpenCL ROCm runtime?

https://jellyfin.org/docs/general/administration/hardware-acceleration/amd/#configure-on-linux-host

Vulkan tone mapping isn't supported in the current stable release. But it is supposed to be available when 10.9 is released.

https://jellyfin.org/docs/general/administration/hardware-acceleration/#:~:text=Jellyfin%2010.9%20enables%20full%20acceleration%20for%20AMD%20Vega%20and%20newer%20GPUs%20on%20Linux%20via%20VA%2DAPI%20and%20Vulkan%20interop.


RE: Change Tone-mapping Methods - nyanmisaka - 2023-09-30

Vulkan tonemap on AMD requires JF 10.9.


RE: Change Tone-mapping Methods - oilyeagle - 2024-06-25

I have JF 10.9.7, however when I enable VAAPI tone mapping, hdr videos fail with a fatal error. In the logs it looks like it's using opencl. I checked supported codecs, and everything else in transcoding is default settings. Is there a way to force vulkan? It looks like the opposite is happening right now and opencl is being forced onto ffmpeg from this: -init_hw_device opencl=ocl

This is inside an official docker container (not lsio), user is added to video and render groups in the dockerfile, and normal sdr transcoding works fine. Just HDR that fails with fatal error.

Code:
/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl=ocl:.0,device_vendor="Advanced Micro Devices" -filter_hw_device ocl -noautorotate -i file:"/mnt/media/BluRay Movies/The.Big.Lebowski.1998.UHD/The Big Lebowski_t01.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi -rc_mode VBR -b:v 108591663 -maxrate 108591663 -bufsize 217183326 -sei -a53_cc -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,scale=trunc(min(max(iw\,ih*a)\,min(3840\,2160*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(3840/a\,2160))/2)*2,format=yuv420p10le,hwupload=derive_device=opencl,tonemap_opencl=format=nv12:p=bt709:t=bt709:m=bt709:tonemap=bt2390:peak=100:desat=0,hwdownload,format=nv12,hwupload_vaapi" -codec:a:0 libfdk_aac -ac 6 -ab 640000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/var/lib/jellyfin/transcodes/1b4464283e5d372ce69bb95ebb884a86%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/1b4464283e5d372ce69bb95ebb884a86.m3u8"


ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
[AVHWDeviceContext @ 0x557ec6ffb1c0] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl=ocl:.0,device_vendor=Advanced Micro Devices' for option 'init_hw_device': No such device
Error parsing global options: No such device



RE: Change Tone-mapping Methods - nyanmisaka - 2024-06-25

We just bumped the kernel version check to linux 5.15 for AMDGPU+Vulkan, as required features were either incomplete or unstable in earlier kernels. Updating the kernel can resolve this issue.


RE: Change Tone-mapping Methods - oilyeagle - 2024-06-25

Damn, rhel8 and rhel9 are incompatible then, I will have to create a VM just for jellyfin. Thanks for the information.


RE: Change Tone-mapping Methods - oilyeagle - 2024-06-25

That did fix my issue, moving the docker container to a host with linux kernel of >6 has tone mapping working without a hitch. Thanks again.