Jellyfin Forum
SOLVED: AV1 transcoding using QSV doesn't work? - 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: AV1 transcoding using QSV doesn't work? (/t-solved-av1-transcoding-using-qsv-doesn-t-work)



AV1 transcoding using QSV doesn't work? - seemebreakthis - 2024-02-01

I came across an AV1 video for the first time.  Tried to play it in Jellyfin but no go.  Here is the entire ffmpeg log below, and this particular line seems to be the culprit:

[av1_qsv @ 0x561a80d89340] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented

So is anything missing in my setup?

Thanks for any help !

Code:
/videos/2a604eaf-3a77-010b-9033-7b4e1d1c195c/hls1/main/1.ts

{"Protocol":0,"Id":"2a604eaf3a77010b90337b4e1d1c195c","Path":"/media/4K Demos/CityHall_3840x2160.webm","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":18809864,"Name":"CityHall_3840x2160","IsRemote":false,"ETag":"3b176493c36f92390a86b8b54beebaf2","RunTimeTicks":99833328,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"av1","CodecTag":null,"Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","VideoRangeType":"SDR","VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"4K AV1 SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":15073013,"BitDepth":8,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":2160,"Width":3840,"AverageFrameRate":60,"RealFrameRate":60,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":13,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":15073013,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -ss 00:00:03.000 -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -c:v av1_qsv -autorotate 0 -i file:"/media/4K Demos/CityHall_3840x2160.webm" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map -0:a -map -0:s -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 528000 -maxrate 528000 -bufsize 1056000 -g:v:0 180 -keyint_min:v:0 180 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_qsv=w=640:h=360:format=nv12"  -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 1 -hls_segment_filename "/config/data/transcodes/e28d9788ed37a961295951caa5cacb03%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/e28d9788ed37a961295951caa5cacb03.m3u8"


ffmpeg version 5.1.4-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --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-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      57. 28.100 / 57. 28.100
  libavcodec    59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter    8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample  4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[libdav1d @ 0x561a80d34600] libdav1d 1.3.0-0-g4803559
Input #0, matroska,webm, from 'file:/media/4K Demos/CityHall_3840x2160.webm':
  Metadata:
    encoder        : libwebm-0.3.0.0
    ENCODER_SETTINGS: version:3.3.0 --i420 --passes=1 --usage=0 --threads=16 --width=3840 --height=2160 --fps=60/1 --bit-depth=8 --input-bit-depth=8 --superres-mode=0 --target-bitrate=16000 --kf-min-dist=60 --kf-max-dist=60 --cpu-used=6 --sb-size=128 --enable-interintra-comp=1
  Duration: 00:00:09.98, start: 0.000000, bitrate: 15073 kb/s
  Stream #0:0(eng): Video: av1 (Main), yuv420p(tv), 3840x2160 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn (default)
Stream mapping:
  Stream #0:0 -> #0:0 (av1 (av1_qsv) -> h264 (h264_qsv))
Press [q] to stop, [?] for help
[av1_qsv @ 0x561a80d89340] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented
[av1_qsv @ 0x561a80d89340] More data is required to decode header
    Last message repeated 58 times
[av1_qsv @ 0x561a80d89340] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented
[av1_qsv @ 0x561a80d89340] More data is required to decode header
    Last message repeated 58 times
[av1_qsv @ 0x561a80d89340] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented
[av1_qsv @ 0x561a80d89340] More data is required to decode header
    Last message repeated 58 times
[av1_qsv @ 0x561a80d89340] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented
[av1_qsv @ 0x561a80d89340] More data is required to decode header
    Last message repeated 58 times
[av1_qsv @ 0x561a80d89340] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented
[av1_qsv @ 0x561a80d89340] More data is required to decode header
    Last message repeated 58 times
[av1_qsv @ 0x561a80d89340] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented
[av1_qsv @ 0x561a80d89340] More data is required to decode header
    Last message repeated 58 times
[av1_qsv @ 0x561a80d89340] Error initializing the MFX video decoder: unsupported (-3)
Error while decoding stream #0:0: Function not implemented
[av1_qsv @ 0x561a80d89340] More data is required to decode header
    Last message repeated 58 times
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[av1_qsv @ 0x561a80d89340] video_get_buffer: image parameters invalid
[av1_qsv @ 0x561a80d89340] get_buffer() failed
[av1_qsv @ 0x561a80d89340] Too many errors when draining, this is a bug. Stop draining and force EOF.
Error while decoding stream #0:0: Internal bug, should not have happened
Output #0, hls, to '/config/data/transcodes/e28d9788ed37a961295951caa5cacb03.m3u8':
  Metadata:
    encoder        : Lavf59.27.100
  Stream #0:0: Video: h264, nv12, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 528 kb/s, 60 fps, 90k tbn (default)
    Metadata:
      encoder        : Lavc59.37.100 h264_qsv
    Side data:
      cpb: bitrate max/min/avg: 528000/0/528000 buffer size: 1056000 vbv_delay: N/A
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=  0x   
[hls @ 0x561a80d89f80] Opening '/config/data/transcodes/e28d9788ed37a961295951caa5cacb031.ts' for writing
frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=  0x   
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!



RE: AV1 transcoding using QSV doesn't work? - TheDreadPirate - 2024-02-01

What CPU do you have? Only 11th Gen Intel CPUs and newer can decode AV1 with Quick Sync. And Intel Arc. If you have an older Intel CPU you need to UNCHECK AV1 in Dashboard > Playback so that it uses the CPU to decode the video.


RE: AV1 transcoding using QSV doesn't work? - seemebreakthis - 2024-02-01

(2024-02-01, 05:43 AM)TheDreadPirate Wrote: What CPU do you have?  Only 11th Gen Intel CPUs and newer can decode AV1 with Quick Sync.  And Intel Arc.  If you have an older Intel CPU you need to UNCHECK AV1 in Dashboard > Playback so that it uses the CPU to decode the video.

Thanks.  This explains it.

I did a quick check and my shoddy Synology DS220+ runs on a gen 9 UHD Graphics 600.

Thanks for pointing this out.