Jellyfin Forum
Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - 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: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi (/t-jellyfin-for-android-tv-poor-4k-playback-vs-jellyfin-for-kodi)



Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - swensonator - 2024-04-20

I have been purchasing UHD + blu ray combo packs for select videos for several years, despite not owning a 4k TV. Until recently I have been ripping the 1080p blur ray discs as that is all the resolution my TV supported. Long story short, our TV died and we upgraded to a 4k TCL Android TV and I went back and started ripping my UHD discs. I don't have the need or desire to keep the full 4k REMUX, so I transcode my rips - keeping just the video, primary audio, and subtitle - and generally end up with a 4k 10bit h265 file that average around 12.5 Mbps. The TV is connected via ethernet, which is only a 10/100 connection, but that should still be plenty of bandwidth for these files.

My problem is that the my 4k files will NOT play smoothly on the Jellyfin for Android TV app. My server (Jellyfin 10.8.13) is an LXC running on Proxmox pointed to a NAS storing the files and accessing via NFS share, but the specifics of the server shouldn't really matter as all the files report as "Direct Play" in the Jellyfin Dashboard and in the logs. The playback, however, stutters and freezes or sometimes plays at rates other than ~24fps as evidenced by audio distortion as the playback slows down and speeds up. Most files freeze up completely a few seconds into the file. The truly odd thing is that the same files play completely normally if I play it in Kodi using the Jellyfin plugin in "Add-on Mode". Same TV, same Jellyfin server, same ethernet connection, and it also reports as "Direct Play" (I have transcoding disabled for the user). Both Jellyfin and Kodi are installed directly on the TV via the Google Play Store. Because the other variables - TV technical specs, server, file source, etc - are the same, I *assumed* the difference must be a setting or the playback method in the Jellyfin app.

Here is the log from when trying to play a file in the Jellyfin app and experience all sorts of playback issues (none of which are reflected in the log):

Code:
[2024-04-20 13:44:17.365 -04:00] [INF] User policy for "TV". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2024-04-20 13:44:17.365 -04:00] [INF] StreamBuilder.BuildVideoItem( Profile="AndroidTV-libVLC", Path="/nfs/Videos/Movies/Spider-Man_Across_The_Spider-Verse/Spider-Man_Across_The_Spider-Verse.2023 - [2160p].mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/66e64556-1387-521d-eb1f-3bca38dfaa72/stream.mkv?MediaSourceId=66e645561387521deb1f3bca38dfaa72&Static=true&VideoCodec=hevc&AudioCodec=truehd&AudioStreamIndex=1&SubtitleStreamIndex=3&api_key=<token>&SubtitleMethod=Embed&Tag=e19848275b89e4a9b5c51c53e39f983d"
[2024-04-20 13:44:17.557 -04:00] [INF] User policy for "TV". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2024-04-20 13:44:17.558 -04:00] [INF] StreamBuilder.BuildVideoItem( Profile="AndroidTV-ExoPlayer", Path="/nfs/Videos/Movies/Spider-Man_Across_The_Spider-Verse/Spider-Man_Across_The_Spider-Verse.2023 - [2160p].mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/66e64556-1387-521d-eb1f-3bca38dfaa72/stream.mkv?MediaSourceId=66e645561387521deb1f3bca38dfaa72&Static=true&VideoCodec=hevc&AudioCodec=truehd&AudioStreamIndex=1&SubtitleStreamIndex=3&api_key=<token>&SubtitleMethod=Embed&Tag=e19848275b89e4a9b5c51c53e39f983d"
[2024-04-20 13:44:18.592 -04:00] [INF] Started user data sync
[2024-04-20 13:44:18.604 -04:00] [INF] User Data Sync: User "TV" ("54d14dfd9b64456dac711523c5cddbf3") posted 2 updates
[2024-04-20 13:44:18.604 -04:00] [INF] Finished user data sync, taking "00:00:00.0110799"
[2024-04-20 13:45:51.557 -04:00] [INF] Playback stopped reported by app "Android TV" "0.16.7" playing "Spider-Man: Across the Spider-Verse". Stopped at "84529" ms
[2024-04-20 13:45:52.068 -04:00] [INF] Started user data sync
[2024-04-20 13:45:52.081 -04:00] [INF] User Data Sync: User "TV" ("54d14dfd9b64456dac711523c5cddbf3") posted 2 updates
[2024-04-20 13:45:52.082 -04:00] [INF] Finished user data sync, taking "00:00:00.0136980"
[2024-04-20 13:46:39.049 -04:00] [INF] WS "192.168.***.***" request
[2024-04-20 13:46:58.145 -04:00] [INF] Sync Requested for UserID: '"54d14dfd9b64456dac711523c5cddbf3"' with LastUpdateDT: '"2024-04-20T17:40:40z"'
[2024-04-20 13:46:58.168 -04:00] [INF] Added: 0, Removed: 0, Updated: 0, Changed User Data: 1
[2024-04-20 13:46:58.168 -04:00] [INF] Request Finished Taking "00:00:00.0226562"
[2024-04-20 13:47:27.055 -04:00] [INF] Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-04-20 13:47:39.053 -04:00] [INF] Sending ForceKeepAlive message to 1 inactive WebSockets.


Then I immediately switch to Kodi and play the same file under the same profile with no issues at all:

Code:
[2024-04-20 13:47:49.650 -04:00] [INF] User policy for "TV". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2024-04-20 13:47:49.650 -04:00] [INF] StreamBuilder.BuildVideoItem( Profile="Kodi", Path="/nfs/Videos/Movies/Spider-Man_Across_The_Spider-Verse/Spider-Man_Across_The_Spider-Verse.2023 - [2160p].mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/66e64556-1387-521d-eb1f-3bca38dfaa72/stream.mkv?MediaSourceId=66e645561387521deb1f3bca38dfaa72&Static=true&VideoCodec=hevc&AudioCodec=truehd&AudioStreamIndex=1&SubtitleStreamIndex=3&api_key=<token>&SubtitleMethod=Embed&Tag=e19848275b89e4a9b5c51c53e39f983d"
[2024-04-20 13:47:51.053 -04:00] [INF] Lost 1 WebSockets.
[2024-04-20 13:47:51.716 -04:00] [INF] Started user data sync
[2024-04-20 13:47:51.739 -04:00] [INF] User Data Sync: User "TV" ("54d14dfd9b64456dac711523c5cddbf3") posted 2 updates
[2024-04-20 13:47:51.739 -04:00] [INF] Finished user data sync, taking "00:00:00.0229520"
[2024-04-20 13:50:47.748 -04:00] [INF] Playback stopped reported by app "Kodi" "1.0.2 py3" playing "Spider-Man: Across the Spider-Verse". Stopped at "165000" ms

I experimented with manually changing the "Max streaming bitrate" in Jellyfin from "auto" to "120Mbit/s" to ensure there wasn't an artificial bottleneck. I also tried switching the "Preferred media player" between "Automatically choose", "Exoplayer", and "VLC" but the results were the same regardless of the settings changes.

I also downloaded VLC for Android as a standalone app and the files play directly from the NAS without difficulty, so I don't know why it would the files would issues with playback when "VLC" is the selected player for Jellyfin.

I've been using Jellyfin for years now (shoutout to the developers!) and it is what my wife and kids know and are comfortable with. At this point they are not wanting to switch apps, but I also can't expect my 6 year old to remember to use Kodi for 4k movies and Jellyfin for everything else.

Any ideas on why Jellyfin is struggling with these 4k files? Anything obvious I am missing?

Thanks in advance!


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - TheDreadPirate - 2024-04-21

What version of Android TV is the TV running?


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - swensonator - 2024-04-21

Android TV version 11.

Using jellyfin-androidtv 0.16.7 client.


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - TheDreadPirate - 2024-04-21

In the TV settings do you have any frame rate smoothing options enabled? Another user had a similar problem and they resolved a similar issue by turning off the smoothing feature on their TV.


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - swensonator - 2024-04-22

I just double checked, but I have those settings all disabled on the TV. When I initially setup the TV I disabled any additional processing, like 'Motion Clarity' on my TV, to avoid unnecessary modifications to the picture.

I don't have refresh rate switching enabled in Kodi, but is the Jellyfin client trying to do something with the refresh rate by default that could be conflicting with the TV? The fact that Kodi plays files smoothly makes me think Jellyfin should be able to, as well, and it is just a matter of figuring out what setting(s) in either the TV or Jellyfin is causing the issue.


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - TheDreadPirate - 2024-04-22

I don't know if Kodi does refresh rate switching or not. In Jellyfin for Android TV on the home screen click on the gear in the top left > Playback > about halfway down are the refresh rate switching settings. Experiment with those.


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - swensonator - 2024-04-22

I'll have to compare the refresh switching settings between Kodi and Jellyfin.

Are there client side logs available for Jellyfin? From the server side it reports "Direct Play", but obviously the client is struggling to play. Is that recorded in a log anywhere? I'm not a C# developer (I stick to python), but I do know my way around a debug log.


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - TheDreadPirate - 2024-04-23

If it is direct playing there are very few logs and only Jellyfin Media Player on a desktop PC will produce logs for normal playback.


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - swensonator - 2024-04-23

Dang. OK. I'll just have to dig around in the settings and see what I can find.


RE: Jellyfin for Android TV poor 4k playback vs Jellyfin for Kodi - swensonator - 2024-04-28

OK. So I finally figured out what the problem was, and it leads to some more questions.

I had seen the issue I described with some specific files and had continued using those same files in my subsequent testing. Finally I went back and started performing a more systematic test of all my 4k files and realized that some of them played perfectly fine on Jellyfin while others did not. The difference between files that stuttered/froze and those that did not was the audio codec. Every file with Dolby TrueHD with Atmos audio causes Jellyfin to have issues. DD+ is fine. TrueHD without Atmos is fine. DTS:MA/XLL is fine.

I do *NOT* have a Dolby Atmos capable receiver, but I would have assumed that the receiver would simply ignore the spatial metadata and play the underlying TrueHD audio stream. Other apps, like Disney+, appear to work that way just fine (the TV shows the Dolby Atmos logo on supported videos). And that doesn't explain why the video would be stuttering in Jellyin.

In the short term, most of my blu rays have a DTS XLL option for audio, and I can simply rip that track instead. It does however raise the question as to why Jellyfin is experiencing these issues, Kodi is not, and other apps that are also outputing Dolby Atmos (e.g. Disney+) are also not having issues. Interestingly, I do *NOT* get the Dolby Atmos logo when playing videos through Jellyfin or Kodi. I know that some TV manufacturers limit the abilities of 3rd party applications to bitstream certain audio codecs. Maybe the TV is causing the Dolby Atmos to be incorrectly interpreted and therefore cause problems for Jellyfin playback?