jellyfin-androidtv icon indicating copy to clipboard operation
jellyfin-androidtv copied to clipboard

[Google Chromecast Google TV 4K] h265/HEVC framerate 23.976216 issues

Open KirovAir opened this issue 1 year ago • 12 comments

Describe the bug

After a lot of testing I've found out that the HEVC support is very flaky on the 4K google tv. For all my test files 23.976216 fps is killing the playback. Transcoding fixes the issue instantly. High/low bitrates don't matter, the playback is simply juddery. With any other HEVC file it works perfectly fine. This issue is only present on Exoplayer. VLC works fine but will have desynced audio after a while (10mins).

Would it be possible to detect the google tv and simply transcode to H264 for those files? Or simply add an option on the client to always transcode h265/HEVC to h264 always.

Logs

No response

FFmpeg logs

No response

Media info of the file

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Man.on.Fire.(2004).Bluray-1080p.AAC.5.1.x265-Radarr.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    creation_time   : 2020-04-09T13:06:24.000000Z
    title           : Man.on.Fire.2004.1080p.BluRay.x265-RARBG
    encoder         : Lavf58.20.100
    comment         : Man.on.Fire.2004.1080p.BluRay.x265-RARBG
  Duration: 02:26:07.85, start: 0.000000, bitrate: 2230 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv), 1920x804 [SAR 1:1 DAR 160:67], 1999 kb/s, 23.98 fps, 23.98 tbr, 1200k tbn (default)
    Metadata:
      creation_time   : 2020-04-09T13:06:24.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 224 kb/s (default)
    Metadata:
      creation_time   : 2020-04-09T13:06:24.000000Z
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]

Application version

0.16.0

Device information

Google Chromecast Google TV 4K

Android version

Android 12

Jellyfin server version

10.8.13

KirovAir avatar Dec 17 '23 16:12 KirovAir

I also have a CCwGTV and a library almost entirely consisting of HEVC 23.976fps media, and I can't replicate this issue. Are you controlling for all of the other potential factors?

  • What other devices do you have in the chain (TV/AVR)?
  • Is refresh rate switching enabled?
  • Can you replicate this if it's plugged into another device, after completely reinstalling Jellyfin, or even factory resetting your Chromecast?
  • Does it affect the .mkv file container as well as .mp4?

zkhcohen avatar Dec 17 '23 16:12 zkhcohen

Thanks for the quick response!

I also have a CCwGTV and a library almost entirely consisting of HEVC 23.976fps media, and I can't replicate this issue. Are you controlling for all of the other potential factors?

  • What other devices do you have in the chain (TV/AVR)? Just the TV, direct connection.
  • Is refresh rate switching enabled? All is disabled. All audio output is set to stereo in CCwGTV settings. Would you mind sharing you chromecast refresh rate switching settings?
  • Can you replicate this if it's plugged into another device, after completely reinstalling Jellyfin, or even factory resetting your Chromecast? Yes, on another TV. The CCwGTV/Jellyfin setup was completely stock but I've done a lot of settings changes to optimize some performance (hopefully) as I was thinking that was the issue.
  • Does it affect the .mkv file container as well as .mp4? It seems to affect both.

KirovAir avatar Dec 17 '23 16:12 KirovAir

Thanks for the quick response!

Hardware:

CCwGTV -> Denon AVR-S970H receiver (configured as 5.1ch) -> Samsung KS8500 TV

Software:

Jellyfin Server: 10.8.13
Jellyfin for Android TV App: 0.16.0
Android TV OS Version: 12
Android TV OS Security Patch Level: October 1, 2023
Kernel Version: 4.9.296

Jellyfin Settings:

Preferred Media Player: Exoplayer
Max Streaming Bitrate: 120 Mbit/s
Refresh Rate Switching: Disabled
Audio Output: Direct
Bitstream Dolby Digital Audio: Yes
Bitstream DTS Audio: Yes

CCwGTV Settings:

HDMI-CEC: Enabled
Resolution: 4k 60Hz
Dynamic Range & Color Format: HDR / Always HDR / YCbCr 4:2:0 10-bit
Match Content Frame Rate: Seamless
Allow Game Mode: False
Video Formats: HDR10, HLG. / Disabled Formats: Dolby Vision, HDR10+.
Audio Formats: Dolby Digital, Dolby Digital Plus, Dolby Atmos with Dolby Digital Plus, DTS

Denon Settings:

ARC: Off
Video/4K/8K Signal Format: Enhanced
Video/HDCP Setup: Auto

Are the TVs from the same vendor? Since my setup is through an AVR, that could very well have to do with it. I had a bunch of issues when directly connecting to my TV.

zkhcohen avatar Dec 17 '23 19:12 zkhcohen

Sorry for the late response. The TV's are from different vendors, one is an LGC8, the other one is an ancient Sony.

I could not make it work, even with your settings and a lot of other tweaking. It seems the chipset can not handle certain 265 files, even with low bitrates. (Or maybe my device is faulty?) For now, I compiled a Jellyfin version with h265 capabilities disabled so transcoding will always be forced which works wonderfully. Since my server has quicksync capabilities I don't mind the transcoding and compatibility is 100% now which is a must for my parents where the device is placed. :p

Thanks for the help anyway and merry X-mas. :)

KirovAir avatar Dec 25 '23 08:12 KirovAir

A small update: First of all Plex has the exact same playback issues using the video files as Jellyfin has. It wants to directplay them but the playback is choppy/stuttery. The files are not 'huge' in bandwidth, I'd say way below average (2GB for a HEVC movie) and there is plenty of network speed available. Not sure what mediaplayer Plex is using under the hood but probably ExoPlayer. I've tried several other external media players and they all struggle with the problematic files. (The files play fine when directly played on my LG C8 using Jellyfin)

I've found out that another brand of TV has the same issue with Jellyfin installed directly on the TV. The exact same video files give these problems when playing using ExoPlayer. The TCL QLED 43C643.

So my best guess is that the framerate or compression rate is giving some hard times to the chips used in the TCL and CCwGTV. In all cases external subs (SRT) are loaded and displayed. In all cases there is no external receiver for the audio present so 2.0 audio is used. Could that be an issue as well when needing to downmix 5.1 or 7.1 audio for the client? The choppyness is not 100% consistent which makes me think it's a CPU decoding limitation. But it might be the framerate as well as I'm not experienced enough in video.

If I have another moment I'll try to get some more detailed results. Just putting it out here for other people that might encounter the same.

KirovAir avatar Dec 28 '23 13:12 KirovAir

My CCwGTV (Sabrina) has also framedrops/microstuttering every 2-10 seconds when directly playing 4K HEVC.

No signs of thermal throttling on the Chromecast (according to logcat temperatures reported by ThermalService). I noticed that it gets worse after opening other apps (such as youtube) and switching.

This issue happens also with the previous versions of jellyfin and androidtv client using the CCwGTV on a Samsung S95B paired with HW-Q800. I cannot reproduce it on a Sony X95J.

tsiktsiris avatar Jan 10 '24 10:01 tsiktsiris

I'm having major issues with my ccwgtv also. I don't think this has anything to do with jellyfin. More likely Google who have broken something with the last update.

best-74 avatar Feb 17 '24 18:02 best-74

Enabling Developer Options and enabling the Disable HW Overlay option fixes these issues in Jellyfin and Plex for me. I don't know why or how.

Unfortunately, this setting does not survive a reboot so you need to check that it's enabled occasionally.

AKK9 avatar Apr 03 '24 09:04 AKK9

I have done the Developer Options -> Disable HW Overlay option as I read about it elsewhere and it does not resolve the issue with my CCwGTV 4K also plugged into a Denon receiver -> LG TV.

brianjmurrell avatar Jun 01 '24 01:06 brianjmurrell