Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitrate limits in client settings are ignored by ExoPlayer #564

Open
1 of 3 tasks
Elaws opened this issue Nov 14, 2021 · 13 comments
Open
1 of 3 tasks

Bitrate limits in client settings are ignored by ExoPlayer #564

Elaws opened this issue Nov 14, 2021 · 13 comments
Labels
bug Something isn't working confirmed Confirmed bug reports that shouldn't go stale exoplayer Related to the ExoPlayer integration

Comments

@Elaws
Copy link

Elaws commented Nov 14, 2021

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)
  • Integrated player (ExoPlayer)
  • External player (VLC, mpv, MX Player)
@Elaws Elaws added the bug Something isn't working label Nov 14, 2021
@Elaws Elaws changed the title DirectPlay a > 1Mbps video stream even if Internet streaming limit set to 1 Mbps. Jellyfin Android does not transcode a video stream that is superior to Internet streaming limit. Nov 14, 2021
@Elaws Elaws changed the title Jellyfin Android does not transcode a video stream that is superior to Internet streaming limit. Jellyfin does not transcode a video stream that is superior to Internet streaming limit. Nov 14, 2021
@Elaws
Copy link
Author

Elaws commented Nov 14, 2021

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.

@Maxr1998
Copy link
Member

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 Maxr1998 added the exoplayer Related to the ExoPlayer integration label Nov 15, 2021
@Maxr1998 Maxr1998 changed the title Jellyfin does not transcode a video stream that is superior to Internet streaming limit. Bitrate limits in client settings are ignored by ExoPlayer Nov 15, 2021
@naimo
Copy link

naimo commented Jan 7, 2022

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

@Maxr1998 Maxr1998 added confirmed Confirmed bug reports that shouldn't go stale and removed stale labels May 8, 2022
@galmok
Copy link

galmok commented Apr 1, 2023

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.

@Elaws
Copy link
Author

Elaws commented Apr 10, 2023

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

@extrange
Copy link

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

@jellyfin jellyfin deleted a comment from jellyfin-bot May 27, 2023
@Maxr1998
Copy link
Member

Maxr1998 commented May 27, 2023

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

@shaino
Copy link

shaino commented Jun 17, 2023

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
Copy link

shaino commented Jun 18, 2023

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

@nielsvanvelzen
Copy link
Member

Feel free to open a pull request

@J3m5
Copy link

J3m5 commented Nov 25, 2023

Are there any updates on this issue?

@Maxr1998
Copy link
Member

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

@xDaveN
Copy link

xDaveN commented Nov 13, 2024

Been a year, and I've just run into this, any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed Confirmed bug reports that shouldn't go stale exoplayer Related to the ExoPlayer integration
Projects
None yet
Development

No branches or pull requests

10 participants