Jellyfin Forum
SOLVED: No AMF decoder available for my Podman Jellyfin server (Docker image) - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: No AMF decoder available for my Podman Jellyfin server (Docker image) (/t-solved-no-amf-decoder-available-for-my-podman-jellyfin-server-docker-image)

Pages: 1 2


No AMF decoder available for my Podman Jellyfin server (Docker image) - dekomoon - 2023-06-19

(Sorry it is my first time posting in a forum like this. Not sure how to format the text, and add code blocks correctly.)

Problem: 
AV1 8-bit and 10-bit videos will not transcode to HEVC using AMF decoder. When I disabled transcode, AV1 videos are able to be played, but not doable because I have an old CPU. One thing that looked weird when I looked through the logs was that the decoder was missing AMF decoders. What should I do to be able to decode AV1 videos using my AMD GPU? I am using an Rx 7600.


Jellyfin Version: Podman w/ Docker Hub Image Latest Unstable (20230617.21-unstable)
OS: PikaOS (Ubuntu-based)
Install Method: podman-compose up (non-root)

The compose file used:
Code:
[/color]
[color=#000000][font=Menlo, Monaco, 'Courier New', monospace][color=#d4d4d4][color=#569cd6]version[/color]: [color=#ce9178]'3.5'[/color]
[color=#569cd6]services[/color]:
  [color=#569cd6]jellyfin[/color]:
    [color=#569cd6]image[/color]: [color=#ce9178]docker.io/jellyfin/jellyfin:unstable[/color]
    [color=#569cd6]container_name[/color]: [color=#ce9178]jellyfin[/color]
    [color=#569cd6]user[/color]: [color=#ce9178]1000:1000[/color]
    [color=#569cd6]userns_mode[/color]: [color=#ce9178]keep-id[/color]
    [color=#569cd6]devices[/color]:
      - [color=#ce9178]"/dev/dri/renderD129:/dev/dri/renderD129"[/color]
    [color=#569cd6]ports[/color]:
      - [color=#ce9178]"8096:8096/tcp"[/color]
    [color=#569cd6]volumes[/color]:
      - [color=#ce9178]./config:/config:Z[/color]
      - [color=#ce9178]./cache:/cache:Z[/color]
      - [color=#ce9178]/mnt/data/media:/media:ro,Z[/color]
    [color=#569cd6]restart[/color]: [color=#ce9178]'unless-stopped'[/color][/color][/font][/color]
[color=#000000]


podman-compose logs:
Code:
[color=#000000][21:27:21] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version 5.1.3[/color]
[color=#000000][21:27:21] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available decoders: ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h264_qsv", "h264_cuvid", "hevc", "hevc_qsv", "hevc_cuvid", "mpeg2video", "mpeg2_qsv", "mpeg2_cuvid", "mpeg4", "mpeg4_cuvid", "msmpeg4", "vc1_qsv", "vc1_cuvid", "vp8", "libvpx", "vp8_cuvid", "vp8_qsv", "vp9", "libvpx-vp9", "vp9_cuvid", "vp9_qsv", "aac", "ac3", "dca", "flac", "mp3", "truehd"][/color]
[color=#000000][21:27:21] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available encoders: ["libx264", "h264_amf", "h264_nvenc", "h264_qsv", "h264_v4l2m2m", "h264_vaapi", "libx265", "hevc_amf", "hevc_nvenc", "hevc_qsv", "hevc_vaapi", "mpeg4", "msmpeg4", "libvpx", "libvpx-vp9", "aac", "libfdk_aac", "ac3", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"][/color]
[color=#000000][21:27:22] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["deinterlace_qsv", "deinterlace_vaapi", "hwupload_cuda", "hwupload_vaapi", "libplacebo", "overlay_opencl", "overlay_qsv", "overlay_vaapi", "overlay_vulkan", "overlay_cuda", "procamp_vaapi", "scale_cuda", "scale_opencl", "scale_qsv", "scale_vaapi", "scale_vulkan", "tonemap_cuda", "tonemap_opencl", "tonemap_vaapi", "vpp_qsv", "yadif_cuda", "zscale", "alphasrc"][/color]
[color=#000000][21:27:22] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"][/color]
[color=#000000][21:27:22] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: /usr/lib/jellyfin-ffmpeg/ffmpeg[/color]



RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - crobibero - 2023-06-20

It sounds like you’re asking for this PR that was opened earlier today? https://github.com/jellyfin/jellyfin/pull/9907

We don’t support unstable versions as they haven’t been released yet and are.. unstable.


RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - dekomoon - 2023-06-20

Hi, I was actually looking at a similar post on reddit earlier, and it seems like a docker image is provided for that preview, but, I am looking for hardware decoding/acceleration, and not hardware encoding. Is my belief wrong that AMF AV1 decoder has already been implemented? Is AMF AV1 hardware decoding a future feature that will be merged by nyanmisaka's PR request?

I rolled back to the stable image, and no amf decoder support showed up at all even though av1 qsv and nvenc decoders showed up (even though I don't have a capable iGPU or dGPU for these two...). Does Jellyfin not support AMF decoding? Are there some settings I have to turn on in docker-compose.yml to enable AMF?



This was the result of me rolling back to the stable image and enabling amf transcoding in the web gui:
Code:
[01:46:14] [INF] [36] Jellyfin.Api.Helpers.TranscodingJobHelper: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M  -i file:"/media/miku/test.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_amf -quality speed -rc cbr -qmin 0 -qmax 32 -b:v 1876712 -maxrate 1876712 -bufsize 3753424 -g:v:0 180 -keyint_min:v:0 180 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,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=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -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 "/config/transcodes/210598af3f23e8f96f1d8c8ffb1df7a7%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/transcodes/210598af3f23e8f96f1d8c8ffb1df7a7.m3u8"
[01:46:14] [ERR] [34] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 134
[01:46:14] [ERR] [34] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL GET /videos/36de2ac7-ef46-2d64-9cd2-8af15768bd36/hls1/main/0.ts.
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 134



RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - dekomoon - 2023-06-20

This is what my compose file looks like right now:
Code:
version: '3.5'
services:
  jellyfin:
    image: docker.io/jellyfin/jellyfin:latest
    container_name: jellyfin
    user: 1000:1000
    userns_mode: keep-id
    devices:
      - "/dev/dri/renderD129:/dev/dri/renderD129"
      - "/dev/dri/card1:/dev/dri/card1"
    ports:
      - "8096:8096/tcp"
    volumes:
      - ./config:/config:Z
      - ./cache:/cache:Z
      - /mnt/data/media:/media:ro,Z
    restart: 'unless-stopped'



RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - nyanmisaka - 2023-06-20

AMD VA-API works more reliable on Linux. AMF is a mess on Linux so I'd not recommend it.

See reasons - https://jellyfin.org/docs/general/administration/hardware-acceleration/amd#acceleration-methods


RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - dekomoon - 2023-06-20

(2023-06-20, 12:14 AM)crobibero Wrote: It sounds like you’re asking for this PR that was opened earlier today? https://github.com/jellyfin/jellyfin/pull/9907

We don’t support unstable versions as they haven’t been released yet and are.. unstable.

(2023-06-20, 10:29 AM)nyanmisaka Wrote: AMD VA-API works more reliable on Linux. AMF is a mess on Linux so I'd not recommend it.

See reasons - https://jellyfin.org/docs/general/administration/hardware-acceleration/amd#acceleration-methods

I see. Then does VA-API currently support AV1 8-bit and 10-bit decode currently?


RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - dekomoon - 2023-06-20

I just tried setting transcode to VA-API, and changed renderD128 to renderD129, since my dGPU is D129, and now I am no longer getting a ffmpeg error 134, but now I am getting error 1


RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - nyanmisaka - 2023-06-20

Yes, the AV1 hardware decoding has been supported for years. Such as on RX 6000 series cards.

Our official docker use Debian bullseye as the base image but it’s LLVM runtime is too old for RX 7000. We will update it to Debian bookworm later. You can try the image from Linuxserver.io instead for the time being.


RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - dekomoon - 2023-06-21

(2023-06-20, 07:50 PM)nyanmisaka Wrote: Yes, the AV1 hardware decoding has been supported for years. Such as on RX 6000 series cards.

Our official docker use Debian bullseye as the base image but it’s LLVM runtime is too old for RX 7000. We will update it to Debian bookworm later. You can try the image from Linuxserver.io instead for the time being.

Hi I just tried linuxserver.io's image with amd mod. Unfortunately, the list of decoders is still the same, and there doesn't seem to be VA-API decoders available? When I tried to play AV1 video, it says that there was a playback error with ffmpeg error 1.


Maybe something is wrong with my compose file?

Code:
[color=#000000][font=Menlo]version: '3.5'[/font][/color]
[color=#000000][font=Menlo]services:[/font][/color]
[color=#000000][font=Menlo]  jellyfin:[/font][/color]
[color=#000000][font=Menlo]    image: docker.io/linuxserver/jellyfin:latest[/font][/color]
[color=#000000][font=Menlo]    container_name: jellyfin[/font][/color]
[color=#000000][font=Menlo]    environment:[/font][/color]
[color=#000000][font=Menlo]      - DOCKER_MODS=docker.io/linuxserver/mods:jellyfin-amd[/font][/color]
[color=#000000][font=Menlo]      - PUID=1000[/font][/color]
[color=#000000][font=Menlo]      - PGID=1000[/font][/color]
[color=#000000][font=Menlo]      - TZ=America/New_York[/font][/color]
[color=#000000][font=Menlo]    devices:[/font][/color]
[color=#000000][font=Menlo]      - /dev/dri:/dev/dri[/font][/color]
[color=#000000][font=Menlo]      - /dev/kfd:/dev/kfd[/font][/color]
[color=#000000][font=Menlo]    ports:[/font][/color]
[color=#000000][font=Menlo]      - "8096:8096/tcp"[/font][/color]
[color=#000000][font=Menlo]    volumes:[/font][/color]
[color=#000000][font=Menlo]      - ./config:/config[/font][/color]
[color=#000000][font=Menlo]      - /mnt/data/media/miku:/data/miku[/font][/color]
[color=#000000][font=Menlo]      - /mnt/data/media/anime:/data/anime[/font][/color]
[color=#000000][font=Menlo]    restart: 'unless-stopped'[/font][/color]

(I also attached a log of the compose build setup)
(To make sure it is not because I configured the transcode options wrong, I have also attached screenshots of the transcode settings)


RE: No AMF decoder available for my Podman Jellyfin server (Docker image) - nyanmisaka - 2023-06-21

Can you share the FFmpeg transcode log? You can find it in dashboard->logs.