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

Support EBML Stream / Matroska Livestreaming #1

Open
1 of 2 tasks
nerg4l opened this issue Feb 3, 2021 · 1 comment
Open
1 of 2 tasks

Support EBML Stream / Matroska Livestreaming #1

nerg4l opened this issue Feb 3, 2021 · 1 comment

Comments

@nerg4l
Copy link
Member

nerg4l commented Feb 3, 2021

To make this work the library has to handle elements with Unknown Data Size and multiple Documents (or continuous Header and Segment elements).

  • Support for Unknown Data Size
  • Support for reading more than one EBML Document

EBML Stream

An EBML Stream is a file that consists of one or more EBML Documents that are concatenated together. An occurrence of an EBML Header at the Root Level marks the beginning of an EBML Document.

Source: https://www.rfc-editor.org/rfc/rfc8794#name-ebml-stream

Matroska Livestreaming

Livestreaming

[...]

A live Matroska stream is different from a file because it usually has no known end (only ending when the client disconnects). For this, all bits of the “size” portion of the Segment Element MUST be set to 1. Another option is to concatenate Segment Elements with known sizes, one after the other. This solution allows a change of codec/resolution between each segment. For example, this allows for a switch between 4:3 and 16:9 in a television program.

[...]

Source: https://www.matroska.org/technical/streaming.html

@nerg4l nerg4l changed the title Support EBML Stream / Matroska Livestreaming ebml: Support EBML Stream / Matroska Livestreaming Sep 3, 2021
@nerg4l nerg4l changed the title ebml: Support EBML Stream / Matroska Livestreaming Support EBML Stream / Matroska Livestreaming Mar 27, 2023
@nerg4l
Copy link
Member Author

nerg4l commented Mar 27, 2023

To better support streaming the plan is to replace io.ReadSeeker with io.ReaderAt and use stack instead of recursion. This could simplify the detection of the end of Unknown Data Size elements.

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

No branches or pull requests

1 participant