[Issue]: Tone mapping kills unraid server #5012

Closed
opened 2026-02-07 01:23:01 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @UkeHa on GitHub (Aug 5, 2023).

Please describe your bug

I'm running into two separate issues with the latest jellyfin instance. Whenever i watch content that requires tone mapping from hdr to sdr the player stops working after a minute or so. After that all other services and vm's on my Unraid machine start to lock up one by one, you can't access the web ui of unraid anymore and the complete system becomes unresponsive. Even ssh fails to react.
My system has an amd iGPU to do the tone mapping and i'm using the linuxserver.io container.

The other issue is that tone mapping doesn't work in auto quality setting but only starts once the quality is set at 10 mbit/s or lower.

Jellyfin Version

Other

if other:

10.9.0

Environment

- OS: Unraid 6.12.3
- Linux Kernel: Linux NAS 6.1.38-Unraid
- Virtualization: lscr.io/linuxserver/jellyfin:nightly Docker container with linuxserver/mods:jellyfin-amd mod
- Clients: Android TV App
- Browser: Firefox
- FFmpeg Version: 5.1.3-Jellyfin
- Playback Method:
- Hardware Acceleration: VAAPI
- GPU Model: AMD Ryzen 5 3400G with Radeon Vega Graphics
- Reverse Proxy: Cloudflare - but happens locally
- Networking: 1gbit lan

Jellyfin logs

[2023-08-05 19:23:54.533 +02:00] [INF] [129] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -autorotate 0 -i file:\"/data/movies/movie (2023)/movie.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -tag:v:0 hvc1 -rc_mode VBR -b:v 14616000 -maxrate 14616000 -bufsize 29232000 -profile:v:0 main -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -flags:v -global_header -vf \"setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwupload=derive_device=vulkan,format=vulkan,libplacebo=upscaler=none:downscaler=none:w=1920:h=800:format=bgra:tonemapping=bt.2390:peak_detect=0:color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=drm,format=drm_prime,hwmap=derive_device=vaapi,format=vaapi,scale_vaapi=format=nv12\" -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 mpegts -start_number 0 -hls_segment_filename \"/config/data/transcodes/424d668516327226ead02cfa2ec280d5%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8\""
[2023-08-05 19:24:29.883 +02:00] [INF] [129] Jellyfin.Api.Helpers.TranscodingJobHelper: Stopping ffmpeg process with q command for "/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8"
[2023-08-05 19:24:29.884 +02:00] [INF] [97] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -autorotate 0 -i file:\"/data/movies/movie (2023)/movie.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -tag:v:0 hvc1 -rc_mode VBR -b:v 14616000 -maxrate 14616000 -bufsize 29232000 -profile:v:0 main -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -flags:v -global_header -vf \"setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwupload=derive_device=vulkan,format=vulkan,libplacebo=upscaler=none:downscaler=none:w=1920:h=800:format=bgra:tonemapping=bt.2390:peak_detect=0:color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=drm,format=drm_prime,hwmap=derive_device=vaapi,format=vaapi,scale_vaapi=format=nv12\" -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 mpegts -start_number 0 -hls_segment_filename \"/config/data/transcodes/424d668516327226ead02cfa2ec280d5%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8\""
[2023-08-05 19:24:29.885 +02:00] [ERR] [23] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "A task was canceled". URL "GET" "/videos/affa881c-eacf-e136-a6d4-b749fd2737bc/hls1/main/0.ts".
[2023-08-05 19:24:32.514 +02:00] [INF] [23] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "user". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-08-05 19:24:32.628 +02:00] [INF] [163] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "user". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-08-05 19:24:33.211 +02:00] [INF] [173] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -autorotate 0 -i file:\"/data/movies/movie (2023)/movie.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -tag:v:0 hvc1 -rc_mode VBR -b:v 14616000 -maxrate 14616000 -bufsize 29232000 -profile:v:0 main -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -flags:v -global_header -vf \"setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwupload=derive_device=vulkan,format=vulkan,libplacebo=upscaler=none:downscaler=none:w=1920:h=800:format=bgra:tonemapping=bt.2390:peak_detect=0:color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=drm,format=drm_prime,hwmap=derive_device=vaapi,format=vaapi,scale_vaapi=format=nv12\" -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 mpegts -start_number 0 -hls_segment_filename \"/config/data/transcodes/d6ddceceb52e76841d035539ddfafde1%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/d6ddceceb52e76841d035539ddfafde1.m3u8\""
[2023-08-05 19:24:34.883 +02:00] [INF] [129] Jellyfin.Api.Helpers.TranscodingJobHelper: Killing FFmpeg process for "/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8"
[2023-08-05 19:24:34.883 +02:00] [INF] [129] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8"
[2023-08-05 19:24:36.385 +02:00] [INF] [78] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.15.11" playing "movie". Stopped at "120000" ms
[2023-08-05 19:24:36.387 +02:00] [ERR] [78] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Sessions/Playing/Stopped".
Busy: SQLitePCL.pretty.SQLiteException: database is locked
   at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg)
   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
   at SQLitePCL.pretty.StatementImpl.MoveNext()
   at Emby.Server.Implementations.Data.SqliteUserDataRepository.SaveUserData(IDatabaseConnection db, Int64 internalUserId, String key, UserItemData userData)
   at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass20_0.<RunInTransaction>b__0(IDatabaseConnection db)
   at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode)
   at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode)
   at Emby.Server.Implementations.Data.SqliteUserDataRepository.PersistUserData(Int64 internalUserId, String key, UserItemData userData, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.UserDataManager.SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackStopped(User user, BaseItem item, Nullable`1 positionTicks, Boolean playbackFailed)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackStopped(PlaybackStopInfo info)
   at Jellyfin.Api.Controllers.PlaystateController.ReportPlaybackStopped(PlaybackStopInfo playbackStopInfo)
   at lambda_method1207(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Api.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2023-08-05 19:25:08.650 +02:00] [INF] [18] Jellyfin.Api.Helpers.TranscodingJobHelper: Stopping ffmpeg process with q command for "/config/data/transcodes/d6ddceceb52e76841d035539ddfafde1.m3u8"

FFmpeg logs

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -autorotate 0 -i file:"/data/movies/movie (2023)/movie.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -tag:v:0 hvc1 -rc_mode VBR -b:v 9616000 -maxrate 9616000 -bufsize 19232000 -profile:v:0 main -force_key_frames:0 "expr:gte(t,n_forced*3)" -flags:v -global_header -vf "setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwupload=derive_device=vulkan,format=vulkan,libplacebo=upscaler=none:downscaler=none:w=1920:h=800:format=bgra:tonemapping=bt.2390:peak_detect=0:color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=drm,format=drm_prime,hwmap=derive_device=vaapi,format=vaapi,scale_vaapi=format=nv12" -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 mpegts -start_number 0 -hls_segment_filename "/config/data/transcodes/fe1fa14553bca42e93729bfe873536d1%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/fe1fa14553bca42e93729bfe873536d1.m3u8"


ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04.1)
  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!

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @UkeHa on GitHub (Aug 5, 2023). ### Please describe your bug I'm running into two separate issues with the latest jellyfin instance. Whenever i watch content that requires tone mapping from hdr to sdr the player stops working after a minute or so. After that all other services and vm's on my Unraid machine start to lock up one by one, you can't access the web ui of unraid anymore and the complete system becomes unresponsive. Even ssh fails to react. My system has an amd iGPU to do the tone mapping and i'm using the linuxserver.io container. The other issue is that tone mapping doesn't work in auto quality setting but only starts once the quality is set at 10 mbit/s or lower. ### Jellyfin Version Other ### if other: 10.9.0 ### Environment ```markdown - OS: Unraid 6.12.3 - Linux Kernel: Linux NAS 6.1.38-Unraid - Virtualization: lscr.io/linuxserver/jellyfin:nightly Docker container with linuxserver/mods:jellyfin-amd mod - Clients: Android TV App - Browser: Firefox - FFmpeg Version: 5.1.3-Jellyfin - Playback Method: - Hardware Acceleration: VAAPI - GPU Model: AMD Ryzen 5 3400G with Radeon Vega Graphics - Reverse Proxy: Cloudflare - but happens locally - Networking: 1gbit lan ``` ### Jellyfin logs ```shell [2023-08-05 19:23:54.533 +02:00] [INF] [129] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -autorotate 0 -i file:\"/data/movies/movie (2023)/movie.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -tag:v:0 hvc1 -rc_mode VBR -b:v 14616000 -maxrate 14616000 -bufsize 29232000 -profile:v:0 main -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -flags:v -global_header -vf \"setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwupload=derive_device=vulkan,format=vulkan,libplacebo=upscaler=none:downscaler=none:w=1920:h=800:format=bgra:tonemapping=bt.2390:peak_detect=0:color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=drm,format=drm_prime,hwmap=derive_device=vaapi,format=vaapi,scale_vaapi=format=nv12\" -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 mpegts -start_number 0 -hls_segment_filename \"/config/data/transcodes/424d668516327226ead02cfa2ec280d5%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8\"" [2023-08-05 19:24:29.883 +02:00] [INF] [129] Jellyfin.Api.Helpers.TranscodingJobHelper: Stopping ffmpeg process with q command for "/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8" [2023-08-05 19:24:29.884 +02:00] [INF] [97] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -autorotate 0 -i file:\"/data/movies/movie (2023)/movie.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -tag:v:0 hvc1 -rc_mode VBR -b:v 14616000 -maxrate 14616000 -bufsize 29232000 -profile:v:0 main -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -flags:v -global_header -vf \"setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwupload=derive_device=vulkan,format=vulkan,libplacebo=upscaler=none:downscaler=none:w=1920:h=800:format=bgra:tonemapping=bt.2390:peak_detect=0:color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=drm,format=drm_prime,hwmap=derive_device=vaapi,format=vaapi,scale_vaapi=format=nv12\" -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 mpegts -start_number 0 -hls_segment_filename \"/config/data/transcodes/424d668516327226ead02cfa2ec280d5%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8\"" [2023-08-05 19:24:29.885 +02:00] [ERR] [23] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "A task was canceled". URL "GET" "/videos/affa881c-eacf-e136-a6d4-b749fd2737bc/hls1/main/0.ts". [2023-08-05 19:24:32.514 +02:00] [INF] [23] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "user". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2023-08-05 19:24:32.628 +02:00] [INF] [163] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "user". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2023-08-05 19:24:33.211 +02:00] [INF] [173] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -autorotate 0 -i file:\"/data/movies/movie (2023)/movie.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -tag:v:0 hvc1 -rc_mode VBR -b:v 14616000 -maxrate 14616000 -bufsize 29232000 -profile:v:0 main -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -flags:v -global_header -vf \"setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwupload=derive_device=vulkan,format=vulkan,libplacebo=upscaler=none:downscaler=none:w=1920:h=800:format=bgra:tonemapping=bt.2390:peak_detect=0:color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=drm,format=drm_prime,hwmap=derive_device=vaapi,format=vaapi,scale_vaapi=format=nv12\" -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 mpegts -start_number 0 -hls_segment_filename \"/config/data/transcodes/d6ddceceb52e76841d035539ddfafde1%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/d6ddceceb52e76841d035539ddfafde1.m3u8\"" [2023-08-05 19:24:34.883 +02:00] [INF] [129] Jellyfin.Api.Helpers.TranscodingJobHelper: Killing FFmpeg process for "/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8" [2023-08-05 19:24:34.883 +02:00] [INF] [129] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/data/transcodes/424d668516327226ead02cfa2ec280d5.m3u8" [2023-08-05 19:24:36.385 +02:00] [INF] [78] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.15.11" playing "movie". Stopped at "120000" ms [2023-08-05 19:24:36.387 +02:00] [ERR] [78] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Sessions/Playing/Stopped". Busy: SQLitePCL.pretty.SQLiteException: database is locked at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg) at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at Emby.Server.Implementations.Data.SqliteUserDataRepository.SaveUserData(IDatabaseConnection db, Int64 internalUserId, String key, UserItemData userData) at SQLitePCL.pretty.DatabaseConnection.<>c__DisplayClass20_0.<RunInTransaction>b__0(IDatabaseConnection db) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction[T](IDatabaseConnection This, Func`2 f, TransactionMode mode) at SQLitePCL.pretty.DatabaseConnection.RunInTransaction(IDatabaseConnection This, Action`1 action, TransactionMode mode) at Emby.Server.Implementations.Data.SqliteUserDataRepository.PersistUserData(Int64 internalUserId, String key, UserItemData userData, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.UserDataManager.SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackStopped(User user, BaseItem item, Nullable`1 positionTicks, Boolean playbackFailed) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackStopped(PlaybackStopInfo info) at Jellyfin.Api.Controllers.PlaystateController.ReportPlaybackStopped(PlaybackStopInfo playbackStopInfo) at lambda_method1207(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager) at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager) at Jellyfin.Api.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager) at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) [2023-08-05 19:25:08.650 +02:00] [INF] [18] Jellyfin.Api.Helpers.TranscodingJobHelper: Stopping ffmpeg process with q command for "/config/data/transcodes/d6ddceceb52e76841d035539ddfafde1.m3u8" ``` ### FFmpeg logs ```shell /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -autorotate 0 -i file:"/data/movies/movie (2023)/movie.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_vaapi -tag:v:0 hvc1 -rc_mode VBR -b:v 9616000 -maxrate 9616000 -bufsize 19232000 -profile:v:0 main -force_key_frames:0 "expr:gte(t,n_forced*3)" -flags:v -global_header -vf "setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwupload=derive_device=vulkan,format=vulkan,libplacebo=upscaler=none:downscaler=none:w=1920:h=800:format=bgra:tonemapping=bt.2390:peak_detect=0:color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=drm,format=drm_prime,hwmap=derive_device=vaapi,format=vaapi,scale_vaapi=format=nv12" -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 mpegts -start_number 0 -hls_segment_filename "/config/data/transcodes/fe1fa14553bca42e93729bfe873536d1%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/fe1fa14553bca42e93729bfe873536d1.m3u8" ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 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! ``` ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 01:23:01 +03:00
Author
Owner

@nyanmisaka commented on GitHub (Aug 6, 2023):

Duplicate of https://github.com/jellyfin/jellyfin-ffmpeg/issues/312

I think it's an upstream kernel driver or firmware issue.

@nyanmisaka commented on GitHub (Aug 6, 2023): Duplicate of https://github.com/jellyfin/jellyfin-ffmpeg/issues/312 I think it's an upstream kernel driver or firmware issue.
Author
Owner

@nyanmisaka commented on GitHub (Aug 6, 2023):

If possible, you can upgrade the processor to 5600G/5700G and the problem will miraculously disappear. There were a lot of problems with the first generation Ryzen Vega APUs.

@nyanmisaka commented on GitHub (Aug 6, 2023): If possible, you can upgrade the processor to 5600G/5700G and the problem will miraculously disappear. There were a lot of problems with the first generation Ryzen Vega APUs.
Author
Owner

@UkeHa commented on GitHub (Aug 6, 2023):

@nyanmisaka, is the 5700G fix confirmed? If so, i'm gonna go shopping!

@UkeHa commented on GitHub (Aug 6, 2023): @nyanmisaka, is the 5700G fix confirmed? If so, i'm gonna go shopping!
Author
Owner

@nyanmisaka commented on GitHub (Aug 6, 2023):

@nyanmisaka, is the 5700G fix confirmed? If so, i'm gonna go shopping!

Yes. I can confirm that as it is my daily use. Also don't forget to flash BIOS before swapping CPU.

@nyanmisaka commented on GitHub (Aug 6, 2023): > @nyanmisaka, is the 5700G fix confirmed? If so, i'm gonna go shopping! Yes. I can confirm that as it is my daily use. Also don't forget to flash BIOS before swapping CPU.
Author
Owner

@gileri commented on GitHub (Nov 11, 2023):

I hit kernel bugs too and system crash when transcoding with tone mapping on a Ryzen 5600G on the stable Jellyfin docker image (020ecefdb5d2). Interestingly, the issue went away after switching to the unstable image (ba0c20e3b922).

@gileri commented on GitHub (Nov 11, 2023): I hit kernel bugs too and system crash when transcoding with tone mapping on a Ryzen 5600G on the stable Jellyfin docker image (`020ecefdb5d2`). Interestingly, the issue went away after switching to the unstable image (`ba0c20e3b922`).
Author
Owner

@UkeHa commented on GitHub (Nov 11, 2023):

Swapping to a 5700G fixed it for me as well

@UkeHa commented on GitHub (Nov 11, 2023): Swapping to a 5700G fixed it for me as well
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#5012