Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata (Vorbis comments) in chained Ogg streams #1756

Open
ziplantil opened this issue Sep 25, 2024 · 0 comments
Open

Metadata (Vorbis comments) in chained Ogg streams #1756

ziplantil opened this issue Sep 25, 2024 · 0 comments

Comments

@ziplantil
Copy link

ziplantil commented Sep 25, 2024

The Ogg container allows "chaining", i.e. concatenating multiple Ogg bitstreams together into a new stream. I cannot find a way to get metadata (Vorbis comment) updates from chained Ogg streams, however. If I try to play a chained Ogg file, any metadata updates (through onMetadata, onMediaMetadataChanged and onTracksChanged) are only provided for the first bitstream.

I have my own test file that I have attached in this issue (within a .zip as GitHub does not directly allowing attaching an .ogg file; the file is effectively in the public domain), but it's easy to create these manually too by simply concatenating two Ogg files (of the same codec) together.

pingpong.ogg.zip

The main use case of supporting metadata in chained streams properly (by emitting events every time a new Vorbis comment header is found in the container, at the very least when the stream serial number changes) are online streams that use Ogg containers without an external channel for publishing metadata.

For the record, how some other media players and tools behave:

  • ffprobe n7.0.2 (libavformat 61.1.100) only lists the metadata for the first stream. ffplay only displays the metadata for the first stream.
  • VLC 3.0.21 updates the metadata (although a bit ahead of time), but the first second or two of the second stream is silent
  • Both DeaDBeeF (development build from 2023 or so) and foobar2000 v2.1.6 add the streams separately when a local file is played, but when played from an online stream, the media plays and metadata is updated correctly
  • mpv v0.39.0 only plays the first stream when playing from a local file, but plays and prints metadata correctly when playing from an online stream

I have been testing with media3 and ExoPlayer version 1.4.1.

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

No branches or pull requests

2 participants