-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
Add Quality Selection and Audio Output Controls to Playback Overlay #1406
Conversation
please rebase this branch (onto a base up to date with upstream main) so it has the fix for the debug build provider name conflicting with the release version's name. |
4073a3c
to
31331ac
Compare
Done. Let me know if there are any other issues. |
...main/java/org/jellyfin/androidtv/ui/playback/overlay/CustomPlaybackTransportControlGlue.java
Outdated
Show resolved
Hide resolved
Having some issues with ExoPlayer. I'll perform further tests with LibVLC.
|
app/src/main/java/org/jellyfin/androidtv/ui/playback/PlaybackController.java
Show resolved
Hide resolved
I think what's going on here is related to calling You could try mimicking the behavior of jellyfin-androidtv/app/src/main/java/org/jellyfin/androidtv/ui/playback/PlaybackController.java Line 872 in 33099ab
|
If the above approach doesn't work you could also try using tbh there's a lot of weirdness around restarting or switching transcoded streams, and I don't fully understand it. jellyfin-androidtv/app/src/main/java/org/jellyfin/androidtv/ui/playback/PlaybackController.java Line 1128 in 33099ab
|
Before I attempt to resolve the issues you pointed out in your (very helpful and detailed) comments, do you think it would be wise to wait for #1432 to be merged? I ran a diff and didn't see any conflicts, but I'm curious if some of the track selection functionality you're developing might assist in the resolution of the issues in my PR, as you did with #1430 |
You could try checking out #1432 and locally merge your branch (this PR) into it, and see if anything improves or breaks more. It's hard to say if it will though from my end since for some reason I didn't see the issues you're having with this PR. But only did some basic testing. |
I fully agree with this, but with my work schedule at the moment I'm not sure when I'll have the time to figure out the GUI framework well enough to implement the menu. I'm going to try to focus on fixing the remaining issues with the functionality in this PR over the weekend, then I can try to work on nesting them under a menu. |
33099ab
to
5bfcd0b
Compare
5bfcd0b
to
83e7239
Compare
I rebased the current changes on the latest commit in master, then performed further tests. I also resolved all of the server-specific errors I was having, so I would expect other people to be able to replicate most if not all of this behavior. I plan on re-testing just using the latest master commit, and not with my changes. When I have some time this weekend, I'll try to implement some of the suggestions in this thread. ExoPlayer:
LibVLC:
Other issues:
|
What device are you testing this on? For downmix to stereo, my sound system is stereo so I can't be sure about whether surround sound is on or not. But I don't notice any issues or anything weird in the log. |
Hmmm.. CCwGTV as well. I'm going to stand up a different Jellyfin server and test again. I'm passing the audio through an AVR so I've been able to validate when it is and isn't 5.1. |
My server is 10.8-alpha5 (official jellyfin docker image) if that helps. If for some reason you're experiencing these issues due to being on 10.7.7 that's still a problem since we don't want to have compatibility broken. |
Yep... that seems to be the case. Upgrading from 10.7.7 to 10.8-alpha5 immediately resolved all of the weird transcoding issues. The only remaining issues are related to refreshing the audio stream appropriately so that you're able to switch back to Direct Play. Since I had similar issues with the v0.13.0 beta without the content of this PR, I think we might want to do more testing against 10.7.7. It might be helpful to note that I'm using the lscr.io (Linuxserver) container image, and since they don't tag the alpha releases, I moved to their Nightly branch (which is currently building 10.8.0). Since my changes are changing the same user setting in the backend, my guess is that downmixing is largely broken for CCwGTV and ExoPlayer with this release. I'll work on resolving the audio output switching issue... |
Testing based using nightly server builds may produce behavior that's the server's fault and wouldn't be present otherwise. If you ever want to migrate from the linuxserver image -> official (for 10.8-alpha builds) you can map the linuxserver /config layout to the official image using env variables:
|
Sorry, to clarify, I was running their stable build of 10.7.7 when I encountered the issues. I only moved to the nightly build to test 10.8.0. It might be worth testing the official 10.7.7 image to see if the same transcoding issues persist.
The only thing preventing me from moving to the official image is the user mapping. I haven't managed to find a way to get the official container to bind to the appropriate UID/GID. No matter which combination of mapping ("User: UID:GID", "UID=XX, GID=XX" "PUID=XX, PGID=XX", "GUID=XX") I've tried in my compose file, it still ends up creating the config files as root. I haven't invested the time to find a workaround for this. The linuxserver image works OOTB when using PUID and PGID as env vars. |
You can adapt this technique to modify the official docker image with your UID/GID: cat Dockerfile
FROM jellyfin/jellyfin
ARG UID=1000
ARG GID=1000
ARG UNAME=user
RUN groupadd -g $GID -o $UNAME
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
USER $UNAME
This should run everything in the image with the specific UID and GID, but there might be some stuff you need to also |
Thank you for the feedback! Unfortunately I'm trying to avoid managing the dockerfile myself (enough of that at my day job). I appreciate that Linuxserver has made rootless builds and user bindings paradigmatic; I might make the suggestion to the maintainers of the official image. EDIT: From their Focal base image: https://github.com/linuxserver/docker-baseimage-ubuntu/blob/bionic/Dockerfile
|
Unfortunately neither of these solutions have worked for me. Furthermore, it doesn't appear that transcoding is necessarily the issue, as I had expected, because I'm still unable to switch back to Direct Play audio (5.1) when LibVLC is not transcoding. In other words, I have a movie where both Direct Play and Downmixing don't result in transcoding with LibVLC, but I still can't switch back to Direct Play. This issue also applies to ExoPlayer, so I need to figure out what the difference between starting a brand new stream, and stopping/refreshing/starting a pre-existing stream is. The PlaybackController class is quite difficult to follow... |
you could try giving jellyfin-androidtv/app/src/main/java/org/jellyfin/androidtv/ui/playback/PlaybackController.java Line 493 in bbd5a7b
|
@mueslimak3r @zkhcohen what's the state of this PR? |
When I tested it a while ago it worked fine. If a solution for the audio issue isn't practical, the quality selection part might be ready as-is or with minor changes. |
Sorry about the delay. Things really picked up at work and I haven't had a chance to work on this at all.
Correct. If you're using Jellyfin Server 10.8.0 then the only remaining issue with this PR is the ability to switch back to direct play. I have confirmed this behavior on my AVR and in the logs.
Agreed. I think we should release the quality selection feature now and delay the audio output selection feature for when the playback rewrite makes it more practical to address the direct play issue. |
When will these functionalities be merged to main commits? Want quality control badly! Thanks for adding this feature. Great job! @zkhcohen |
As stated above, there are still some issues with this PR that need to be resolved before we can merge it. It also needs to be rebased to solve the merge conflicts. |
Jellyfin 10.8.0 finally released, so I think it's safe to begin investigating these issues again: https://jellyfin.org/posts/jellyfin-10-8-0/ |
Changes
This PR builds off of #1302 using my very limited understanding of Kotlin, implementing
VideoQualityController
/SelectQualityAction
andAudioOutputController
/SelectAudioOutputAction
.As a result of this change, it was necessary to implement the function
PlaybackController.refreshSteam()
in order to restart the stream when the setting is changed, applying the new setting.During this change, it was also noted that the Mbit/s to Kbit/s conversion factor was incorrect (x100), and an unusual quality increment had been added to the settings menu (21 Mbit/s). These have been fixed.
Issues
May satisfy these vague enhancements:
Testing