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

Bitrate limits in client settings are ignored by ExoPlayer

Open Elaws opened this issue 2 years ago • 12 comments

Describe the bug

  1. Set Internet streaming limit to 1 Mbs (either through Dashboard > Users, or Playback > Streaming, or through quality settings of client, or both).
  2. Jellyfin should transcode if video stream exceeds 1 Mbps.
  3. Jellyfin does not transcode, and direcplays the video. Thus, video is constantly stuttering.

Logs

No response

Application version

2.4.0

Where did you install the app from?

Google Play

Device information

Samsung Galaxy S20FE 5G

Android version

Android 11

Jellyfin server version

10.7.7

Which video player implementations does this bug apply to?

  • [ ] Web player (default)
  • [X] Integrated player (ExoPlayer)
  • [ ] External player (VLC, mpv, MX Player)

Elaws avatar Nov 14 '21 20:11 Elaws

Well, it seems the problem happens only with ExoPlayer, not with web player.

For unknown reasons, any internet speed limit or quality settings that you can set in the app is absolutely not at all taken into account when using ExoPlayer. No transcoding occurs when you set limits.

Elaws avatar Nov 14 '21 20:11 Elaws

Yes, known issue, I mentioned it the other day in #563. The tracking issue for this is also #24 (in addition to user-selectable bitrate limits), some work has already been done on #535.

Maxr1998 avatar Nov 15 '21 01:11 Maxr1998

By the way, the exoplayer (and I believe the external player option as well, with VLC for example) also ignores the server "Internet streaming bitrate limit" If that helps

naimo avatar Jan 07 '22 22:01 naimo

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.

jellyfin-bot avatar May 08 '22 03:05 jellyfin-bot

This issue is still a problem and it is exacerbated by the fact the the web player doesn't work (freeze frame unless constantly touched). As such, there exists no player on Android with bitrate limiting (transcoding) applied.

galmok avatar Apr 01 '23 21:04 galmok

I can confirm that the issue is still happening. Has there been any progress concerning this issue reported 17 months ago ?

Elaws avatar Apr 10 '23 14:04 Elaws

This is still happening with Jellyfin on Android, with both the integrated player and external player (VLC).

extrange avatar Apr 28 '23 23:04 extrange

ExoPlayer now supports manually applied bitrate limits through the quality selector. The user provided limits will be supported in the future.

Maxr1998 avatar May 27 '23 08:05 Maxr1998

Actually, it's not difficult. in app/src/main/java/org/jellyfin/mobile/player/interaction/playoptions.kt line 134,add code... for example: viewModal.changeBitrate(6000000)

But To be precise, it is necessary to obtain locally set parameters to assist.

shaino avatar Jun 17 '23 08:06 shaino

If the developer has not yet completed it, they can use it urgently: step 1 In file: app/src/main/java/org/jellyfin/mobile/player/ui/PlayerFragment.kt add code in fun onCreate(savedInstanceState: Bundle?) line 135 var currentExoBitrate:Int = 4000000 val cachPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).absolutePath val fileName = cachPath + File.separator + "jellyexoplayer.rate" val cfgFile = File(fileName) if(cfgFile.exists()){ val rateStrin = File(fileName).readText() currentExoBitrate = rateStrin.toInt() } if(currentExoBitrate > 120000000 || currentExoBitrate < 0) { currentExoBitrate = 0 } viewModel.changeBitrate(currentExoBitrate)

step 2 in file: app/src/main/java/org/jellyfin/mobile/player/playerViewModel.kt add code in fun chageBitrate(bitrate: Int?): Boolean line 444 val cachPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).absolutePath val fileName = cachPath + File.separator + "jellyexoplayer.rate" val cfgFile = File(fileName) File(fileName).writeText(bitrate.toString()) Note: Add before the following line return queueManager.changBitrate(bitrate)

Of course, both kt files need to be added to import import java.io.File import android.os.Environment

Wishing everyone a pleasant day

shaino avatar Jun 18 '23 02:06 shaino

Feel free to open a pull request

nielsvanvelzen avatar Jun 18 '23 06:06 nielsvanvelzen

Are there any updates on this issue?

J3m5 avatar Nov 25 '23 15:11 J3m5

Unfortunately not. I'm still in the middle of the player UI rewrite without much progress recently since I have been pretty busy.

Maxr1998 avatar Nov 25 '23 16:11 Maxr1998