jellyfin / jellyfin-androidtv

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

No transcoding of 4K media on 1080p device #2516

Closed avionics75 closed 9 months ago

avionics75 commented 1 year ago

Describe the bug

I have a Xiaomi Mi Stick HDMI dongle with the latest Jellyfin Client and Server installed. This dongle is having a maximum resolution of 1080p. Playing a 4K content through the Jellyfin AndroidTV app is throwing a player error as the app doesn't ask for a 1080p transcode ans tries to directplay the 4K content since my bandwith is fast enough. The dongle is not powerfull enough to handle 4K content. The only solution is to force a content transcoding by lowering the maximum bandwith inside the client app. Would it be possible to add an option in the Jellyfin client to force transcoding of a content based on the client device resolution ? Thanks in advance !

Logs

No response

FFmpeg logs

No response

Media info of the file

4K content (mkv)

Application version

0.15.3

Device information

Xiaomi Mi Stick

Android version

Android 8

Jellyfin server version

10.8.9

nextlooper42 commented 1 year ago

This bug also happen on Chromecast with Google TV (https://store.google.com/us/product/chromecast_google_tv . After playing file that is 4k in source it will try to play this same file on Chromecast - it should request transcode to 1080p since thats maximum supported resolution of device. Playback of 4k file will result in error toast every time.

I thought that device will report it capabilities to server and that will send compatible file to device, but that's not a case at all - but it works on Android Phone app. Can we add toggle to settings that will forced transcode for example to specific resolution?

thornbill commented 1 year ago

I was under the impression that most devices could handle downscaling on the device. Modern Fire TVs definitely do. Currently we only have an exception for older Fire TVs to explicitly request 1080p streams.

https://github.com/jellyfin/jellyfin-androidtv/blob/master/app/src/main/java/org/jellyfin/androidtv/util/DeviceUtils.kt#L41

nextlooper42 commented 1 year ago

It seems like this is not always a case unfortunately. I tried multiple local players to downscale video but it seems there is no horsepower to do that on Chromecast with Google TV HD (Kodi tried, but it was extremely choppy).

Since this could occure on another devices as well, simple toggle in settings would be nice if there is no server-app handshare.

avionics75 commented 1 year ago

It would be nice if the AndroidTV client could request a transcode from the server based on the actual resolution of display if it is not matching the video file resolution :)

V4G4X commented 1 year ago

I am having the exact same issue with my FireStick(non-4K).
I have two queries related to the issue above. Please point me in the right direction/documentation if it exists.

  1. Does transcoding only involve changing the audio/video codecs? And not downscaling the resolution?
  2. Is there any way to get playback info on the androidTV(Firestick) app?
jellyfin-bot commented 9 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.

MichaelRUSF commented 2 weeks ago

@avionics75 Can you try out the debug build and let me know if it's working? You'll need to download the artifact here, unzip, and sideload the apk on your device.

Edit: I updated the linked build to include additional model numbers.

avionics75 commented 2 weeks ago

I haven’t had the opportunity to check yet as the device is used by a person located 9000km away from me, but i'll do my best as soon as possible.

On another websites like Geekbench or on the play store list, the device is designed by code name "MiTV-AESP0", I don't know if it makes a difference ...

avionics75 commented 1 week ago

Hey, I've tested with your debug build and it seems to do the trick for most of the 4K content on my server, and the dashboard reporting that the media is transcoded because the resolution was not supported and and the codec video level was not supported either :)

Another weird issue but I don't know if this is related, the transcoding of 4K files doesn't happen at 100%. I mean that for some 4K content, the jellyfin android TV player hangs and after some time results in a player error. I can see on on the server that the dashboard (10.9.10) reports that the file is completely compatible and the viewing time is increasing while nothing is played on the client.

Edit: It seems to be related to the debug build as lowering the bitrate to 1mbts doesn't trigger the transcoding on the debug build, but lowering to 1mbts on the published build seems to be working fine