2025-03-23, 08:07 AM
(This post was last modified: 2025-03-23, 08:11 AM by Duvel. Edited 1 time in total.)
Hi
Got an issue with a very specific situation.
Have a movie with following specs:
Video : 4k HEVC SDR
Audio : Dolby Digital+ 5.1 English + French
Subtitles : Embedded ASS (English + French + French Forced)
The problem happens on Android TV. No issue on Web player
The movie is transcoded to the Android TV box as
Video : HEVC --> HEVC 3600
Audio : EAC3 -> AAC
So, when subtitles are off, the movie just play fine.
But whenever I activate any of the subtitles, first it takes like one minute of black screen before the movie plays again ( and I can see the subtitles), but then the movie "lags" non stop. Every 5 seconds or so, it hangs 1-2 seconds. And it remains in this lagging state indefinitely (well I let it play like this at least 15 minutes and then stopped because it aint funny)
When I disable the subtitles, everything is working fine again.
I restarted the android box and made dozen of restarting movie attempts, its always the same behavior.
I inspected the server logs, and I cant find anything obvious.
Those are the logs I see for that stream when the subtitles are on and the movie is lagging
Any hint ??
Got an issue with a very specific situation.
Have a movie with following specs:
Video : 4k HEVC SDR
Audio : Dolby Digital+ 5.1 English + French
Subtitles : Embedded ASS (English + French + French Forced)
The problem happens on Android TV. No issue on Web player
The movie is transcoded to the Android TV box as
Video : HEVC --> HEVC 3600
Audio : EAC3 -> AAC
So, when subtitles are off, the movie just play fine.
But whenever I activate any of the subtitles, first it takes like one minute of black screen before the movie plays again ( and I can see the subtitles), but then the movie "lags" non stop. Every 5 seconds or so, it hangs 1-2 seconds. And it remains in this lagging state indefinitely (well I let it play like this at least 15 minutes and then stopped because it aint funny)
When I disable the subtitles, everything is working fine again.
I restarted the android box and made dozen of restarting movie attempts, its always the same behavior.
I inspected the server logs, and I cant find anything obvious.
Those are the logs I see for that stream when the subtitles are on and the movie is lagging
Code:
[2025-03-23 08:58:34.981 +01:00] [INF] Removing item, Type: "Episode", Name: "Only Gunshots to Guide Us", Path: "", Id: c53d897f-9ea1-ee68-ebdd-a885a3aff984
[2025-03-23 08:58:36.472 +01:00] [INF] Stopping ffmpeg process with q command for "/cache/jellyfin/transcodes/a05fc672d55ca3769b77ea7c967cf139.m3u8"
[2025-03-23 08:58:36.487 +01:00] [INF] User policy for "tom". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2025-03-23 08:58:37.000 +01:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -fflags +genpts -i file:\"/media/plex/movies/The Brutalist (2024) [imdbid-tt8999762]/The Brutalist (2024) [imdbid-tt8999762] - [WEBRip-2160p][EAC3 5.1][x265]-Amen.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:s -codec:v:0 copy -tag:v:0 hvc1 -bsf:v hevc_mp4toannexb -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 256000 -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 \"/cache/jellyfin/transcodes/223dc7e671c56b077afe78050de67ca9%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/jellyfin/transcodes/223dc7e671c56b077afe78050de67ca9.m3u8\""
[2025-03-23 08:58:39.957 +01:00] [INF] Stopping ffmpeg process with q command for "/cache/jellyfin/transcodes/223dc7e671c56b077afe78050de67ca9.m3u8"
[2025-03-23 08:58:40.045 +01:00] [INF] FFmpeg exited with code 0
[2025-03-23 08:58:40.089 +01:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -ss 00:16:59.518 -fflags +genpts -i file:\"/media/plex/movies/The Brutalist (2024) [imdbid-tt8999762]/The Brutalist (2024) [imdbid-tt8999762] - [WEBRip-2160p][EAC3 5.1][x265]-Amen.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:s -codec:v:0 copy -tag:v:0 hvc1 -bsf:v hevc_mp4toannexb -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 256000 -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 146 -hls_segment_filename \"/cache/jellyfin/transcodes/223dc7e671c56b077afe78050de67ca9%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/jellyfin/transcodes/223dc7e671c56b077afe78050de67ca9.m3u8\""
[2025-03-23 08:58:40.704 +01:00] [INF] FFmpeg exited with code 0
[2025-03-23 08:58:40.705 +01:00] [INF] Deleting partial stream file(s) "/cache/jellyfin/transcodes/a05fc672d55ca3769b77ea7c967cf139.m3u8"
[2025-03-23 08:58:42.216 +01:00] [INF] Playback stopped reported by app "Android TV" "0.18.6" playing "The Brutalist". Stopped at "1021563" ms
[2025-03-23 08:58:59.618 +01:00] [INF] Stopping ffmpeg process with q command for "/cache/jellyfin/transcodes/223dc7e671c56b077afe78050de67ca9.m3u8"
[2025-03-23 08:58:59.677 +01:00] [INF] User policy for "tom". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2025-03-23 08:58:59.687 +01:00] [INF] FFmpeg exited with code 0
[2025-03-23 08:58:59.688 +01:00] [INF] Deleting partial stream file(s) "/cache/jellyfin/transcodes/223dc7e671c56b077afe78050de67ca9.m3u8"
[2025-03-23 08:59:00.582 +01:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -i file:\"/media/plex/movies/The Brutalist (2024) [imdbid-tt8999762]/The Brutalist (2024) [imdbid-tt8999762] - [WEBRip-2160p][EAC3 5.1][x265]-Amen.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -codec:v:0 libx265 -tag:v:0 hvc1 -preset veryfast -crf 28 -maxrate 5670772 -bufsize 11341544 -profile:v:0 main -x265-params:0 no-scenecut=1:no-open-gop=1:no-info=1:subme=3:merange=25:rc-lookahead=10:me=star:ctu=32:max-tu-size=32:min-cu-size=16:rskip=2:rskip-edge-threshold=2:no-sao=1:no-strong-intra-smoothing=1 -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(4096\,4096*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(4096/a\,4096))/2)*2,format=yuv420p,subtitles=f='/var/lib/jellyfin/data/subtitles/4/48c12e9c-c90f-88bd-0ddf-f89dbbb3a898.ass':fontsdir='/cache/jellyfin/attachments/3965a22f3c402aa7fcf0e428816fce84'\" -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 256000 -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 \"/cache/jellyfin/transcodes/aa048532f2450d798b0a15100ed58a1b%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/jellyfin/transcodes/aa048532f2450d798b0a15100ed58a1b.m3u8\""
[2025-03-23 08:59:01.229 +01:00] [INF] Playback stopped reported by app "Android TV" "0.18.6" playing "The Brutalist". Stopped at "1035544" ms
[2025-03-23 08:59:25.956 +01:00] [INF] Stopping ffmpeg process with q command for "/cache/jellyfin/transcodes/aa048532f2450d798b0a15100ed58a1b.m3u8"
[2025-03-23 08:59:29.872 +01:00] [INF] FFmpeg exited with code 0
[2025-03-23 08:59:29.908 +01:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -ss 00:17:15.000 -i file:\"/media/plex/movies/The Brutalist (2024) [imdbid-tt8999762]/The Brutalist (2024) [imdbid-tt8999762] - [WEBRip-2160p][EAC3 5.1][x265]-Amen.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -codec:v:0 libx265 -tag:v:0 hvc1 -preset veryfast -crf 28 -maxrate 5670772 -bufsize 11341544 -profile:v:0 main -x265-params:0 no-scenecut=1:no-open-gop=1:no-info=1:subme=3:merange=25:rc-lookahead=10:me=star:ctu=32:max-tu-size=32:min-cu-size=16:rskip=2:rskip-edge-threshold=2:no-sao=1:no-strong-intra-smoothing=1 -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(4096\,4096*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(4096/a\,4096))/2)*2,format=yuv420p,subtitles=f='/var/lib/jellyfin/data/subtitles/4/48c12e9c-c90f-88bd-0ddf-f89dbbb3a898.ass':fontsdir='/cache/jellyfin/attachments/3965a22f3c402aa7fcf0e428816fce84'\" -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 256000 -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 345 -hls_segment_filename \"/cache/jellyfin/transcodes/aa048532f2450d798b0a15100ed58a1b%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/jellyfin/transcodes/aa048532f2450d798b0a15100ed58a1b.m3u8\""
[2025-03-23 09:02:44.095 +01:00] [INF] WS "95.182.169.137" request
[2025-03-23 09:02:51.158 +01:00] [INF] Deleting partial stream file(s) "/cache/jellyfin/transcodes/914813a812d72414ea4b6ae86e34c728.m3u8"
Any hint ??