Skip to content

[Redesign] Transcoding configuration improvments#1612

Draft
Komodo5197 wants to merge 4 commits intoUnicornsOnLSD:redesignfrom
Komodo5197:redesign-transcoding-switching
Draft

[Redesign] Transcoding configuration improvments#1612
Komodo5197 wants to merge 4 commits intoUnicornsOnLSD:redesignfrom
Komodo5197:redesign-transcoding-switching

Conversation

@Komodo5197
Copy link
Copy Markdown
Collaborator

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:

  • Report actual transcoding/direct play status back to the metadataProvider.
  • Migrate old transcode settings to new config
  • Add transcode config edit screen
  • Add support for auto-transcoding unsupported formats? (Android only)
  • Maybe change setting to autotranscode any extra-high bitrate file instead of specifically flac
  • Potentially unify the download and streaming transcode settings in some way?
  • Clean up settings screen
  • Lots of testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant