Jellyfin Forum
SOLVED: ffmpeg error on subtitles, possibly related to 10.9.9 update - 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: ffmpeg error on subtitles, possibly related to 10.9.9 update (/t-solved-ffmpeg-error-on-subtitles-possibly-related-to-10-9-9-update)



ffmpeg error on subtitles, possibly related to 10.9.9 update - propernoun - 2024-08-09

My Jellyfin server has been working fine since I set it up in February, but it has suddenly started having playback errors when trying to stream a video with subtitles. Turning off subtitles will allow the video to play without issue, but then when I turn subtitles on the video player immediately starts hitting errors until it gives up and quits. I have tested this with video files that I watched just last week - with subtitles - and had no issue then, but the same videos cannot be played with subtitles now.

I am running Jellyfin v10.9.9 on an Ubuntu 22.04 server. I saw a recent thread discussing very similar symptoms and the exact same ffmpeg error that I have, but that thread focused in on a Docker issue, and I am not using Docker. The ffmpeg error from the log: "Failed to set value 'vaapi=va:,kernel_driver=i915,driver=iHD' for option 'init_hw_device': Invalid argument"

My server CPU is an Intel Alder Lake N100 and I do have Intel QuickSync hardware acceleration for transcoding enabled. As I mentioned, this setup has been working fine for several months, and I have not gone into the settings or configurations of anything at all recently, so I suspect that appearance of the issue is somehow related to the recent Jellyfin update. Unfortunately, I am not very experienced with Linux and that is making it difficult for me to debug the issue.

Here are the ffmpeg logs:
Code:
{"Protocol":0,"Id":"e36c632c03d8944524e7e4585868111d","Path":"/home/william/shows/Ping Pong The Animation/Ping Pong The Animation - S01E04.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":918955648,"Name":"Ping Pong The Animation - S01E04","IsRemote":false,"ETag":"11df2955148baf137ac9afe485fe99a0","RunTimeTicks":13720469504,"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":"hevc","CodecTag":null,"Language":"jpn","ColorRange":null,"ColorSpace":"bt709","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":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"1080p HEVC SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":5358158,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":1080,"Width":1920,"AverageFrameRate":23.976025,"RealFrameRate":23.976025,"Profile":"Main 10","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p10le","Level":150,"IsAnamorphic":null},{"Codec":"opus","CodecTag":null,"Language":"jpn","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":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":"Default","LocalizedForced":null,"LocalizedExternal":"External","LocalizedHearingImpaired":null,"DisplayTitle":"Japanese - OPUS - Stereo - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"stereo","BitRate":92963,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":48000,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"ass","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":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":"Undefined","LocalizedDefault":"Default","LocalizedForced":"Forced","LocalizedExternal":"External","LocalizedHearingImpaired":"Hearing Impaired","DisplayTitle":"English - Default - ASS","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":2,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":3,"FileName":"AGENCYB.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":4,"FileName":"ARCHRISTY.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":5,"FileName":"CartoonDemiBold.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":6,"FileName":"erasdust.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":7,"FileName":"FeltTipRoman-Regular.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":8,"FileName":"manic-depressive.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":9,"FileName":"MSTKRUFC.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":10,"FileName":"QuaySansMdITCTT Italic.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":11,"FileName":"QuaySansMdITCTT.ttf","MimeType":"application/x-truetype-font","DeliveryUrl":null},{"Codec":"ttf","CodecTag":"[0][0][0][0]","Comment":null,"Index":12,"FileName":"JoannaMTStd-SemiBold-mod.otf","MimeType":"application/x-truetype-font","DeliveryUrl":null}],"Formats":[],"Bitrate":5451121,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:"/home/william/shows/Ping Pong The Animation/Ping Pong The Animation - S01E04.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:0 -codec:v:0 h264_qsv -low_power 1 -preset veryfast -look_ahead 0 -b:v 8930263 -maxrate 8930263 -bufsize 17860526 -g:v:0 72 -keyint_min:v:0 72 -filter_complex "alphasrc=s=1920x1080:r=23.976025:start='0',format=bgra,subtitles=f='/home/william/shows/Ping Pong The Animation/Ping Pong The Animation - S01E04.mkv':si=0:alpha=1:sub2video=1:fontsdir='/var/cache/jellyfin/attachments/e36c632c03d8944524e7e4585868111d',hwupload=derive_device=qsv:extra_hw_frames=64[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=format=nv12:extra_hw_frames=24,hwmap=derive_device=qsv,format=qsv[main];[main][sub]overlay_qsv=eof_action=pass:repeatlast=0:w=1920:h=1080" -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 92963 -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/62f22aefb0e47c9e79b67be882b7d580%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/62f22aefb0e47c9e79b67be882b7d580.m3u8"


ffmpeg version 6.0.1-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-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-libxml2 --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
[AVHWDeviceContext @ 0x555579374380] No VA display found for any default device.
Device creation failed: -22.
Failed to set value 'vaapi=va:,kernel_driver=i915,driver=iHD' for option 'init_hw_device': Invalid argument
Error parsing global options: Invalid argument


Here I have the dpkg log contents for all the instances of the text "jellyfin", I hope that this shows that I am running the latest versions of all of the Jellyfin packages. I noticed that the main Jellyfin package was being held back from upgrading, so I forced that to upgrade as well, but that did not resolve the issue.
Code:
2024-07-29 00:16:16 upgrade jellyfin-server:amd64 10.9.7+ubu2204 10.9.8+ubu2204
2024-07-29 00:16:16 status half-configured jellyfin-server:amd64 10.9.7+ubu2204
2024-07-29 00:16:31 status unpacked jellyfin-server:amd64 10.9.7+ubu2204
2024-07-29 00:16:31 status half-installed jellyfin-server:amd64 10.9.7+ubu2204
2024-07-29 00:16:33 status unpacked jellyfin-server:amd64 10.9.8+ubu2204
2024-07-29 00:16:33 upgrade jellyfin-web:all 10.9.7+ubu2204 10.9.8+ubu2204
2024-07-29 00:16:33 status half-configured jellyfin-web:all 10.9.7+ubu2204
2024-07-29 00:16:33 status unpacked jellyfin-web:all 10.9.7+ubu2204
2024-07-29 00:16:33 status half-installed jellyfin-web:all 10.9.7+ubu2204
2024-07-29 00:16:34 status unpacked jellyfin-web:all 10.9.8+ubu2204
2024-07-29 00:16:35 configure jellyfin-web:all 10.9.8+ubu2204 <none>
2024-07-29 00:16:35 status unpacked jellyfin-web:all 10.9.8+ubu2204
2024-07-29 00:16:35 status half-configured jellyfin-web:all 10.9.8+ubu2204
2024-07-29 00:16:35 status installed jellyfin-web:all 10.9.8+ubu2204
2024-07-29 00:16:35 configure jellyfin-server:amd64 10.9.8+ubu2204 <none>
2024-07-29 00:16:35 status unpacked jellyfin-server:amd64 10.9.8+ubu2204
2024-07-29 00:16:35 status half-configured jellyfin-server:amd64 10.9.8+ubu2204
2024-07-29 00:16:36 status installed jellyfin-server:amd64 10.9.8+ubu2204

2024-08-08 02:44:37 upgrade jellyfin-server:amd64 10.9.8+ubu2204 10.9.9+ubu2204
2024-08-08 02:44:37 status half-configured jellyfin-server:amd64 10.9.8+ubu2204
2024-08-08 02:44:52 status unpacked jellyfin-server:amd64 10.9.8+ubu2204
2024-08-08 02:44:52 status half-installed jellyfin-server:amd64 10.9.8+ubu2204
2024-08-08 02:44:53 status unpacked jellyfin-server:amd64 10.9.9+ubu2204
2024-08-08 02:44:53 upgrade jellyfin-web:all 10.9.8+ubu2204 10.9.9+ubu2204
2024-08-08 02:44:53 status half-configured jellyfin-web:all 10.9.8+ubu2204
2024-08-08 02:44:53 status unpacked jellyfin-web:all 10.9.8+ubu2204
2024-08-08 02:44:53 status half-installed jellyfin-web:all 10.9.8+ubu2204
2024-08-08 02:44:55 status unpacked jellyfin-web:all 10.9.9+ubu2204
2024-08-08 02:44:55 configure jellyfin-web:all 10.9.9+ubu2204 <none>
2024-08-08 02:44:55 status unpacked jellyfin-web:all 10.9.9+ubu2204
2024-08-08 02:44:55 status half-configured jellyfin-web:all 10.9.9+ubu2204
2024-08-08 02:44:55 status installed jellyfin-web:all 10.9.9+ubu2204
2024-08-08 02:44:55 configure jellyfin-server:amd64 10.9.9+ubu2204 <none>
2024-08-08 02:44:55 status unpacked jellyfin-server:amd64 10.9.9+ubu2204
2024-08-08 02:44:55 status half-configured jellyfin-server:amd64 10.9.9+ubu2204
2024-08-08 02:44:56 status installed jellyfin-server:amd64 10.9.9+ubu2204
2024-08-08 23:44:39 upgrade jellyfin:all 10.8.13-1 10.9.9+ubu2204
2024-08-08 23:44:39 status half-configured jellyfin:all 10.8.13-1
2024-08-08 23:44:39 status unpacked jellyfin:all 10.8.13-1
2024-08-08 23:44:39 status half-installed jellyfin:all 10.8.13-1
2024-08-08 23:44:39 status unpacked jellyfin:all 10.9.9+ubu2204
2024-08-08 23:44:39 status installed jellyfin-ffmpeg5:amd64 5.1.4-3-jammy
2024-08-08 23:44:39 remove jellyfin-ffmpeg5:amd64 5.1.4-3-jammy <none>
2024-08-08 23:44:39 status half-configured jellyfin-ffmpeg5:amd64 5.1.4-3-jammy
2024-08-08 23:44:39 status half-installed jellyfin-ffmpeg5:amd64 5.1.4-3-jammy
2024-08-08 23:44:39 status config-files jellyfin-ffmpeg5:amd64 5.1.4-3-jammy
2024-08-08 23:44:39 install jellyfin-ffmpeg6:amd64 <none> 6.0.1-8-jammy
2024-08-08 23:44:39 status half-installed jellyfin-ffmpeg6:amd64 6.0.1-8-jammy
2024-08-08 23:44:40 status unpacked jellyfin-ffmpeg6:amd64 6.0.1-8-jammy
2024-08-08 23:44:40 configure jellyfin-ffmpeg6:amd64 6.0.1-8-jammy <none>
2024-08-08 23:44:40 status unpacked jellyfin-ffmpeg6:amd64 6.0.1-8-jammy
2024-08-08 23:44:40 status half-configured jellyfin-ffmpeg6:amd64 6.0.1-8-jammy
2024-08-08 23:44:40 status installed jellyfin-ffmpeg6:amd64 6.0.1-8-jammy
2024-08-08 23:44:40 configure jellyfin:all 10.9.9+ubu2204 <none>
2024-08-08 23:44:40 status unpacked jellyfin:all 10.9.9+ubu2204
2024-08-08 23:44:40 status half-configured jellyfin:all 10.9.9+ubu2204
2024-08-08 23:44:40 status installed jellyfin:all 10.9.9+ubu2204

Any help anyone can provide will be greatly appreciated. Please let me know if there is any other useful information I can provide.


RE: ffmpeg error on subtitles, possibly related to 10.9.9 update - TheDreadPirate - 2024-08-09

Which kernel are you running? (sudo uname -a)

What is the output of these commands.

Code:
sudo /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128
sudo /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va



RE: ffmpeg error on subtitles, possibly related to 10.9.9 update - propernoun - 2024-08-09

The output from sudo uname -a is:
Linux kakarot 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

And for the other two commands

Code:
sudo /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
Failed to open the given device!

Code:
sudo /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va
ffmpeg version 6.0.1-Jellyfin Copyright © 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-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-libxml2 --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
[AVHWDeviceContext @ 0x5626110636c0] Failed to open /dev/dri/renderD128 as DRM device node.
[AVHWDeviceContext @ 0x5626110636c0] No VA display found for device /dev/dri/renderD128.
Device creation failed: -22.
Failed to set value 'vaapi=va:/dev/dri/renderD128' for option 'init_hw_device': Invalid argument
Error parsing global options: Invalid argument


RE: ffmpeg error on subtitles, possibly related to 10.9.9 update - TheDreadPirate - 2024-08-09

You need to use the HWE kernel. 5.15 does not fully support AlderLake's iGPU.

Code:
sudo apt install --install-recommends linux-generic-hwe-22.04



RE: ffmpeg error on subtitles, possibly related to 10.9.9 update - propernoun - 2024-08-09

That fixed it! So I guess the issue must have come from the kernel updating, rather than Jellyfin. Thanks a lot for your help.