Add support for OGG Vorbis radio streams#3326
Merged
MarvinSchenkel merged 9 commits intodevfrom Mar 20, 2026
Merged
Conversation
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
marcelveldt-traveling
approved these changes
Mar 19, 2026
Contributor
marcelveldt-traveling
left a comment
There was a problem hiding this comment.
Looks good, well done!
MarvinSchenkel
approved these changes
Mar 20, 2026
OzGav
added a commit
that referenced
this pull request
Mar 21, 2026
* Add support for OGG Vorbis/Opus radio streams 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add support for OGG Vorbis/Opus radio streams * Remove notes * Tidy up comments and docstrings * Extract in-band metadata from running stream and improve error handling --------- Co-authored-by: Claude <noreply@anthropic.com>
OzGav
added a commit
that referenced
this pull request
Mar 21, 2026
* Add support for OGG Vorbis/Opus radio streams 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add support for OGG Vorbis/Opus radio streams * Remove notes * Tidy up comments and docstrings * Extract in-band metadata from running stream and improve error handling --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
DEPENDS ON: music-assistant/models#175
SATISFIES: https://github.com/orgs/music-assistant/discussions/5016
This PR adds support for OGG Vorbis and Opus radio streams with in-band metadata extraction. Internet radio stations using OGG containers send "chained" streams where each track is a separate logical bitstream with its own headers. FFmpeg's OGG demuxer cannot handle these chain transitions—it treats the end-of-stream marker followed by new headers as an error and exits.
The solution, inspired by VLC's OGG demuxer, is to parse the raw OGG pages and stitch multiple logical bitstreams into a single continuous stream. The first chain's headers (OpusHead/OpusTags or Vorbis identification/comment) are forwarded to FFmpeg, while subsequent chains have their headers stripped and EOS pages skipped entirely. Page sequence numbers and granule positions are rewritten to maintain continuity.
Metadata is extracted from OpusTags or Vorbis comment headers at chain boundaries and propagated via callback, enabling track title updates during playback without interrupting the audio stream.
tested with http://stream.tilos.hu:80/tilos.opus and http://srv.tsmod.net:8008/dnb