Jellyfin transcoding issues on Bazzite?
I'm running my Jellyfin server on Bazzite, my client devices (chromecast, iPad) seem to have issues playing certain file types (avi, mkv). Other files (mp4) play fine. Looks like some sort of transcoding issue? Logs from Jellyfin have an error: [h264_amf @ 0x5624d19a3f80] DLL libamfrt64.so.1 failed to open
Google results mention issues like this on AMD systems under linux, I'm running an AMD CPU (7700) and GPU (6700). I didn't find a sure solution though and I'm new to immutable linux so I wasn't sure if I found a fix whether it would be applicable anyway? So I thought I'd ask here rather than on Jellyfin... Partial (mkv) log is posted below, hit the char limit, thanks from a former windows user.
14 Replies
ffmpeg version 7.0.2-Jellyfin Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.3.0 (GCC)
configuration: --prefix=/app --disable-doc --disable-ffplay --disable-libxcb --disable-ptx-compression --disable-sdl2 --disable-static --disable-xlib --enable-chromaprint --enable-gmp --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libsvtav1 --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lto=auto --enable-opencl --enable-shared --enable-version3 --extra-libs=-lfftw3f --extra-version=Jellyfin --target-os=linux --enable-libvpl --enable-amf --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-libplacebo --enable-libshaderc --enable-nvdec --enable-nvenc --enable-vaapi --enable-vulkan
libavutil 59. 8.100 / 59. 8.100
libavcodec 61. 3.100 / 61. 3.100
libavformat 61. 1.100 / 61. 1.100
libavdevice 61. 1.100 / 61. 1.100
libavfilter 10. 1.100 / 10. 1.100
libswscale 8. 1.100 / 8. 1.100
libswresample 5. 1.100 / 5. 1.100
libpostproc 58. 1.100 / 58. 1.100
Input #0, matroska,webm, from 'file:/***.mkv':
Metadata:
ENCODER : Lavf58.76.100
Duration: 00:43:38.56, start: 0.000000, bitrate: 1510 kb/s
Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv, bt709, progressive), 1920x960 [SAR 1:1 DAR 2:1], 23.98 fps, 23.98 tbr, 1k tbn (default)
Metadata:
ENCODER : Lavc58.134.100 libx265
DURATION : 00:43:38.533000000
Stream #0:1(eng): Audio: eac3 (Dolby Digital Plus + Dolby Atmos), 48000 Hz, 5.1(side), fltp, 768 kb/s (default)
Metadata:
DURATION : 00:43:38.560000000
Stream #0:2(eng): Subtitle: ass (ssa) (default)
Metadata:
title : English
ENCODER : Lavc58.134.100 ssa
DURATION : 00:42:43.856000000
[Parsed_subtitles_3 @ 0x5624d19e9c80] libass API version: 0x1704000
[Parsed_subtitles_3 @ 0x5624d19e9c80] libass source: commit: 0.17.4-0-gbbb3c7f1570a4a021e52683f3fbdf74fe492ae84
[Parsed_subtitles_3 @ 0x5624d19e9c80] Shaper: FriBidi 1.0.16 (SIMPLE) HarfBuzz-ng 9.0.0 (COMPLEX)
[Parsed_subtitles_3 @ 0x5624d19e9c80] Using font provider fontconfig
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_amf))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[Parsed_subtitles_3 @ 0x7fa0b0011f80] libass API version: 0x1704000
[Parsed_subtitles_3 @ 0x7fa0b0011f80] libass source: commit: 0.17.4-0-gbbb3c7f1570a4a021e52683f3fbdf74fe492ae84
[Parsed_subtitles_3 @ 0x7fa0b0011f80] Shaper: FriBidi 1.0.16 (SIMPLE) HarfBuzz-ng 9.0.0 (COMPLEX)
[Parsed_subtitles_3 @ 0x7fa0b0011f80] Using font provider fontconfig
[h264_amf @ 0x5624d19a3f80] DLL libamfrt64.so.1 failed to open
free(): double free detected in tcache 2
I found this article about AMD AMF, https://gpuopen.com/advanced-media-framework/
It looks like AMF is included as part of the newer AMD drivers under linux but only on supported systems. With bazzite it looks like it will need to be installed as an optional component? help!
AMD GPUOpen
Advanced Media Framework
The Advanced Media Framework SDK provides developers with optimal access to AMD GPUs for multimedia processing.
how did you run jellyfin
Flatpak
Using the official Jellyfin app on the client devices
whats is the output of this
flatpak list --all | grep org.freedesktop.Platform.ffmpeg
FFmpeg extension with extra codecs org.freedesktop.Platform.ffmpeg-full 24.08 system
i386 org.freedesktop.Platform.ffmpeg_full.i386 24.08 system
looking into their manifest it looks like they should include everything
you probably need to report it to the flatpak maintainer
GitHub
GitHub - flathub/org.jellyfin.JellyfinServer
Contribute to flathub/org.jellyfin.JellyfinServer development by creating an account on GitHub.
I can do that. You don't think it is related to the AMF document I linked above? It looks like AMF (transcoding functions) wouldn't be installed automatically and would have to be specified at install as Bazzite isn't on the supported distro list.
yes but flatpak doesnt use host library
they either bundle or get it from shared runtime
as reminder AMF will be deprecated soon
so you need to use VAAPI
AMD GPU | Jellyfin
This tutorial guides you on setting up full video hardware acceleration on AMD integrated GPU and discrete GPU via AMF or VA-API. If you are on macOS, please use VideoToolbox instead.

I've changed hardware acceleration to VA-API, restarted the jellyfin server. New error:
[AVHWDeviceContext @ 0x55a52e43b580] Failed to initialise VAAPI connection: -1 (unknown libva error).
[AVFilterGraph @ 0x55a52dff8980] Error initializing filters
[vost#0:0/h264_vaapi @ 0x55a52e022a40] Error initializing a simple filtergraph
Error opening output file /home/bazzite/.var/app/org.jellyfin.JellyfinServer/cache/jellyfin/transcodes/6a6bf27659cc07836b2b903f88181e84.m3u8.
Error opening output files: Input/output error
I've done my best to follow the provided document. From the transcoding logs it appears taht the Jellyfin-ffmpeg7 package is being used. I've performed the other host checks: renderD device exists, supported VAAPI codeds and Vulkan runtime status on the host.
Opened an issue on the github, Transcoding Hardware Acceration AMD GPU #600
If anyone has any other troubleshooting steps, I'm all ears!
More testing; it seems that hardware decoding is working. It's hardware encoding that breaks it.
I've set up decoding as per: https://www.amd.com/en/products/graphics/radeon-for-creators/video-editing.html#tabs-b6a36ad588-item-4a96864c55-tab
Hardware decoding selected for: H264, HEVC, VP9, AV1, HEVC 10bit, VP9 10bit