[Redesign] Transcoding configuration improvments#1612
Draft
Komodo5197 wants to merge 4 commits intoUnicornsOnLSD:redesignfrom
Draft
[Redesign] Transcoding configuration improvments#1612Komodo5197 wants to merge 4 commits intoUnicornsOnLSD:redesignfrom
Komodo5197 wants to merge 4 commits intoUnicornsOnLSD:redesignfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an experimental attempt to redo the transcode configuration. It allows multiple transcoding configs to be set up for different scenarios. The currently enabled scenarios are the global config, a toggalable override that disables the autoswitch and could also be added to the player track menu if desired, when on cellular data, and when using the remote url. These scenarios select from a customizable set of transcoding configs with a few presets. If multiple configs apply to a situation, the lowest bitrate one is selected. I'm not sure if this whole customizable config thing is overbuilt, but I think android could have up to 6 different transcode scenarios, so it doesn't seem to crazy.
I have additionally put together some modifications to just_audio to add just-in-time resolvers so that we can choose the actual transcoding config only when buffering begins. This is android-only, although I should be able to also add it to windows/linux if it works out. Android additionally may be able to hot-swap local and remote urls mid song, but I haven't been able to test this, so it might just break playback. Just-in-time url resolution allows android to additionally support autotranscoding FLAC/very high bitrate files, and potentially auto-transcode of incompatible files if we can find a way to get or predict the supported codecs. This is awkward to do on other platforms because the codec info seems to only availible in the mediaStreams, and I don't want to slow down playback start even more with these large additions to the requests, so we don't know the codec until the metadata provider loads it just before playback starts. just_audio changes can be found here.
To support these changes, I've fully refactored network manager service. This PR also includes some of the fixes from #1603 due to how I ended up splitting the branches. In terms of testing, I've done a number of basic spot tests but I don't really have the setup to see how this behaves in the field, so any outside testing would be appreciated, especially of switching between remote and local urls across both direct and transcoded playback.
TODOs: