Streams fail: No hw device found - creylon - 2023-09-18
Hi,
on my parents Sony TV some movies are not playing. With both ExoPlayer and LibVLC the player just reports an "error" and "retrying" when it ultimately fails. I tried latest stable as well as beta3 client. I also tried updating ffmpeg in the docker container. My best guess it, that is has something to do with 7.1 TrueHD audio tracks, as only the failing movies have them. Other movies with just DTS 5.1 work fine.
I run an AMD Ryzen 5 5600G with VAAPI hardware accelerrated transcoding. On my FireTV stick everything works without problems.
Logs
Thanks
Edit: Apparently the same movies also don't work on my FireTV
RE: Sony Android TV Movie Streams not working - TheDreadPirate - 2023-09-18
We would need your ffmpeg logs. All I can tell from the jellyfin log is that ffmpeg is failing.
RE: Sony Android TV Movie Streams not working - creylon - 2023-09-18
(2023-09-18, 06:38 PM)TheDreadPirate Wrote: We would need your ffmpeg logs. All I can tell from the jellyfin log is that ffmpeg is failing.
How do I get the ffmpeg logs?
After some more troubleshooting with my roommate we discovered that all movies work on my TV if we login with his user, when switching back to mine the movies stop to stream again. I've compared the personal playback preferences, which are the same for both of us. I also compared the user settings in jellyfin dashboard, again, the same settings.
After switching back and forth a couple of times the movies stopped working for him aswell.
Maybe its something with my nginx configuration? I am using the one from the jellyfin documentation.
RE: Streams only work for some users - TheDreadPirate - 2023-09-18
The ffmpeg logs are in the same directory as the one you posted.
RE: Streams only work for some users - creylon - 2023-09-18
(2023-09-18, 07:03 PM)TheDreadPirate Wrote: The ffmpeg logs are in the same directory as the one you posted.
Oh thanks, I always just recoreded the logs from docker.
Code: ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
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
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
[AVHWDeviceContext @ 0x5560e7556b80] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl=ocl:.0,device_vendor=Advanced Micro Devices' for option 'init_hw_device': No such device
Error parsing global options: No such device
So apparently it can't find the graphics card, right? But I don't get why.
EDIT: I've checked mesa, opencl and vulkan in my docker container:
Code: $ docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.18 (libva 2.18.0)
vainfo: Driver version: Mesa Gallium driver 23.1.0-devel for AMD Radeon Graphics (renoir, LLVM 13.0.1, DRM 3.49, 6.1.53-1-lts)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
Code: $ docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device opencl
ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
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
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument opencl.
[AVHWDeviceContext @ 0x55bffef31d40] 1 OpenCL platforms found.
[AVHWDeviceContext @ 0x55bffef31d40] 1 OpenCL devices found on platform "AMD Accelerated Parallel Processing".
[AVHWDeviceContext @ 0x55bffef31d40] 0.0: AMD Accelerated Parallel Processing / gfx90c:xnack-
[AVHWDeviceContext @ 0x55bffef31d40] The cl_intel_va_api_media_sharing extension is required for QSV to OpenCL mapping.
[AVHWDeviceContext @ 0x55bffef31d40] QSV to OpenCL mapping not usable.
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
Code: $ docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device vulkan
ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
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
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'vulkan'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument vulkan.
[AVHWDeviceContext @ 0x5600f261fd40] Supported validation layers:
[AVHWDeviceContext @ 0x5600f261fd40] VK_LAYER_MESA_device_select
[AVHWDeviceContext @ 0x5600f261fd40] VK_LAYER_MESA_overlay
[AVHWDeviceContext @ 0x5600f261fd40] GPU listing:
[AVHWDeviceContext @ 0x5600f261fd40] 0: AMD Radeon Graphics (RADV RENOIR) (integrated) (0x1638)
[AVHWDeviceContext @ 0x5600f261fd40] Device 0 selected: AMD Radeon Graphics (RADV RENOIR) (integrated) (0x1638)
[AVHWDeviceContext @ 0x5600f261fd40] Queue families:
[AVHWDeviceContext @ 0x5600f261fd40] 0: graphics compute transfer sparse (queues: 1)
[AVHWDeviceContext @ 0x5600f261fd40] 1: compute transfer sparse (queues: 4)
[AVHWDeviceContext @ 0x5600f261fd40] Using device extension VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x5600f261fd40] Using device extension VK_KHR_sampler_ycbcr_conversion
[AVHWDeviceContext @ 0x5600f261fd40] Using device extension VK_KHR_synchronization2
[AVHWDeviceContext @ 0x5600f261fd40] Using device extension VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x5600f261fd40] Using device extension VK_EXT_external_memory_dma_buf
[AVHWDeviceContext @ 0x5600f261fd40] Using device extension VK_EXT_image_drm_format_modifier
[AVHWDeviceContext @ 0x5600f261fd40] Using device extension VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x5600f261fd40] Using device extension VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x5600f261fd40] Using device: AMD Radeon Graphics (RADV RENOIR)
[AVHWDeviceContext @ 0x5600f261fd40] Alignments:
[AVHWDeviceContext @ 0x5600f261fd40] optimalBufferCopyRowPitchAlignment: 1
[AVHWDeviceContext @ 0x5600f261fd40] minMemoryMapAlignment: 4096
[AVHWDeviceContext @ 0x5600f261fd40] minImportedHostPointerAlignment: 4096
[AVHWDeviceContext @ 0x5600f261fd40] Using queue family 0 (queues: 1) for graphics
[AVHWDeviceContext @ 0x5600f261fd40] Using queue family 1 (queues: 4) for compute transfers
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
RE: Streams fail: No hw device found - TheDreadPirate - 2023-09-19
Go back over the Jellyfin AMD documentation. Double check each step.
https://jellyfin.org/docs/general/administration/hardware-acceleration/amd/#configure-with-linux-virtualization
RE: Streams fail: No hw device found - creylon - 2023-09-19
Yes I already did that. All the checks output all green (see screenshots).
The weird thing is, that it gradually stopped working on specific devices until the point that almost no devices I have access to work. For my roommate it still works on his phone and I can see the transcoding tmp files in the corresponding directory.
Code: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl=ocl:.0,device_vendor="Advanced Micro Devices" -filter_hw_device ocl -hwaccel vaapi -hwaccel_output_format vaapi -autorotate 0 -i file:"/media/video/movies/Basic Instinct (1992).mkv" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:s -codec:v:0 h264_vaapi -rc_mode VBR -b:v 14616000 -maxrate 14616000 -bufsize 29232000 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -vf "setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,scale_vaapi=w=1920:h=804:extra_hw_frames=24,hwdownload,format=p010le,hwupload=derive_device=opencl,tonemap_opencl=format=nv12:p=bt709:t=bt709:m=bt709:tonemap=hable:peak=100:desat=0,hwdownload,format=nv12,hwupload_vaapi" -codec:a:0 libfdk_aac -ac 2 -ab 384000 -af "volume=2" -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/4266519861e380713a6c0f5121cf708a%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/transcodes/4266519861e380713a6c0f5121cf708a.m3u8"
ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
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
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
[AVHWDeviceContext @ 0x558530900a80] No matching devices found.
Device creation failed: -19.
Failed to set value 'opencl=ocl:.0,device_vendor=Advanced Micro Devices' for option 'init_hw_device': No such device
Error parsing global options: No such device
EDIT: Here is the only logs I could find for the successful transcoding stream. Ran on Findroid:
Code: [2023-09-19 10:15:47.269 +00:00] [INF] [52] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "user". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-09-19 10:15:47.269 +00:00] [INF] [52] Jellyfin.Api.Helpers.MediaInfoHelper: RemoteClientBitrateLimit: 15000000, RemoteIp: "[IP]", IsInLocalNetwork: False
[2023-09-19 10:15:47.269 +00:00] [INF] [52] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Direct play all", Path="/media/video/movies/Double Trouble (1984).mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit ) "media:/videos/69b7dab5-0978-dd84-26e3-69edd5b369b3/stream?MediaSourceId=69b7dab50978dd8426e369edd5b369b3&AudioStreamIndex=4&api_key=<token>&RequireAvc=false&Tag=d628e7a6485f204f288ee1ad55e4dbc6&TranscodeReasons=ContainerBitrateExceedsLimit"
[2023-09-19 10:15:47.490 +00:00] [INF] [59] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Adding playback tracker : 73e1865dce74a84a-6fc8bd9fcedf44fcb058b40c3d280952-69b7dab50978dd8426e369edd5b369b3
[2023-09-19 10:15:47.490 +00:00] [INF] [59] Jellyfin.Plugin.PlaybackReporting.Data.PlaybackTracker: PlaybackTracker : Adding Start Event : 09/19/2023 10:15:47
[2023-09-19 10:15:47.490 +00:00] [INF] [59] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Creating StartPlaybackTimer Task
[2023-09-19 10:15:47.490 +00:00] [INF] [59] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : Entered
[2023-09-19 10:15:47.551 +00:00] [INF] [52] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "73e1865dce74a84a-6fc8bd9fcedf44fcb058b40c3d280952-69b7dab50978dd8426e369edd5b369b3"
[2023-09-19 10:15:57.951 +00:00] [INF] [62] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Findroid" "0.13.0" playing "Vier Fäuste gegen Rio". Stopped at "5083" ms
[2023-09-19 10:15:58.028 +00:00] [INF] [63] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Playback stop tracker found, processing stop : "73e1865dce74a84a-6fc8bd9fcedf44fcb058b40c3d280952-69b7dab50978dd8426e369edd5b369b3"
[2023-09-19 10:15:58.028 +00:00] [INF] [63] Jellyfin.Plugin.PlaybackReporting.Data.PlaybackTracker: PlaybackTracker : Adding Stop Event : 09/19/2023 10:15:58
[2023-09-19 10:15:58.028 +00:00] [INF] [63] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Playback stop but TrackedPlaybackInfo not found! not storing activity in DB
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: session.RemoteEndPoint : "[IP]"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_playing_id = "69b7dab50978dd8426e369edd5b369b3"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_user_id = "6fc8bd9fcedf44fcb058b40c3d280952"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_user_id_int = 2
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : session_playing_id = ""
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : session_user_id = "6fc8bd9fcedf44fcb058b40c3d280952"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : play_method = "na"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : e.ClientName = "Findroid"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : e.DeviceName = "Galaxy S20 FE"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemName = "Vier Fäuste gegen Rio"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemId = "69b7dab50978dd8426e369edd5b369b3"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemType = "Movie"
[2023-09-19 10:16:07.490 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : Details do not match for play item
[2023-09-19 10:16:07.491 +00:00] [INF] [58] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : Exited
RE: Streams fail: No hw device found - creylon - 2023-09-19
So I removed all traces of OpenCL related configurations and disabled Tone Mapping and now it seems like everything is back to normal.
|