jellyfin / jellyfin-ffmpeg

FFmpeg for Jellyfin
https://jellyfin.org
Other
503 stars 131 forks source link

jellyfin ffmpeg stops working for me after update 10.9.0 to 10.9.3 but issue is ffmpeg from to 6.0.1-3 to -7 #394

Closed pbvdven closed 5 months ago

pbvdven commented 5 months ago

Describe The Bug jellyfin ffmpeg stops working for me after container update but issue is ffmpeg from to 6.0.1-3 to -7

Steps To Reproduce move from ffmpeg 6.0.1-3 to -7

the change is somewhere between version -4 "still works" and -5 "stops working"

Error: no hw possible only direct play this: /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va output: 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-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 @ 0x628b695e26c0] Cannot open a VA display from DRM device /dev/dri/renderD128. Device creation failed: -542398533. Failed to set value 'vaapi=va:/dev/dri/renderD128' for option 'init_hw_device': Generic error in an external library Error parsing global options: Generic error in an external library

System (please complete the following information):

Shadowghost commented 5 months ago

What Kernel version are you running on?

pbvdven commented 5 months ago

6.5.13-3-pve

pbvdven commented 5 months ago

on 10.9.0 with jellyfin-ffmpeg6 -4 i have have it working just fine also tone mapping for HDR works. but when i update to jellyfin-ffmpeg6 -5 it stops working no HW at all. Even on clean install i dont get HW working at all with the latest version of jellyfin 10.9.3. with ffmpeg6 -7

But 10.9.0 with ffmpeg6 1-4 is rock solid i don't have the need to update right a way but would like to get this fixed. So any help would be gladly appreciated.

thanks

i do use the virtual function of the igpu from the i9 13900H

gnattu commented 5 months ago

So you are using the unofficial kernel patch to enable VFIO? I guess we can do little for this setup if it really is the case. But have you tried 10.9.3 with previous version of Jellyfin-ffmpeg? Just to make sure of it is really the ffmpeg side issue.

nyanmisaka commented 5 months ago

libdrm no longer allows incorrect device file mappings. (renderD129 mapped as renderD128)

See also https://github.com/jellyfin/jellyfin-ffmpeg/issues/297

pbvdven commented 5 months ago

So you are using the unofficial kernel patch to enable VFIO? I guess we can do little for this setup if it really is the case. But have you tried 10.9.3 with previous version of Jellyfin-ffmpeg? Just to make sure of it is really the ffmpeg side issue.

Yes use the unofficial patch i understand.

I didn't do that but i did use 10.9.0 with ffmpeg 1-3, 1-4 and then from 1-5 its broken up to 1-7

pbvdven commented 5 months ago

libdrm no longer allows incorrect device file mappings. (renderD129 mapped as renderD128)

See also https://github.com/jellyfin/jellyfin-ffmpeg/issues/297

I didn't know that and i couldn't find any thing about the issue. But thanks i check it out if thats also my issue

pbvdven commented 5 months ago

@gnattu i found out that the ffmpeg command changed the old command still works on the new version 10.9.3 but is passes a different syntax that not works for me.

is it possible for me to change the syntax/configuration passed to ffmpeg?

Its the same movie, same file

this is the working old syntax it works on both 10.9.0 and 10.9.3 /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device opencl=ocl:0.0 -filter_hw_device ocl -hwaccel vaapi -hwaccel_output_format vaapi -autorotate 0 -i file:"/data/share/sd1/movies/Civil War (2024)/Civil War (2024) WEBDL-2160p.mkv" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi -rc_mode VBR -b:v 24816798 -maxrate 24816798 -bufsize 49633596 -sei -a53_cc -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwdownload,format=p010le,hwupload=derive_device=opencl,tonemap_opencl=format=nv12:p=bt709:t=bt709:m=bt709:tonemap=bt2390:peak=100:desat=0,hwdownload,format=nv12,hwupload_vaapi" -codec:a:0 libfdk_aac -ac 6 -ab 640000 -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/data/transcodes/7eb3dc99a6c79d2ba4cbd1f4cf37f0d3%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/7eb3dc99a6c79d2ba4cbd1f4cf37f0d3.m3u8"

Output Input #0, matroska,webm, from 'file:/data/share/sd1/movies/Civil War (2024)/Civil War (2024) WEBDL-2160p.mkv': Metadata: encoder : libebml v1.4.5 + libmatroska v1.7.1 Duration: 01:48:45.25, start: 0.000000, bitrate: 14890 kb/s Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 3836x2072 [SAR 1:1 DAR 137:74], 23.98 fps, 23.98 tbr, 1k tbn (default) Side data: DOVI configuration record: version: 1.0, profile: 5, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0 Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s (default) Stream #0:2(eng): Subtitle: subrip Metadata: title : English Stream #0:3(spa): Subtitle: subrip Metadata: title : Latin America Spanish Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_vaapi)) Stream #0:1 -> #0:1 (eac3 (native) -> aac (libfdk_aac)) Press [q] to stop, [?] for help Output #0, hls, to '/config/data/transcodes/7eb3dc99a6c79d2ba4cbd1f4cf37f0d3.m3u8': Metadata: encoder : Lavf60.3.100 Stream #0:0: Video: h264 (High), vaapi(tv, bt709, progressive), 3836x2072 [SAR 1:1 DAR 137:74], q=2-31, 24816 kb/s, 23.98 fps, 90k tbn (default) Metadata: encoder : Lavc60.3.100 h264_vaapi Side data: DOVI configuration record: version: 1.0, profile: 5, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0 Stream #0:1: Audio: aac, 48000 Hz, 5.1, s16, 640 kb/s (default) Metadata: encoder : Lavc60.3.100 libfdk_aac frame= 54 fps= 24 q=-0.0 size=N/A time=00:00:02.24 bitrate=N/A speed=1.02x [hls @ 0x5807dd836940] Opening '/config/data/transcodes/7eb3dc99a6c79d2ba4cbd1f4cf37f0d30.ts' for writing [hls @ 0x5807dd836940] Opening '/config/data/transcodes/7eb3dc99a6c79d2ba4cbd1f4cf37f0d31.ts' for writing [hls @ 0x5807dd836940] Opening '/config/data/transcodes/7eb3dc99a6c79d2ba4cbd1f4cf37f0d32.ts' for writing

This is the new syntax used with the latest version of jellyfin 10.9.3 and thats not working for me at least /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device vaapi=va:/dev/dri/renderD130,driver=iHD -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:"/data/share/sd1/movies/Civil War (2024)/Civil War (2024) WEBDL-2160p.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_vaapi -rc_mode VBR -b:v 14890079 -maxrate 14890079 -bufsize 29780158 -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwmap=derive_device=opencl,tonemap_opencl=format=nv12:p=bt709:t=bt709:m=bt709:tonemap=bt2390:peak=100:desat=0,hwmap=derive_device=vaapi:reverse=1,format=vaapi" -codec:a:0 copy -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "f73369707ed0a93377fb3a19ce827a64-1.mp4" -start_number 0 -hls_segment_filename "/config/data/transcodes/f73369707ed0a93377fb3a19ce827a64%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/f73369707ed0a93377fb3a19ce827a64.m3u8"

Output: Input #0, matroska,webm, from 'file:/data/share/sd1/movies/Civil War (2024)/Civil War (2024) WEBDL-2160p.mkv': Metadata: encoder : libebml v1.4.5 + libmatroska v1.7.1 Duration: 01:48:45.25, start: 0.000000, bitrate: 14890 kb/s Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 3836x2072 [SAR 1:1 DAR 137:74], 23.98 fps, 23.98 tbr, 1k tbn (default) Side data: DOVI configuration record: version: 1.0, profile: 5, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0 Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s (default) Stream #0:2(eng): Subtitle: subrip Metadata: title : English Stream #0:3(spa): Subtitle: subrip Metadata: title : Latin America Spanish Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> av1 (av1_vaapi)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [av1_vaapi @ 0x629c5b6c5b00] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32). [vost#0:0/av1_vaapi @ 0x629c5b6c5800] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

@nyanmisaka this 128 >129 naming was not the issue i am having but thanks i still didn't know this could be an issue

nyanmisaka commented 5 months ago

Please disable the unsupported AV1 encoder and try again.

[av1_vaapi @ 0x629c5b6c5b00] No usable encoding entrypoint found for profile 
pbvdven commented 5 months ago

Please disable the unsupported AV1 encoder and try again.


[av1_vaapi @ 0x629c5b6c5b00] No usable encoding entrypoint found for profile 

Nope no success and av1 should also work with 13gen it always has on 10.9.0 at least it was always checked ✅

But thanks just stay on 10.9.0 for now

nyanmisaka commented 5 months ago

FYI the 13th Gen only has AV1 decoder, not encoder.