Playback on chromecast 4k lags even when not transcoding - jpnadas - 2024-01-02
I am having a very hard time understanding what is going on with playback from my jellyfin server onto my chromecast 4k.
With any media I try, it lags a lot as if it were not loading data fast enough. When I look in the logs of the server, it is on direct play.
What's odd is that the same behavior happens both in jellyfin's client as well as in kodi with the kodi for jellyfin plugin in add-on mode, suggesting it could be something on the server.
However, on my firestick 4k (on another TV) it plays fine, suggesting it's not an issue with the server.
Also note that the chromecast in question plays 4k media from netflix, and I have tested the bandwidth from my server (from within the docker container) into another computer in the same AP as the chromecast and got 200mbps via iperf3. It looks like it is unlikely to be networking bottleneck.
The last piece of information which might be relevant: this wasn't the case in the past. Things used to work okay in this particular chromecast a few months ago.
Any help in understanding what is going on would be greatly appreciated.
Some info on my setup
Chromecast 4k
Jellyfin client version 0.16.1
Kodi version 20.2
Jellyfin for kodi add on version 0.7.11
fire stick 4k
Jellyfin client version 0.16.2
Kodi version 19.3
Jellyfin for kodi add on version 0.7.10
server
raspberry pi 4 8GB
networking: ethernet
Jellyfin version: 10.8.13 running via docker
storage: WD RedTM SA500 NAS SATA SSD 500GB (connected via USB 3.0)
Server logs from when playing on chromecast
[15:08:08] [INF] [32] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[15:08:08] [INF] [32] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-libVLC, Path=/data/tvshows/Young Sheldon (2017) [tvdbid-328724]/Season 02/Young.Sheldon.-.S02E15.-.A.Math.Emergency.and.Perky.Palms.WEBRip-720p.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/c9994ee5-def1-c7f1-66c0-3938a344833f/stream.mkv?MediaSourceId=c9994ee5def1c7f166c03938a344833f&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&SubtitleStreamIndex=2&api_key=<token>&SubtitleMethod=Embed&Tag=9248c83b8bb87f9242b719b8780490e8
[15:08:09] [INF] [34] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[15:08:09] [INF] [34] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-ExoPlayer, Path=/data/tvshows/Young Sheldon (2017) [tvdbid-328724]/Season 02/Young.Sheldon.-.S02E15.-.A.Math.Emergency.and.Perky.Palms.WEBRip-720p.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/c9994ee5-def1-c7f1-66c0-3938a344833f/stream.mkv?MediaSourceId=c9994ee5def1c7f166c03938a344833f&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&SubtitleStreamIndex=2&api_key=<token>&SubtitleMethod=Embed&Tag=9248c83b8bb87f9242b719b8780490e8
[15:08:11] [INF] [32] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Started user data sync
[15:08:11] [INF] [32] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: User Data Sync: User admin (9131f954beca4fca8fad1f64cf586301) posted 2 updates
[15:08:11] [INF] [32] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Finished user data sync, taking 00:00:00.2920271
server logs from when playing on firestick
[16:05:18] [INF] [57] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[16:05:18] [INF] [57] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-libVLC, Path=/data/tvshows/Young Sheldon (2017) [tvdbid-328724]/Season 02/Young.Sheldon.-.S02E15.-.A.Math.Emergency.and.Perky.Palms.WEBRip-720p.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/c9994ee5-def1-c7f1-66c0-3938a344833f/stream.mkv?MediaSourceId=c9994ee5def1c7f166c03938a344833f&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&SubtitleStreamIndex=2&api_key=<token>&SubtitleMethod=Embed&Tag=9248c83b8bb87f9242b719b8780490e8
[16:05:19] [INF] [47] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[16:05:19] [INF] [47] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-ExoPlayer, Path=/data/tvshows/Young Sheldon (2017) [tvdbid-328724]/Season 02/Young.Sheldon.-.S02E15.-.A.Math.Emergency.and.Perky.Palms.WEBRip-720p.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/c9994ee5-def1-c7f1-66c0-3938a344833f/stream.mkv?MediaSourceId=c9994ee5def1c7f166c03938a344833f&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&SubtitleStreamIndex=2&api_key=<token>&SubtitleMethod=Embed&Tag=9248c83b8bb87f9242b719b8780490e8
[16:05:20] [INF] [44] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Started user data sync
[16:05:21] [INF] [44] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: User Data Sync: User admin (9131f954beca4fca8fad1f64cf586301) posted 2 updates
[16:05:21] [INF] [44] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Finished user data sync, taking 00:00:00.1731653
RE: Playback on chromecast 4k lags even when not transcoding - TheDreadPirate - 2024-01-02
Try manually setting the preferred player to exoplayer on the CCwGTV.
RE: Playback on chromecast 4k lags even when not transcoding - jpnadas - 2024-01-03
Interesting. With exoplayer it starts to attempt to transcode.
I don't have much time to fiddle with it now, but I will report back in the evening to see if I can make it not transcode and use exoplayer.
[08:58:01] [INF] [32] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-libVLC, Path=/data/tvshows/Young Sheldon (2017) [tvdbid-328724]/Season 02/Young.Sheldon.-.S02E15.-.A.Math.Emergency.and.Perky.Palms.WEBRip-720p.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit ) media:/videos/c9994ee5-def1-c7f1-66c0-3938a344833f/stream.mkv?MediaSourceId=c9994ee5def1c7f166c03938a344833f&VideoCodec=h264,h264&AudioCodec=aac&AudioStreamIndex=1&SubtitleStreamIndex=2&VideoBitrate=705102&AudioBitrate=384000&AudioSampleRate=48000&MaxFramerate=24&api_key=<token>&SubtitleMethod=Embed&CopyTimestamps=true&RequireAvc=false&Tag=9248c83b8bb87f9242b719b8780490e8&SubtitleCodec=subrip&h264-level=31&h264-videobitdepth=8&h264-profile=high&h264-audiochannels=2&aac-profile=lc&aac-audiochannels=8&TranscodeReasons=ContainerBitrateExceedsLimit
RE: Playback on chromecast 4k lags even when not transcoding - TheDreadPirate - 2024-01-03
Manually set your max bit rate to 120Mbps. The network speed auto detection on Android TV isn't great.
Code: TranscodeReason=ContainerBitrateExceedsLimit
RE: Playback on chromecast 4k lags even when not transcoding - jpnadas - 2024-01-03
Okay, had some time and changed the max bit rate from auto to 120 and it no longer tries to transcode it. However even with exoplayer the behavior is still the same, it plays a couple of seconds of the episode and then buffers. Here is the server log.
Code: [09:35:35] [INF] [60] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Sync Requested for UserID: '9131f954beca4fca8fad1f64cf586301' with LastUpdateDT: '2024-01-03T07:37:11z'
[09:35:35] [INF] [60] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Added: 0, Removed: 0, Updated: 0, Changed User Data: 1
[09:35:35] [INF] [60] Jellyfin.Plugin.KodiSyncQueue.API.KodiSyncQueueController: Request Finished Taking 00:00:00.1450569
[09:36:50] [INF] [13] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[09:36:50] [INF] [13] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-libVLC, Path=/data/tvshows/Young Sheldon (2017) [tvdbid-328724]/Season 02/Young.Sheldon.-.S02E15.-.A.Math.Emergency.and.Perky.Palms.WEBRip-720p.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/c9994ee5-def1-c7f1-66c0-3938a344833f/stream.mkv?MediaSourceId=c9994ee5def1c7f166c03938a344833f&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&SubtitleStreamIndex=2&api_key=<token>&SubtitleMethod=Embed&Tag=9248c83b8bb87f9242b719b8780490e8
[09:36:51] [INF] [58] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[09:36:51] [INF] [58] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=AndroidTV-ExoPlayer, Path=/data/tvshows/Young Sheldon (2017) [tvdbid-328724]/Season 02/Young.Sheldon.-.S02E15.-.A.Math.Emergency.and.Perky.Palms.WEBRip-720p.mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/c9994ee5-def1-c7f1-66c0-3938a344833f/stream.mkv?MediaSourceId=c9994ee5def1c7f166c03938a344833f&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&SubtitleStreamIndex=2&api_key=<token>&SubtitleMethod=Embed&Tag=9248c83b8bb87f9242b719b8780490e8
[09:36:53] [INF] [50] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Started user data sync
[09:36:53] [INF] [50] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: User Data Sync: User admin (9131f954beca4fca8fad1f64cf586301) posted 2 updates
[09:36:53] [INF] [50] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Finished user data sync, taking 00:00:00.1807746
[09:37:45] [INF] [10] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Android TV 0.16.1 playing A Math Emergency and Perky Palms. Stopped at 14862 ms
[09:37:46] [INF] [8] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Started user data sync
[09:37:46] [INF] [8] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: User Data Sync: User admin (9131f954beca4fca8fad1f64cf586301) posted 2 updates
[09:37:46] [INF] [8] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Finished user data sync, taking 00:00:00.2022713
RE: Playback on chromecast 4k lags even when not transcoding - TheDreadPirate - 2024-01-03
Weak WIFI where this device is located?
RE: Playback on chromecast 4k lags even when not transcoding - jpnadas - 2024-01-03
I play 4k netflix content on that device, so it's unlikely. Also, the raspberry pi server is on Ethernet (precisely to rule this out).
|