feat: add multi-audio track metadata support to Multiplex provider#2071
Open
nums wants to merge 7 commits intoOvenMediaLabs:masterfrom
Open
feat: add multi-audio track metadata support to Multiplex provider#2071nums wants to merge 7 commits intoOvenMediaLabs:masterfrom
nums wants to merge 7 commits intoOvenMediaLabs:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds multi-audio track metadata mapping to the Multiplex provider so multiple audio tracks sharing the same source variant name can be exposed with distinct HLS EXT-X-MEDIA attributes (e.g., language/name/characteristics).
Changes:
- Extend
MultiplexProfile::NewTrackInfowithPublicName,Language,Characteristics, andAudioIndex, and updateTrackMapto store multiple entries perSourceTrackName. - Update XML/JSON parsing + serialization to read/write the new per-track audio metadata fields.
- Update
MultiplexStreamcloning logic to apply metadata overrides per occurrence and improve log output; update docs with a multi-audio example.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/projects/providers/multiplex/multiplex_stream.cpp | Tracks per-variant occurrence and applies per-track audio metadata overrides during track cloning. |
| src/projects/providers/multiplex/multiplex_profile.h | Expands NewTrackInfo, changes TrackMap to vector per source name, and adds occurrence-aware lookup. |
| src/projects/providers/multiplex/multiplex_profile.cpp | Adds XML/JSON read/write support for new metadata + AudioIndex, and updates serialization loops for vectors. |
| docs/live-source/multiplex-channel.md | Documents configuration for multi-audio mapping using AudioIndex and audio metadata fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
@nums Recently, our internal developers have also been committing changes through PRs, and receiving a Copilot review is now required. Could you please review Copilot’s comments first? |
Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]>
Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]>
Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]>
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.
feat: add multi-audio track metadata support to Multiplex provider
Summary
Extends the Multiplex provider's
TrackMapto support per-track audio metadata (PublicName,Language,Characteristics) and anAudioIndexfield to differentiate multiple audio tracks sharing the sameSourceTrackName. This brings multi-language audio support to the Multiplex provider, on par with what the Scheduled provider already offers.What this does
PublicName,Language,CharacteristicsandAudioIndexfields toNewTrackInfoinMultiplexProfileAudioIndex(0-based) selects which occurrence receives which metadataAudioIndex, a single<Track>entry acts as a catch-all and preserves the original track metadata from the source stream.muxfiles) and JSON (REST API) formats are supportedEXT-X-MEDIAattributes (NAME,LANGUAGE,CHARACTERISTICS)Why it's needed
The Multiplex provider is commonly used to combine streams for ABR delivery. Sources such as SRT streams or broadcast feeds often carry multiple embedded audio tracks. Without this feature, only one audio track per source variant could be mapped (additional tracks sharing the same
SourceTrackNamewere silently dropped) making it impossible to expose multiple language tracks simultaneously in the LL-HLS master playlist.Files changed
providers/multiplex/multiplex_profile.h- added fields toNewTrackInfo, changed_new_track_infos_mapto support multiple entries perSourceTrackName(vector), updatedGetNewTrackInfosignature to accept an occurrence indexproviders/multiplex/multiplex_profile.cpp- XML/JSON parsing and serialization for the new fieldsproviders/multiplex/multiplex_stream.cpp- occurrence tracking per variant name, apply metadata overrides when cloning tracksdocs/live-source/multiplex-channel.md- added multi-audio example withAudioIndex,PublicNameandLanguage