Adding TFHD flag for DEFAULT_BASE_IS_MOOF needed for MSE #119
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.
Hello, I've been working on a video project, and your library has helped me immensely! Thanks for making it!
Part of my project is serving segments for use with DASH.js, which uses the browser's video tags' Media Source Extensions (MSE) to stream segments. I encode the same video multiple times at different bitrates as well.
I found that I could play complete files (init segment + 1 or more media segments) with
vlc
from the same encoded set, but I couldn't reorder media segments, or use higher or lower bitrate versions of the same media segment due to the base data offset being different for variants of the same media segment. However, I found that MSE actually requires a flag to be set that overrides the base data offset to be the start of themoof
, which is what mp4-stream sets it to anyway. (See https://w3c.github.io/mse-byte-stream-format-isobmff/ where it talks aboutdefault-base-is-moof
).I added this flag into the
bmff
library, and things started working between different encoded sets! I believe that this should be useful to anyone using thebmff
library for DASH or MSE streaming, so I made this pull request.I only changed
mp4-stream
to set this flag tofalse
, so that it doesn't change the current way that themp4-stream
library or thepet-monitor-app
binary functions.