Lightweight utilities for inspecting and manipulating video container formats.
Maintenance Status: Stable
MPEG2-TS to fMP4 Transmuxer
Uint8Arrays of an MPEG-2 transport stream, get out a fragmented MP4:
// create a transmuxer:var transmuxer = initOptions;// data events signal a new fMP4 segment is ready:transmuxer;
The transmuxer can also parse out supplementary video data like timed ID3 metadata and CEA-608 captions. You can find both attached to the data event object:
// drop in a Uint8Array of an MP4:var parsed = muxjsmp4tools;// dig into the boxes:console;// print out the structure of the MP4:documentbody;
The MP4 inspector is used extensively as a debugging tool for the transmuxer. You can see it in action by cloning the project and opening the debug page in your browser.
If you're using this project in a node-like environment, just
require() whatever you need. If you'd like to package up a
distribution to include separately, run
npm run build. See the
package.json for other handy scripts if you're thinking about
If you are a collaborator, we have a guide on how to release the project.