Socket
Socket
Sign inDemoInstall

mp4-box-encoding

Package Overview
Dependencies
4
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mp4-box-encoding

mp4 box parser/unparser using abstract-encoding


Version published
Maintainers
2
Install size
54.5 kB
Created

Readme

Source

abstract-encoding

mp4-box-encoding

This module provides encoders and decoders with the abstract encoding interface.

The module exports the interface for a generic box, including all headers and children (for container boxes) Encodings for many leaf (non-container) boxes, without headers, is available keyed by the box type:

var box = require('mp4-box-encoding')

var buffer = fs.readFileSync('myvideo.mp4')
// decode any box including headers
// decode the entire moov box and its children
var moov = box.decode(buffer.slice(24, 236989))

var moov.mfhd.mtime = new Date() // Change the modification time

// now this is an encoding of the modified moov box
var moofBuffer = box.encode(moov)

// decode the contents of just the stts box
var stts = box.decode(buffer.slice(609, 625))

These encodings are factored out of mp4-stream.

License

MIT

Keywords

FAQs

Last updated on 07 Aug 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc