jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.87k stars 489 forks source link

Chromecast HD cannot play 4k HEVC, but chooses direct-play anyways #3451

Open tlambertz opened 8 months ago

tlambertz commented 8 months ago

Describe the bug

My Chromecast HD is not capable of smoothly playing 4k HEVC, but requests direct-play anyways. Audio works smoothly, but I am getting around 5 FPS, with the audio front-running the video.

My video file is somewhat atypical: 4k HEVC, but SDR and only 2 mbps bitrate. When playing back a more 'typical' HEVC 4k file, 19mbps and HDR10, it always transcodes correctly.

AFAIK, there is no workaround for this issue available right now, except for choosing a veery low bitrate limit to force transcoding, which impacts quality too much. For this particular file, I have to lower the bitrate limit to 1 mbps, which looks quite blocky.

One possible fix would be to add the Chromecast HD to the list of devices that don't support 4k video at all: https://github.com/jellyfin/jellyfin-androidtv/blob/be826c3a47e78415a7c9db14cff39809accdbf43/app/src/main/java/org/jellyfin/androidtv/util/DeviceUtils.kt#L49-L51 That might unnecessarily force transcoding for non-hevc 4k content, though. I have NOT verified yet if the chromecast can playback non-hevc 4k content, but I assume it can since this issue hasn't surfaced earlier? I am also not sure how prevalent such content is, or how many folks rely on direct-play there. For my use-case, blacklisting 4k content from direct-play would be perfect.

I see PR https://github.com/jellyfin/jellyfin-androidtv/pull/3110 is intended to make 4k-direct-playback configurable, but having a good working default for known devices would improve user experience.

Media info of the file

~5 fps Playback for 'atypical' file:

Video
Title: 4K HEVC SDR
Codec: HEVC
Codec tag: hvc1
Profile: Main
Level: 150
Resolution: 3840x2024
Aspect ratio: 480:253
Interlaced: No
Framerate: 25
Bitrate: 2092 kbps
Bit depth: 8 bit
Video range: SDR
Video range type: SDR
Color space: bt709
Color transfer: bt709
Color primaries: bt709
Pixel format: yuv420p
Ref frames: 1

Chromecast correctly chooses to transcodes following file:

Video
Title: 4K HEVC HDR
Codec: HEVC
Profile: Main 10
Level: 150
Resolution: 3840x2160
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.976025
Bitrate: 18599 kbps
Bit depth: 10 bit
Video range: HDR
Video range type: HDR10
DV title: DV Profile 8.1 (HDR10)
DV version major: 1
DV version minor: 0
DV profile: 8
DV level: 6
DV rpu preset flag: 1
DV el preset flag: 0
DV bl preset flag: 1
DV bl signal compatibility id: 1
Color space: bt2020nc
Color transfer: smpte2084
Color primaries: bt2020
Pixel format: yuv420p10le
Ref frames: 1

Application version

0.16.6

Device information

Chromecast HD

Android version

Android 12

Jellyfin server version

10.8.13

jellyfin-bot commented 4 months ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

FluffySpike8 commented 3 months ago

I have the same issue, this explains why high bitrate does work, but low bitrate freezes.

Application version

0.16.11

Device information

Chromecast HD

Android version

Android 12

Jellyfin server version

10.9.8