0.0.3 β€’ Published 3 years ago

bento4js v0.0.3

Weekly downloads
-
License
GPL-2.0
Repository
github
Last release
3 years ago

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 namedescriptionstatusreference
mp4infodisplays high level info about an MP4 file, including all tracks and codec details❌mp4info.cpp
mp4dumpdisplays the entire atom/box structure of an MP4 file❌mp4dump.cpp
mp4editadd/insert/remove/replace atom/box items of an MP4 file❌mp4edit.cpp
mp4extractextracts an atom/box from an MP4 file❌mp4extract.cpp
mp4encryptencrypts an MP4 file (multiple encryption schemes are supported)❌mp4encrypt.cpp
mp4decryptdecrypts an MP4 file (multiple encryption schemes are supported)βœ…Mp4Decrypt.cpp
mp4dcfpackagerencrypts a media file into an OMA DCF file❌mp4dcfpackager.cpp
mp4compactconverts β€˜stsz’ tables into β€˜stz2β€² tables to create more compact MP4 files❌mp4compact.cpp
mp4fragmentcreates a fragmented MP4 file from a non-fragmented one or re-fragments an already-fragmented file❌mp4fragment.cpp
mp4splitsplits a fragmented MP4 file into discrete files❌mp4split.cpp
mp4tagshow/edit MP4 metadata (iTunes-style and others)❌mp4tag.cpp
mp4muxmultiplexes one or more elementary streams (H264, AAC) into an MP4 file❌mp4mux.cpp
mp42aacextract a raw AAC elementary stream from an MP4 file❌mp42aac.cpp
mp42avcextract a raw AVC/H.264 elementary stream from an MP4 file❌mp42avc.cpp
mp42hlsconverts an MP4 file to an HLS (HTTP Live Streaming) presentation, including the generation of the segments and .m3u8 playlist.❌mp42hls.cpp
mp42tsconverts an MP4 file to an MPEG2-TS file.❌mp42ts.cpp
mp4-dashcreates an MPEG DASH output from one or more MP4 files, including encryption.❌mp4-dash.cpp
mp4-dash-clonecreates 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


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.