2023-10-12, 09:17 PM
Ok, so I think that I've isolated the problem a bit. I think it has something to do with stream caching...
I was able to get the video to play for a few seconds, and then I stopped it.
Then when I (cleared my browser cache, logged in again,) tried to watch the same video, this logged
and it just hung there for a minute or so, and then the video resumed eventually. If I pause the video again, and then play, it hangs a long time again. So it's like the client can't read the transcoded stream files or something for a long time. Perhaps I need to remap where my cache goes, so it actually lives on a cache SSD instead of my Unraid array.
Thoughts?
I was able to get the video to play for a few seconds, and then I stopped it.
Code:
[14:05:40] [INF] [63] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[14:05:40] [INF] [63] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/media/TV/The Office (US)/Season 6/The Office (US) - S06E26 - Whistleblower Bluray-1080p.mp4, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit ) media:/videos/0ea35f7e-919a-bd95-fe54-530e9ebc816f/master.m3u8?MediaSourceId=0ea35f7e919abd95fe54530e9ebc816f&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=2&VideoBitrate=946482&AudioBitrate=384000&AudioSampleRate=48000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=4df13c51ed77c888f05fbead0afce219&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&hevc-level=120&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=6&aac-profile=lc&TranscodeReasons=ContainerBitrateExceedsLimit
[14:05:42] [INF] [63] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[14:05:42] [INF] [63] Jellyfin.Api.Helpers.TranscodingJobHelper: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:,driver=iHD,kernel_driver=i915 -init_hw_device qsv=qs@va -filter_hw_device qs -autorotate 0 -i file:"/media/TV/The Office (US)/Season 6/The Office (US) - S06E26 - Whistleblower Bluray-1080p.mp4" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 946482 -maxrate 946482 -bufsize 1892964 -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,640)/2)*2:trunc(ow/a/2)*2,format=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 384000 -ar 48000 -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/data/transcodes/fe9a33fadb57048ab88d5033d6eff75b%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/fe9a33fadb57048ab88d5033d6eff75b.m3u8"
[14:05:43] [WRN] [64] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from <REDACTED_MY_SERVER_URL>/videos/0ea35f7e-919a-bd95-fe54-530e9ebc816f/hls1/main/0.ts?DeviceId=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTVfNykgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzExNy4wLjAuMCBTYWZhcmkvNTM3LjM2fDE2OTcxNDQ3MjE1MTA1&MediaSourceId=0ea35f7e919abd95fe54530e9ebc816f&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=2&VideoBitrate=946482&AudioBitrate=384000&AudioSampleRate=48000&MaxFramerate=23.976025&PlaySessionId=f958f7f8da04459fbea028336644d8b6&api_key=9af520924666494c80e288f7480c086f&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=4df13c51ed77c888f05fbead0afce219&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&hevc-level=120&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=6&aac-profile=lc&TranscodeReasons=ContainerBitrateExceedsLimit&runtimeTicks=0&actualSegmentLengthTicks=30000000 to 163.116.147.39 in 0:00:01.1611297 with Status Code 200
[14:05:45] [WRN] [64] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from <REDACTED_MY_SERVER_URL>/Sessions/Playing to 163.116.147.39 in 0:00:00.5967831 with Status Code 204
[14:08:17] [INF] [83] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
[14:08:19] [INF] [83] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[14:08:36] [INF] [64] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
[14:08:36] [INF] [64] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
[14:08:36] [INF] [64] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: CustomAuthentication was challenged.
[14:08:55] [INF] [70] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) /config/data/transcodes/fe9a33fadb57048ab88d5033d6eff75b.m3u8
[14:08:57] [INF] [60] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 163.116.147.39 closed
[14:08:57] [INF] [70] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Web 10.8.11 playing Whistleblower. Stopped at 12058 ms
[14:08:57] [WRN] [70] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from <REDACTED_MY_SERVER_URL>/Sessions/Playing/Stopped to 163.116.147.39 in 0:00:01.6846389 with Status Code 204
[14:08:57] [INF] [60] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 163.116.147.39 request
Then when I (cleared my browser cache, logged in again,) tried to watch the same video, this logged
Code:
[14:09:03] [INF] [65] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[14:09:03] [INF] [65] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/media/TV/The Office (US)/Season 6/The Office (US) - S06E26 - Whistleblower Bluray-1080p.mp4, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/0ea35f7e-919a-bd95-fe54-530e9ebc816f/stream.mp4?MediaSourceId=0ea35f7e919abd95fe54530e9ebc816f&Static=true&VideoCodec=hevc&AudioCodec=aac&AudioStreamIndex=2&api_key=<token>&Tag=4df13c51ed77c888f05fbead0afce219
and it just hung there for a minute or so, and then the video resumed eventually. If I pause the video again, and then play, it hangs a long time again. So it's like the client can't read the transcoded stream files or something for a long time. Perhaps I need to remap where my cache goes, so it actually lives on a cache SSD instead of my Unraid array.
Thoughts?