jellyfin / jellyfin-androidtv

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

'Auto' setting for max streaming bitrate not working as expected #2601

Closed SteveDinn closed 3 months ago

SteveDinn commented 1 year ago

Describe the bug

I had the max streaming bitrate setting in its default value of auto when I tried to play a 4K movie on my CCwGTV. When it played, I found it was being transcoded when it was capable of direct playing. In trying to figure out why this might have been, I switched the auto setting to the maximum numerical value of 120 Mbit/s, and it didn't try to transcode anymore, and successfully direct played.

My CCwGTV is connected via Gigabit Ethernet so none of my files should be getting transcoded because of a bandwidth limitation.

Since switching the max streaming bitrate to 120 Mbit/s resulted in the file direct playing, I have to assume something is wonky with the Auto setting, or perhaps the detection of available bandwidth.

Key log information: PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit

Logs

With Max streaming bitrate set to Auto:

[2023-03-18 01:36:24.685 -03:00] [INF] [45] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV-libVLC", Path="/media/Movies/Sci Fi & Fantasy/Lord of the Rings/The Return of the King/The Return of the King - Extended Edition 2160p.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit ) "media:/videos/b2c50f9b-7844-a7f2-7820-aef7f9bc5f07/stream.mkv?MediaSourceId=b2c50f9b7844a7f27820aef7f9bc5f07&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=6522423&AudioBitrate=1536000&MaxFramerate=23.976025&api_key=<token>&SubtitleMethod=Encode&CopyTimestamps=true&RequireAvc=false&Tag=d7cfb819e098d34fe79d27da72b86a5b&hevc-level=153&hevc-profile=main10&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=8&TranscodeReasons=ContainerBitrateExceedsLimit"

With Max streaming bitrate set to 120 Mbit/s:

[2023-03-18 01:55:49.064 -03:00] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV-ExoPlayer", Path="/media/Movies/Sci Fi & Fantasy/Lord of the Rings/The Return of the King/The Return of the King - Extended Edition 1080p.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/b2c50f9b-7844-a7f2-7820-aef7f9bc5f07/stream.mkv?MediaSourceId=b4426bf54e410eccb435797beaf25aec&Static=true&VideoCodec=hevc&AudioCodec=eac3&AudioStreamIndex=0&api_key=<token>&SubtitleMethod=Encode&Tag=764e66a5e37317a92af28f55138c00a4"

Application version

0.15.5

Where did you install the app from?

Google Play

Device information

CCwGTV

Android version

12

Jellyfin server version

10.8.9

branches78 commented 1 year ago

Yeah, Auto Bitrate is not working very well but 120MB/s does work correctly, you can find more info here: https://github.com/jellyfin/jellyfin-androidtv/issues/1753

jellyfin-bot commented 1 year 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.

branches78 commented 1 year ago

This issue hasn't been fixed, not even on the latest betas.

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.

branches78 commented 9 months ago

Still waiting for a fix...

fice-t commented 8 months ago

Would it make sense to treat same-network connections differently, as in the web client?

nielsvanvelzen commented 8 months ago

No, LAN detection is not reliable. Especially when the Jellyfin is containerized or a reverse proxy is used. At this moment we do not recommend using the "auto" bitrate and is is disabled by default.

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.

Iiviin commented 4 months ago

Just encountered this on Amazon fire stick 4K.

Ulrar commented 3 months ago

Same here

nielsvanvelzen commented 3 months ago

This issue is fixed in #3372 for 0.17.