membraneframework / membrane_mp4_plugin

Utilities for MP4 container parsing and serialization and elements for muxing the stream to CMAF
Apache License 2.0
9 stars 4 forks source link

Use `File.SeekEvent` in `Muxer.Isom` #36

Closed balins closed 2 years ago

balins commented 2 years ago

This PR makes Muxer.Isom use File.SeekEvent to avoid storing whole MP4 in memory until the end of stream. In comparison to the previous implementation, we send ftyp box and empty mdat header right away, then we can forward chunks as they are ready. On end of stream, we use seek event to overwrite mdat header with the proper box size.