2023-12-31, 12:43 AM
Hi everyone!
I have Jellyfin installed on a remote VPS. Media is on cloud storage via rclone. Most watching is done on a Shield Pro. Server upload is 1Gbps and my home broadband is 900Mbps. iPerf confirms I can get near max speed from the server to my home devices. Everything is on gigabit ethernet at home.
I have been using Jellyfin for about two months now, and experiencing playback freezing. This has only ever happened on the Shield, and mostly on high bitrate 4K content. It also happened on an HD movie once in these two months.
On the Shield, freezing can happen at any time, randomly. For example, last one was on a very high bitrate movie that had been playing for about 2 hours before it happened. It could happen near the start of a movie, or at any other point. It can be one or two freezing bits for a few seconds, then it resumes by itself, or freezing and never resuming. When it happens, usually I can exit the app, re-enter it and the movie resumes fine. Sometimes it has not resumed (or it has resumed with freezing), but usually exiting-reentering the app works (which, I think, tells me it's not any sort of cloud storage throttling).
Everything I watch is Direct Play by the way, no video or audio ever gets transcoded (nor do I want it to).
I can then go on to watch 2-3 other high-bitrate movies without a single freeze, only to happen again at some random moment later on or the next day.
I unfortunately have not yet saved any logs at the time it happened, but I have looked at the logs on a couple of recent cases and couldn't see anything relevant at all, other than 'Slow HTTP response', but the logs are usually littered with that even when the media is playing fine.
Now, I have started trying to watch on the web on my laptop too. Here, it is unwatchable. Unless I select 10Mbps (which ends up transcoding video and audio), every movie I try starts freezing from the first few seconds, plays a few seconds, then freezes again and so on.
Plex used to work fine on its web UI, so I don't think it's anything to do with bandwidth, however all suggestions are welcome. At least with regards to the web issue there must be something the matter with Jellyfin Web as the same media play fine on the Shield (with the caveat they can freeze at any moment).
If anyone can help me debug this, I'll be forever grateful!
Here's the log from just trying to start a 1080p movie on my laptop right now:
I have Jellyfin installed on a remote VPS. Media is on cloud storage via rclone. Most watching is done on a Shield Pro. Server upload is 1Gbps and my home broadband is 900Mbps. iPerf confirms I can get near max speed from the server to my home devices. Everything is on gigabit ethernet at home.
I have been using Jellyfin for about two months now, and experiencing playback freezing. This has only ever happened on the Shield, and mostly on high bitrate 4K content. It also happened on an HD movie once in these two months.
On the Shield, freezing can happen at any time, randomly. For example, last one was on a very high bitrate movie that had been playing for about 2 hours before it happened. It could happen near the start of a movie, or at any other point. It can be one or two freezing bits for a few seconds, then it resumes by itself, or freezing and never resuming. When it happens, usually I can exit the app, re-enter it and the movie resumes fine. Sometimes it has not resumed (or it has resumed with freezing), but usually exiting-reentering the app works (which, I think, tells me it's not any sort of cloud storage throttling).
Everything I watch is Direct Play by the way, no video or audio ever gets transcoded (nor do I want it to).
I can then go on to watch 2-3 other high-bitrate movies without a single freeze, only to happen again at some random moment later on or the next day.
I unfortunately have not yet saved any logs at the time it happened, but I have looked at the logs on a couple of recent cases and couldn't see anything relevant at all, other than 'Slow HTTP response', but the logs are usually littered with that even when the media is playing fine.
Now, I have started trying to watch on the web on my laptop too. Here, it is unwatchable. Unless I select 10Mbps (which ends up transcoding video and audio), every movie I try starts freezing from the first few seconds, plays a few seconds, then freezes again and so on.
Plex used to work fine on its web UI, so I don't think it's anything to do with bandwidth, however all suggestions are welcome. At least with regards to the web issue there must be something the matter with Jellyfin Web as the same media play fine on the Shield (with the caveat they can freeze at any moment).
If anyone can help me debug this, I'll be forever grateful!
Here's the log from just trying to start a 1080p movie on my laptop right now:
[2023-12-31 00:31:03.727 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Video" to "86.141.61.83" in 0:00:00.6382126 with Status Code 200
[2023-12-31 00:31:04.325 +00:00] [WRN] Slow HTTP Response from "https://domain/Shows/NextUp?Limit=24&Fields=PrimaryImageAspectRatio%2CDateCreated%2CBasicSyncInfo%2CPath%2CMediaSourceCount&UserId=fd33de43cb9c4681966c14e626f6dee6&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CBanner%2CThumb&EnableTotalRecordCount=false&DisableFirstEpisode=false&NextUpDateCutoff=2023-08-02T23%3A31%3A02.625Z&EnableRewatching=false" to "86.141.61.83" in 0:00:01.2363828 with Status Code 200
[2023-12-31 00:31:07.138 +00:00] [WRN] Slow HTTP Response from "https://domain/Items/a6f76f1588f9b1724ec8345041070712/Images/Primary?fillHeight=330&fillWidth=220&quality=96&tag=093abef1394f1a85ca516e29fe620f07" to "86.141.61.83" in 0:00:00.8752967 with Status Code 200
[2023-12-31 00:31:07.877 +00:00] [INF] User policy for "dinosm". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-31 00:31:07.879 +00:00] [INF] StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/home/dinosm/media/MediaF/Movies/2020 - 2029/movie (2023)/movie (2023) - 1080p.mkv", AudioStreamIndex=1, SubtitleStreamIndex=2 ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported, AudioCodecNotSupported ) "mediavideos/c269662e-3a0e-b444-ccfe-00d5302cfa01/master.m3u8?MediaSourceId=c269662e3a0eb444ccfe00d5302cfa01&VideoCodec=h264,h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=34616000&AudioBitrate=384000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=ec223a6a95c735dde60362e0a867cb49&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&h264-level=41&h264-videobitdepth=8&h264-profile=high&h264-rangetype=SDR&h264-deinterlace=true&TranscodeReasons=VideoCodecNotSupported,%20AudioCodecNotSupported"
[2023-12-31 00:31:10.388 +00:00] [WRN] Slow HTTP Response from "https://domain/videos/c269662e-3a0e-b444-ccfe-00d5302cfa01/main.m3u8?DeviceId=TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6MTA5LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvMTE4LjB8MTY5NjI4ODU2OTc0MQ11&MediaSourceId=c269662e3a0eb444ccfe00d5302cfa01&VideoCodec=h264,h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=34616000&AudioBitrate=384000&MaxFramerate=23.976025&PlaySessionId=a79027bbfd0441db9ddc217dc21fb583&api_key=ec5287cb5af54d398b697ddf442a24af&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=ec223a6a95c735dde60362e0a867cb49&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&h264-level=41&h264-videobitdepth=8&h264-profile=high&h264-rangetype=SDR&h264-deinterlace=true&TranscodeReasons=VideoCodecNotSupported,%20AudioCodecNotSupported" to "86.141.61.83" in 0:00:01.8168068 with Status Code 200
[2023-12-31 00:31:11.141 +00:00] [INF] Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-12-31 00:31:11.143 +00:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -fflags +genpts -f matroska,webm -i file:\"/home/dinosm/media/MediaF/Movies/2020 - 2029/movie (2023)/movie (2023) - 1080p.mkv\" -map_metadata -1 -map_chapters -1 -threads 4 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -start_at_zero -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 6 -hls_segment_type mpegts -start_number 0 -hls_segment_filename \"/var/lib/jellyfin/transcodes/6fd89b52cbbf832712ffce7ee0749846%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/var/lib/jellyfin/transcodes/6fd89b52cbbf832712ffce7ee0749846.m3u8\""
[2023-12-31 00:31:12.211 +00:00] [WRN] Slow HTTP Response from "https://domain/videos/c269662e-3a0e-b444-ccfe-00d5302cfa01/hls1/main/0.ts?DeviceId=TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6MTA5LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvMTE4LjB8MTY5NjI4ODU2OTc0MQ11&MediaSourceId=c269662e3a0eb444ccfe00d5302cfa01&VideoCodec=h264,h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=34616000&AudioBitrate=384000&MaxFramerate=23.976025&PlaySessionId=a79027bbfd0441db9ddc217dc21fb583&api_key=ec5287cb5af54d398b697ddf442a24af&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=ec223a6a95c735dde60362e0a867cb49&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&h264-level=41&h264-videobitdepth=8&h264-profile=high&h264-rangetype=SDR&h264-deinterlace=true&TranscodeReasons=VideoCodecNotSupported,%20AudioCodecNotSupported&runtimeTicks=0&actualSegmentLengthTicks=114280000" to "86.141.61.83" in 0:00:01.0749795 with Status Code 200
[2023-12-31 00:31:21.098 +00:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-i file:\"/home/dinosm/media/MediaF/Movies/2020 - 2029/movie (2023)/movie (2023) - 1080p.mkv\" -copyts -map 0:2 -an -vn -c:s copy \"/var/lib/jellyfin/data/subtitles/3/3e604358-59cf-ff00-524d-a71cf3123a03.srt\""
[2023-12-31 00:31:21.160 +00:00] [INF] Adding playback tracker : TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6MTA5LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvMTE4LjB8MTY5NjI4ODU2OTc0MQ11-fd33de43cb9c4681966c14e626f6dee6-c269662e3a0eb444ccfe00d5302cfa01
[2023-12-31 00:31:21.160 +00:00] [INF] PlaybackTracker : Adding Start Event : 12/31/2023 00:31:21
[2023-12-31 00:31:21.160 +00:00] [INF] Creating StartPlaybackTimer Task
[2023-12-31 00:31:21.161 +00:00] [INF] StartPlaybackTimer : Entered
[2023-12-31 00:31:21.203 +00:00] [INF] Processing playback tracker : "TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6MTA5LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvMTE4LjB8MTY5NjI4ODU2OTc0MQ11-fd33de43cb9c4681966c14e626f6dee6-c269662e3a0eb444ccfe00d5302cfa01"
[2023-12-31 00:31:33.471 +00:00] [INF] WS "86.141.61.83" request
[2023-12-31 00:31:35.669 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Video" to "86.141.61.83" in 0:00:01.347091 with Status Code 200
[2023-12-31 00:31:35.757 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=f137a2dd21bbc1b99aa5c0f6bf02a805" to "86.141.61.83" in 0:00:01.4247425 with Status Code 200
[2023-12-31 00:31:35.993 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=bb1cb51306ca3bab9a7f98be8fa364d0" to "86.141.61.83" in 0:00:01.6606239 with Status Code 200
[2023-12-31 00:31:35.993 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=d46fef7f91aae6206889531d5c3d0f18" to "86.141.61.83" in 0:00:01.6562731 with Status Code 200
[2023-12-31 00:31:35.999 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=5d5c0cc070120a55eb67fd6ec5bf48eb" to "86.141.61.83" in 0:00:01.6619558 with Status Code 200
[2023-12-31 00:31:36.005 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=4ceb4ea54fc231d7b2ee2e7ad7cc9a50" to "86.141.61.83" in 0:00:01.6688012 with Status Code 200
[2023-12-31 00:31:36.021 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=3148cf0701708325a446ec1751b2b64e" to "86.141.61.83" in 0:00:01.6888068 with Status Code 200
[2023-12-31 00:31:36.027 +00:00] [WRN] Slow HTTP Response from "https://domain/Users/fd33de43cb9c4681966c14e626f6dee6/Items/Latest?Limit=16&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CPath&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&ParentId=52f4668faf59e30bc294b93774315f02" to "86.141.61.83" in 0:00:01.694264 with Status Code 200
[2023-12-31 00:31:36.195 +00:00] [WRN] Slow HTTP Response from "https://domain/Shows/NextUp?Limit=24&Fields=PrimaryImageAspectRatio%2CDateCreated%2CBasicSyncInfo%2CPath%2CMediaSourceCount&UserId=fd33de43cb9c4681966c14e626f6dee6&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CBanner%2CThumb&EnableTotalRecordCount=false&DisableFirstEpisode=false&NextUpDateCutoff=2023-08-02T23%3A31%3A34.057Z&EnableRewatching=false" to "86.141.61.83" in 0:00:01.872668 with Status Code 200
[2023-12-31 00:31:37.810 +00:00] [INF] AuthenticationScheme: "CustomAuthentication" was forbidden.
[2023-12-31 00:31:41.161 +00:00] [INF] session.RemoteEndPoint : "86.141.61.83"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : event_playing_id = "c269662e3a0eb444ccfe00d5302cfa01"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : event_user_id = "fd33de43cb9c4681966c14e626f6dee6"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : event_user_id_int = 1
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : session_playing_id = "c269662e3a0eb444ccfe00d5302cfa01"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : session_user_id = "fd33de43cb9c4681966c14e626f6dee6"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : play_method = "Transcode (v:direct a:aac)"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : e.ClientName = "Jellyfin Web"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : e.DeviceName = "Firefox"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : ItemName = "movie"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : ItemId = "c269662e3a0eb444ccfe00d5302cfa01"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : ItemType = "Movie"
[2023-12-31 00:31:41.162 +00:00] [INF] StartPlaybackTimer : All matches, playback registered
[2023-12-31 00:31:41.162 +00:00] [INF] Playback tracker found, adding playback info : "TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6MTA5LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvMTE4LjB8MTY5NjI4ODU2OTc0MQ11-fd33de43cb9c4681966c14e626f6dee6-c269662e3a0eb444ccfe00d5302cfa01"
[2023-12-31 00:31:41.162 +00:00] [INF] Saving playback tracking activity in DB
[2023-12-31 00:31:41.169 +00:00] [INF] StartPlaybackTimer : Exited
[2023-12-31 00:31:42.191 +00:00] [INF] Processing playback tracker : "TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6MTA5LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvMTE4LjB8MTY5NjI4ODU2OTc0MQ11-fd33de43cb9c4681966c14e626f6dee6-c269662e3a0eb444ccfe00d5302cfa01"
[2023-12-31 00:31:48.381 +00:00] [INF] Stopping ffmpeg process with q command for "/var/lib/jellyfin/transcodes/6fd89b52cbbf832712ffce7ee0749846.m3u8"
[2023-12-31 00:31:48.427 +00:00] [INF] WS "86.141.61.83" closed
[2023-12-31 00:31:48.492 +00:00] [INF] FFmpeg exited with code 0
[2023-12-31 00:31:48.492 +00:00] [INF] Deleting partial stream file(s) "/var/lib/jellyfin/transcodes/6fd89b52cbbf832712ffce7ee0749846.m3u8"
[2023-12-31 00:31:50.184 +00:00] [INF] Playback stopped reported by app "Jellyfin Web" "10.8.13" playing "movie". Stopped at "21824" ms
[2023-12-31 00:31:50.201 +00:00] [WRN] Slow HTTP Response from "https://domain/Sessions/Playing/Stopped" to "86.141.61.83" in 0:00:01.8221449 with Status Code 204
[2023-12-31 00:31:50.201 +00:00] [INF] Playback stop tracker found, processing stop : "TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6MTA5LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvMTE4LjB8MTY5NjI4ODU2OTc0MQ11-fd33de43cb9c4681966c14e626f6dee6-c269662e3a0eb444ccfe00d5302cfa01"
[2023-12-31 00:31:50.202 +00:00] [INF] PlaybackTracker : Adding Stop Event : 12/31/2023 00:31:50
[2023-12-31 00:31:50.202 +00:00] [INF] Saving playback tracking activity in DB