Async mp4
An mp4 muxer demuxer for mp4, made to work in WASM and async contexts.
State
- Standard for Fragmented mp4
- Easy to use api
- Performant async reader (too many async calls currently)
Why not mp4-rust ?
- Their code does not implement all the necessary features for fragmented mp4 streams
- Their reader is not async
- We set flags automatically according to data
- We use a very clean macro for box definition for easy implementation:
full_box!
Usage
let ftyp = FtypBox ;
let moov: MoovBox = Moov .into;
let mut buf = new;
ftyp.write?;
moov.write?;
return buf.into_inner;
Todo
- Make async reader read full box chunks once the size is known and decode using a synchronous reader (so we don't allocate for every byte)
- Make the box macro generate a View structure of the box so that existing data can be read without decoding everything and preserving the original structure
- Make an easy-to-use builder to generate files from a stream of codec wrapping boxes and headers