# mp4-box-encoding

> mp4 box parser/unparser using abstract-encoding

Latest version **1.4.1** (published 2019-08-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install mp4-box-encoding
pnpm add mp4-box-encoding
yarn add mp4-box-encoding
bun add mp4-box-encoding
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2019-08-07 |
| First published | 2016-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 36.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 49 |
| Author | John Hiesey |
| Maintainers | jhiesey, mafintosh |
| Keywords | mp4, box, parse, unparse |

## Links

- npm: https://www.npmjs.com/package/mp4-box-encoding
- Repository: https://github.com/jhiesey/mp4-box-encoding
- Homepage: https://github.com/jhiesey/mp4-box-encoding#readme
- Issues: https://github.com/jhiesey/mp4-box-encoding/issues
- npm.io page: https://npm.io/package/mp4-box-encoding

## Dependencies (1)

- [uint64be](https://npm.io/package/uint64be.md) ^2.0.2

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.4.1 (latest) — 2019-08-07
- 1.4.0 — 2019-08-06
- 1.3.0 — 2018-07-28
- 1.2.0 — 2018-07-17
- 1.1.4 — 2018-04-20
- 1.1.3 — 2018-03-23
- 1.1.2 — 2016-04-04
- 1.1.1 — 2016-02-01
- 1.1.0 — 2016-01-31
- 1.0.0 — 2016-01-31

## README

[![abstract-encoding](https://img.shields.io/badge/abstract--encoding-compliant-brightgreen.svg?style=flat)](https://github.com/mafintosh/abstract-encoding)

# mp4-box-encoding

This module provides encoders and decoders with the
[abstract encoding](https://github.com/mafintosh/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:

``` js
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](https://github.com/mafintosh/mp4-stream).

## License

MIT

---
_Source: https://npm.io/package/mp4-box-encoding · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
