README
Welcome to bento4js π
Native NodeJS wrapper implementing the bento4 utilities.
Homepage
πDemo
β¨Install
yarn add bento4js
Usage
const { mp4decrypt } = require('bento4js');
const keys = {
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
};
const encrypted = fs.readFileSync('enc.m4s');
mp4decrypt.decrypt(encrypted, keys).then(decrypted => {
fs.writeFileSync('dec.mp4', decrypted);
});
Run tests
yarn test
Roadmap
app name | description | status | reference |
---|---|---|---|
mp4info | displays high level info about an MP4 file, including all tracks and codec details | β | mp4info.cpp |
mp4dump | displays the entire atom/box structure of an MP4 file | β | mp4dump.cpp |
mp4edit | add/insert/remove/replace atom/box items of an MP4 file | β | mp4edit.cpp |
mp4extract | extracts an atom/box from an MP4 file | β | mp4extract.cpp |
mp4encrypt | encrypts an MP4 file (multiple encryption schemes are supported) | β | mp4encrypt.cpp |
mp4decrypt | decrypts an MP4 file (multiple encryption schemes are supported) | β | Mp4Decrypt.cpp |
mp4dcfpackager | encrypts a media file into an OMA DCF file | β | mp4dcfpackager.cpp |
mp4compact | converts βstszβ tables into βstz2β² tables to create more compact MP4 files | β | mp4compact.cpp |
mp4fragment | creates a fragmented MP4 file from a non-fragmented one or re-fragments an already-fragmented file | β | mp4fragment.cpp |
mp4split | splits a fragmented MP4 file into discrete files | β | mp4split.cpp |
mp4tag | show/edit MP4 metadata (iTunes-style and others) | β | mp4tag.cpp |
mp4mux | multiplexes one or more elementary streams (H264, AAC) into an MP4 file | β | mp4mux.cpp |
mp42aac | extract a raw AAC elementary stream from an MP4 file | β | mp42aac.cpp |
mp42avc | extract a raw AVC/H.264 elementary stream from an MP4 file | β | mp42avc.cpp |
mp42hls | converts an MP4 file to an HLS (HTTP Live Streaming) presentation, including the generation of the segments and .m3u8 playlist. | β | mp42hls.cpp |
mp42ts | converts an MP4 file to an MPEG2-TS file. | β | mp42ts.cpp |
mp4-dash | creates an MPEG DASH output from one or more MP4 files, including encryption. | β | mp4-dash.cpp |
mp4-dash-clone | creates a local clone of a remote or local MPEG DASH presentation, optionally encrypting the segments as they are cloned. | β | mp4-dash-clone.cpp |
Author
π€ nunsie
- Website: https://github.com/nunsie
- Twitter: @0x6e75730a
- Github: @nunsie
Acknowledgements
@ubuntuegor: For the ubuntuegor/mp4decrypt-buffer repo that this project is based on and the pointers he has provided me with to get started.
@axiomatic-systems: For the axiomatic-systems/Bento4 fantastic Bento4 SDK.
π€ Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a βοΈ if this project helped you!
π License
Copyright Β© 2021 nunsie.
This project is GPL--2.0 licensed.