Closed TheClockTwister closed 3 hours ago
ffmpeg 5.x does not have vaapi av1 at all and that is the reason why it is using software. If you use a newer version it will error out just like jellyfin-ffmpeg because most hardware acceleration api does not handle software fallbacks, and Apple VideoToolbox is the only exception. But for the AV1 case, even VideoToolbox does not expose any AV1 decoder on platforms lacking a hardware decoder, so if you run on a platform does not have hardware decoder of the codec, you don't specify -hwaccel vaapi
and you just use the hardware encoder.
In addition, there is no native AV1 decoder in FFmpeg, and the only decoder is implemented through the third-party DAV1D. And the hardware hwaccel depends on the native AV1 decoder, so it is impossible to automatically fall back from HWA to the AV1 software decoder.
Well, 2 minute response, clear resolution... 5-star rating! 😆 Thanks for clearifying!
Indeed, this works as expected:
/usr/lib/jellyfin-ffmpeg/ffmpeg -vaapi_device /dev/dri/renderD128 -i /media/Av1Test.mkv -vf 'format=nv12,hwupload' -c:v h264_vaapi -threads 0 out.mkv
Summary
While the official ffmpeg is able to decode the source file using software end encode the output using hardware, it seems that jellyfin-ffmpeg only supports all or nothing. I was able to transcode AV1 to h64 using SW decode and HW encode using ffmpeg, but not using jellyfin-ffmpeg witht thet same arguments.
PS: If you need more info, just comment ;) Thanks!
Steps To Reproduce
Running with ffmpeg (installed via apt inside jellyfin docker container)
Works fine and transcodes with 5x (on my machine and with HW-encoding of the h264 on Intel iGPU)
Running using jellyfin-ffmpeg
Gives
Expected Behavior
From the logs above, jellyfin-ffmpeg tries to use hardware to decode the AV1 source which thet GPU does not support. But the command was to only use hardware for encoding the h264 output.
I would expect it to behave the same as vanilla ffmpeg and only use it for encoding, unless specified
System
fc1b51f4be3fba725e42dae2022d9c6a5b069acce01bef04d32fdee025dc511e
jellyfin-ffmpeg version
ffmpeg version