Jellyfin Forum
Subtitle micro-stutter with libVLC and weird design with ExoPlayer - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Subtitle micro-stutter with libVLC and weird design with ExoPlayer (/t-subtitle-micro-stutter-with-libvlc-and-weird-design-with-exoplayer)



Subtitle micro-stutter with libVLC and weird design with ExoPlayer - oben - 2023-11-11

Hi, I am streaming mkv's from my Jellyfin Windows Server 10.8.12 to my Sony XR-83A90J using the Jellyfin for Android TV app installed via the Play Store.

When using libVLC I get a micro stutter every time a subtitle changes. The video runs perfectly smooth until a subtitle is displayed or changed to a new one. Exactly the second the subtitle is displayed, there is a fraction of a micro-stutter, it's only a fraction of a second, but definitely noticeable.
When I switch to ExoPlayer, this behavior stops, but the subtitles aren't white and in a really weird design, I can show a picture later.

I haven't been able to reproduce this behavior on other devices.
I don't use transcoding. Transcoding is completely disabled for this Jellyfin user, and I verified that Jellyfin is using DirectPlay for the movie.
During playback there is 0 load on the server (because there is no transcoding).

This happens with every movie, not just the one from the example below. Here is one of the smaller mkv's I have, where this issue occurs:
Video
Code:
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 2 h 41 min
Bit rate : 56.0 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.282
Stream size : 63.2 GiB (90%)
Title : censored for obvious reasons
Language : English
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 385 cd/m2
Maximum Frame-Average Light Level : 213 cd/m2

Text #1
Code:
ID : 6
ID in the original source medium : 4768 (0x12A0)
Format : PGS
Muxing mode : zlib
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 2 h 39 min
Bit rate : 33.7 kb/s
Frame rate : 0.374 FPS
Count of elements : 3588
Stream size : 38.4 MiB (0%)
Language : English
Default : No
Forced : No
Original source medium : Blu-ray

Text #2
Code:
ID : 7
ID in the original source medium : 4769 (0x12A1)
Format : PGS
Muxing mode : zlib
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 2 h 40 min
Bit rate : 37.2 kb/s
Frame rate : 0.427 FPS
Count of elements : 4116
Stream size : 42.8 MiB (0%)
Language : English
Default : No
Forced : No
Original source medium : Blu-ray

Any ideas?


RE: Subtitle micro-stutter with libVLC and weird design with ExoPlayer - TheDreadPirate - 2023-11-11

Can you share your jellyfin and ffmpeg logs (if those exist)? Censor any WAN IPs, censor sensitive parts of the file names, but leave enough that I can link activity in the jellyfin and ffmpeg logs.


RE: Subtitle micro-stutter with libVLC and weird design with ExoPlayer - oben - 2023-11-11

Hi @TheDreadPirate, thanks for your reply.
Below is the Jellyfin server log and the image I was talking about in my original post.
As far as I know there are no FFmpeg logs since this is DirectPlay and there is no transcoding happening, or should there still be FFmpeg logs?

At 20:21:16 playback was started using ExoPlayer, which shows the subtitles in this weird design (see attached image), but without micro-stuttering.
[Image: Igr0w1r.jpeg]
At 20:22:27 I switched to libVLC and the micro-stuttering problem returned, but there the subtitles look the way they should.

Code:
[2023-11-11 20:21:07.021 +01:00] [INF] [67] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.178.33" request
[2023-11-11 20:21:16.313 +01:00] [INF] [67] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "oben". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2023-11-11 20:21:16.314 +01:00] [INF] [67] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV-libVLC", Path="E:\movies\movie.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/8ffdda99-064a-5bac-35f4-a2a0475d794c/stream.mkv?MediaSourceId=8ffdda99064a5bac35f4a2a0475d794c&Static=true&VideoCodec=hevc&AudioCodec=dts&AudioStreamIndex=1&SubtitleStreamIndex=5&api_key=<token>&SubtitleMethod=Embed&Tag=f320d4229728c71102f928fe39127e8a"
[2023-11-11 20:21:16.362 +01:00] [INF] [71] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "oben". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2023-11-11 20:21:16.366 +01:00] [INF] [71] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV-ExoPlayer", Path="E:\movies\movie.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/8ffdda99-064a-5bac-35f4-a2a0475d794c/stream.mkv?MediaSourceId=8ffdda99064a5bac35f4a2a0475d794c&Static=true&VideoCodec=hevc&AudioCodec=dts&AudioStreamIndex=1&SubtitleStreamIndex=5&api_key=<token>&SubtitleMethod=Embed&Tag=f320d4229728c71102f928fe39127e8a"
[2023-11-11 20:21:16.492 +01:00] [INF] [82] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Adding playback tracker : 34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c
[2023-11-11 20:21:16.494 +01:00] [INF] [82] Jellyfin.Plugin.PlaybackReporting.Data.PlaybackTracker: PlaybackTracker : Adding Start Event : 11/11/2023 20:21:16
[2023-11-11 20:21:16.495 +01:00] [INF] [82] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Creating StartPlaybackTimer Task
[2023-11-11 20:21:16.496 +01:00] [INF] [82] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : Entered
[2023-11-11 20:21:17.449 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:21:36.504 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: session.RemoteEndPoint : "192.168.178.33"
[2023-11-11 20:21:36.506 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_playing_id    = "8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:21:36.510 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_user_id        = "9427748619ff4c2ab61497825bef378a"
[2023-11-11 20:21:36.512 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_user_id_int    = 1
[2023-11-11 20:21:36.513 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : session_playing_id  = "8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:21:36.514 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : session_user_id      = "9427748619ff4c2ab61497825bef378a"
[2023-11-11 20:21:36.515 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : play_method          = "DirectPlay"
[2023-11-11 20:21:36.515 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : e.ClientName        = "Android TV"
[2023-11-11 20:21:36.516 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : e.DeviceName        = "Sony XR-83A90J"
[2023-11-11 20:21:36.517 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemName            = "Once Upon a Time… in Hollywood"
[2023-11-11 20:21:36.517 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemId              = "8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:21:36.518 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemType            = "Movie"
[2023-11-11 20:21:36.519 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : All matches, playback registered
[2023-11-11 20:21:36.519 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Playback tracker found, adding playback info : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:21:36.520 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Saving playback tracking activity in DB
[2023-11-11 20:21:36.533 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : Exited
[2023-11-11 20:21:37.505 +01:00] [INF] [97] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:21:57.950 +01:00] [INF] [42] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:09.242 +01:00] [INF] [97] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.16.0-beta.5" playing "Once Upon a Time… in Hollywood". Stopped at "1134222" ms
[2023-11-11 20:22:09.270 +01:00] [INF] [97] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Playback stop tracker found, processing stop : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:09.271 +01:00] [INF] [97] Jellyfin.Plugin.PlaybackReporting.Data.PlaybackTracker: PlaybackTracker : Adding Stop Event : 11/11/2023 20:22:09
[2023-11-11 20:22:09.273 +01:00] [INF] [97] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Saving playback tracking activity in DB
[2023-11-11 20:22:27.510 +01:00] [INF] [43] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "oben". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2023-11-11 20:22:27.511 +01:00] [INF] [43] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV-libVLC", Path="E:\movies\movie.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/8ffdda99-064a-5bac-35f4-a2a0475d794c/stream.mkv?MediaSourceId=8ffdda99064a5bac35f4a2a0475d794c&Static=true&VideoCodec=hevc&AudioCodec=dts&AudioStreamIndex=1&SubtitleStreamIndex=5&api_key=<token>&SubtitleMethod=Embed&Tag=f320d4229728c71102f928fe39127e8a"
[2023-11-11 20:22:27.545 +01:00] [INF] [61] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "oben". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2023-11-11 20:22:27.547 +01:00] [INF] [61] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV-ExoPlayer", Path="E:\movies\movie.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/8ffdda99-064a-5bac-35f4-a2a0475d794c/stream.mkv?MediaSourceId=8ffdda99064a5bac35f4a2a0475d794c&Static=true&VideoCodec=hevc&AudioCodec=dts&AudioStreamIndex=1&SubtitleStreamIndex=5&api_key=<token>&SubtitleMethod=Embed&Tag=f320d4229728c71102f928fe39127e8a"
[2023-11-11 20:22:27.618 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Adding playback tracker : 34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c
[2023-11-11 20:22:27.621 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.Data.PlaybackTracker: PlaybackTracker : Adding Start Event : 11/11/2023 20:22:27
[2023-11-11 20:22:27.624 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Creating StartPlaybackTimer Task
[2023-11-11 20:22:27.627 +01:00] [INF] [71] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : Entered
[2023-11-11 20:22:28.596 +01:00] [INF] [46] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:47.627 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: session.RemoteEndPoint : "192.168.178.33"
[2023-11-11 20:22:47.629 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_playing_id    = "8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:47.632 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_user_id        = "9427748619ff4c2ab61497825bef378a"
[2023-11-11 20:22:47.634 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : event_user_id_int    = 1
[2023-11-11 20:22:47.635 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : session_playing_id  = "8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:47.636 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : session_user_id      = "9427748619ff4c2ab61497825bef378a"
[2023-11-11 20:22:47.637 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : play_method          = "DirectPlay"
[2023-11-11 20:22:47.637 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : e.ClientName        = "Android TV"
[2023-11-11 20:22:47.638 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : e.DeviceName        = "Sony XR-83A90J"
[2023-11-11 20:22:47.639 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemName            = "Once Upon a Time… in Hollywood"
[2023-11-11 20:22:47.640 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemId              = "8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:47.640 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : ItemType            = "Movie"
[2023-11-11 20:22:47.641 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : All matches, playback registered
[2023-11-11 20:22:47.641 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Playback tracker found, adding playback info : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:47.642 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Saving playback tracking activity in DB
[2023-11-11 20:22:47.654 +01:00] [INF] [43] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: StartPlaybackTimer : Exited
[2023-11-11 20:22:49.020 +01:00] [INF] [44] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Processing playback tracker : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:59.453 +01:00] [INF] [40] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.16.0-beta.5" playing "Once Upon a Time… in Hollywood". Stopped at "1155267" ms
[2023-11-11 20:22:59.486 +01:00] [INF] [97] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Playback stop tracker found, processing stop : "34a90b7dbed9f1a70c3b44b5622accf83ae8107e-9427748619ff4c2ab61497825bef378a-8ffdda99064a5bac35f4a2a0475d794c"
[2023-11-11 20:22:59.488 +01:00] [INF] [97] Jellyfin.Plugin.PlaybackReporting.Data.PlaybackTracker: PlaybackTracker : Adding Stop Event : 11/11/2023 20:22:59
[2023-11-11 20:22:59.490 +01:00] [INF] [97] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Saving playback tracking activity in DB

Let me know if you need debug logs or anything else.


RE: Subtitle micro-stutter with libVLC and weird design with ExoPlayer - TheDreadPirate - 2023-11-11

The issue with exoplayer might be something to do with the image based subtitles? And a lot of people have stutter issues with libVLC. Personally I manually select exoplayer for my Chromecast with Google TV 4K.

Try installing the "Subtitle Extract" plugin (in the official plugin catalog), restart jellyfin, run the subtitle extract scheduled task. This will pre-extract your subs and they will show up as additional subtitle tracks. Pretty sure they are extracted simple SRT subs. Select this track with exoplayer and see if the subs look right.


RE: Subtitle micro-stutter with libVLC and weird design with ExoPlayer - oben - 2023-11-11

Yeah, I also just noticed that libVLC doesn't detect Dolby Vision. Meh. Will check out your solution later and report back, thanks.
Edit: Well, extracting subtitles from 12 TB of movies takes some time.


RE: Subtitle micro-stutter with libVLC and weird design with ExoPlayer - oben - 2023-11-12

Some movies have finished extracting. Do I need to link them manually or should the extension do it automatically?


RE: Subtitle micro-stutter with libVLC and weird design with ExoPlayer - oben - 2023-11-12

Okay, so extracting the subtitles with the extension is pretty inefficient, so I switched to MKVCleaver to extract the subtitles.
However, all the subtitles are PGS, which means I can't just convert them to SRT without some additional work.

I've also found that it's not really a problem that all my movies have PGS subtitles. There are some with PGS subtitles that work just fine, but I can't see any difference in the way they're encoded. Anyway, I think this is an ExoPlayer related issue and I'll eventually find a way to manually get SRT subtitles for the affected movies, lets see.

Thanks for your help.


RE: Subtitle micro-stutter with libVLC and weird design with ExoPlayer - Dopedangel - 2023-11-12

(2023-11-12, 11:05 AM)oben Wrote: Okay, so extracting the subtitles with the extension is pretty inefficient, so I switched to MKVCleaver to extract the subtitles.
However, all the subtitles are PGS, which means I can't just convert them to SRT without some additional work.

I've also found that it's not really a problem that all my movies have PGS subtitles. There are some with PGS subtitles that work just fine, but I can't see any difference in the way they're encoded. Anyway, I think this is an ExoPlayer related issue and I'll eventually find a way to manually get SRT subtitles for the affected movies, lets see.

Thanks for your help.

if you are using the arr apps you can use bazarr it will automatically download most of the subs for you