recloudstream / recloudstream/cloudstream

Add audio codec and channel-count preferences to quality profiles

Open
#3,106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Kotlin
Stars
10.7k
Forks
1.1k
Avg merge
1d 23h
Merged PRs (30d)
15

Description

Describe your suggested feature
Describe your suggested feature

CloudStream quality profiles currently allow users to prioritize video resolution and video sources, but they do not allow prioritization based on audio characteristics.

I suggest adding audio preferences to quality profiles.

Possible options could include:

Preferred minimum channel count
  • Any
  • Stereo
  • 5.1
  • 7.1
Preferred audio codecs
  • E-AC-3
  • AC-3
  • DTS
  • DTS-HD
  • TrueHD
  • AAC
  • Opus
  • Other
Additional options
  • Prefer multichannel audio over stereo
  • Hide stereo sources when multichannel sources are available
  • Prefer passthrough-compatible codecs
  • Prefer sources with known audio metadata
  • Show audio codec and channel count in the source-selection list
Suggested behavior

Audio properties could be included in link priority calculation together with:

  • video resolution priority
  • source priority
  • audio channel-count priority
  • audio codec priority

For example:

  • 1080p E-AC-3 5.1 could be ranked above 1080p AAC stereo
  • 4K stereo could optionally be ranked below 1080p 5.1
  • sources with unknown audio properties could remain available but receive neutral priority
Technical limitation

I understand that some extensions may not provide audio metadata when returning an ExtractorLink.

Possible implementation approaches:

  1. Use audio metadata supplied by the extension when available.
  2. Parse audio information from HLS or DASH manifests when possible.
  3. Inspect media tracks before automatic source selection.
  4. Treat unknown audio metadata as neutral rather than rejecting the source.
  5. Allow extensions to provide optional structured fields such as:
    • codec
    • channel count
    • bitrate
    • Atmos flag
Why this would be useful

Many users connect Android TV devices to AV receivers, soundbars, or multichannel home-cinema systems.

Two sources with the same video resolution can provide very different audio:

  • AAC stereo
  • AC-3 5.1
  • E-AC-3 5.1
  • DTS
  • Dolby Atmos

At present, the user must manually test individual sources to determine which one offers multichannel audio.

Adding audio-aware profiles would make automatic source selection much more useful for home-theater users.

Other details

This feature should preferably be part of Quality Profiles rather than a single global setting, because users may want different behavior for:

  • Wi-Fi playback
  • mobile data
  • downloads
  • different devices
Acknowledgements
  • I am sure this feature concerns the CloudStream application and not a specific extension.
  • I have searched the existing issues.
  • I understand that audio metadata may not always be available before the stream is opened.
Other details

No response

Acknowledgements
  • My suggestion is NOT about adding a new provider
  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Android Quality Profiles implementation and the ExtractorLink data returned by extensions. Review how source priorities are calculated and whether HLS or DASH manifests expose audio metadata; define the supported preferences, unknown-metadata behavior, and tests needed to show that audio-aware ranking works across profiles.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
audio-video-rtc, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.