MKV Playback works on Android-Phone but not on Android-TV

Hi,

first of all, I’m very grateful to all you people working on this project, so thank you very much for your time an effort! I’m loving the Jellyfin experience, sadly there are some showstoppers, for me at least, one of them being the following issue.

When playing MKV Videos from my NAS on my Android-TV (actually the new Google-TV dongle) I experience freezes every minute or so. These last for several seconds, almost a minute, and then playback resumes.
On my Android phone this doesn’t happen, and the funny thing is, I can screen-cast my phone to my TV and watch an entire 1080p episode without any issues.

I obviously can’t be 100% sure, but it looks pretty much like this is an issue with the Jellyfin app on Android-TV. There is enough bandwidth to stream 1080p to my phone and then to my TV over Wifi, so I don’t think the issue is either bandwidth nor transcoding performance.

Any ideas?

What audio / video codecs is used on the media? Sounds like the tv dosent support the codec of the media… Look at the CPU load of the NAS when playing

H264 and AC3, both are supported by the TV. I checked the NAS, it’s between 25 to 35% during playback.

Im a bit confused, you srite about Google TV (The latest Chromecast) and Android TV. You write theres issues with both, but not when casting from your phone to the tv/chromecast.

It sounds like the NAS is doing audio transcoding of what i can hear… but im not sure if the problem is on 2 devices or just 1 out of 3?

Sorry, I think I wasn’t clear enough.
I’m using the jellyfin app on two devices:

Phone: works
Google TV dongle: freezes every minute or so.

The dongle is connected to the aforementioned LG TV. I think there’s transcoding going on in both cases.

I can Screencast my phone to my TV, which has nothing to do with chromecast or the dongle. It’s a separate feature. This allows me to use jellyfin on my phone, and have the output display on my TV without freezes.

I agree, is it possible tofr you to test with a video fil encoded to vp9 webm and audio vorbis?

Here is a ffmpeg command you can use: ffmpeg -i input.mkv -c:v libvpx-vp9 -crf 30 -b:v 2000k -c:s copy -quality realtime -speed 5 -c:a libvorbis -qscale:a 4 output.webm

Sure, and BTW, thank you very much for helping me out here.
I tried your cmd with the latest ffmpeg release and sadly it fails with the following error:

[webm @ 0000022af99d6c00] Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.

My ffmpeg knowledge is essentially nonexistent, but as far as I can see that cmd seems to request conversion to VP9 and Vorbis, so I don’t get why this error is dropped. I did a quick google without finding anything helpful. Maybe it has something to do with the Subtitles?
This Pastebin contains the entire console output.

Thats odd, but luckily heres a movie you can download. It’s free, encoded in VP8 and with Vorbis audio. Please download it, add to your Jellyfin library and play it to see if it acts up:
http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/tears_of_steel_1080p.webm

You can find more versions of it here: https://mango.blender.org/download/

Just in case you wanna try higher resolutions or lower or versions with diff. codecs

I get the same result with this movie, every minute or so it freezes.

The TV itself, and the Google TV dongle both are capable of 4K playback without issues (doing it all the time with Netflix & Co.). So I guess bandwidth or hardware cannot be the issue on that end.
Also streaming 4K movies to other 4K capable devices, such as my PC, isn’t an issue. I tried again with this movie. So I guess that excludes the NAS performance too.

I can’t help but think that there has to be something wrong with the Jellyfin app on Google-TV (aka Android-TV). I tried to take a look at the Jellyfin server logs, there are some Socket related errors it seems, but I’m not quite sure what to make of it.

What about the CPU load when playing the movie?
Please try and download the movie in multiple resolutions, just to check… You can add it like this

Tears of steel - 108p.webm
Tears of steel - 720p.mkv
Tears of steel - 540p.mkv

Then you just choose them in jellyfin (go into the movie and select version of the movie)

What im trying to clear is if the NAS does transcode, also if it will do with all versions of tears of steel… But i know there bug fixes for Jellyfin server 10.7.0, but i havent had success launching this version yet. (Wont work on my Raspberry Pi)

I downloaded and tested the only other resolution that I could find on that FTP, a 720p .mov file. So I’m not quite sure if the results are even comparable. Anyway, here are the results.

  • Idle
    CPU usage “idles” at around 15%, as there’s stuff happening on the NAS all the time.

  • 1080p (MKV)
    4k TV (App): Freezes a dozen times while CPU is around 30%.
    There where a couple of 50-70% spikes, but I couldn’t relate these to the freezes, as they happened with CPU @ 30% and quite a while after them.
    4k PC (Browser): All fine, CPU seems unaffected @ 15% usage.

  • 720p (MOV)
    4k TV (App): All fine, CPU seems unaffected @ 15% usage.
    4k PC (Browser): All fine, CPU seems unaffected @ 15% usage.

Judging only by the CPU usage, it seems that the 1080p movie is being transcoded during playback on my TV. Which seems odd, as there’s no reason for it.

I noticed an option to force the playback resolution in the webplayer. So I tried to force transcoding by choosing a lower resolution (720p), to see if I was able to reproduce the issue on my PC (browser).

The only noticeable difference was a CPU usage spike of around 50% for 10-15 seconds at the beginning, playback was smooth from start to finish.

I will try to see if I am able to force the App on the TV to disable transcoding and report back.

You can find more here: https://mango.blender.org/download/

You can also try updateing your Jellyfin to 10.7.0 - just remove all plugins you manually has installed, i had to, else my jellyfin wouldnt start.