Skip to content

Add support for transcoding media with new user preferences - #41

Open
amittere wants to merge 7 commits into
joeyberkovitz:masterfrom
amittere:feature/transcoding
Open

Add support for transcoding media with new user preferences#41
amittere wants to merge 7 commits into
joeyberkovitz:masterfrom
amittere:feature/transcoding

Conversation

@amittere

@amittere amittere commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Adding support for automatic transcoding of media based on the item's bitrate to reduce bandwidth usage. Should complete #2

  • Added two new user preferences that act similarly to other clients:
    • "Audio Quality": the bitrate threshold above which music will be automatically transcoded. Defaults to Maximum as that is how it worked before.
    • "Transcode Quality": The bitrate to transcode media to using the Opus codec. Default is 128 kbps.
  • MediaItem construction uses the quality preferences to automatically set the Uri of the item to either the transcode stream or raw stream URL. Both are saved into bundle extras so we fall back to the raw stream if the transcode hits an error. I know it was mentioned in Settings screen #2 not to do this but this seems to work so I'm not sure we need the extra layer yet.
  • Prefetching transcoded items breaks ongoing playback because Plex only seems to support a single transcoding session per device (this is not documented afaict). Updated prefetching logic to skip items that would be transcoded for now.

@joeyberkovitz joeyberkovitz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

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.

2 participants