open-index/open-npm huggingface dataset:
npm package: @sqhead/mux.js
Description: A collection of lightweight utilities for inspecting and manipulating video container formats.
Author: Brightcove
Latest version: 4.4.1

# mux.js [![Build Status](https://travis-ci.org/videojs/mux.js.svg?branch=master)](https://travis-ci.org/videojs/mux.js) [![Greenkeeper badge](https://badges.greenkeeper.io/videojs/mux.js.svg)](https://greenkeeper.io/)


Lightweight utilities for inspecting and manipulating video container formats.

Lead Maintainer: Jon-Carlos Rivera [@imbcmdth](https://github.com/imbcmdth)

Maintenance Status: Stable

## Diagram
![mux.js diagram](/docs/diagram.png)

## MPEG2-TS to fMP4 Transmuxer
Feed in `Uint8Array`s of an MPEG-2 transport stream, get out a fragmented MP4:

```js
// create a transmuxer:
var transmuxer = new muxjs.mp4.Transmuxer(initOptions);
// data events signal a new fMP4 segment is ready:
transmuxer.on('data', function (segment) {
  // Tada! Now you have an MP4 that you could use with Media Source Extensions
  sourceBuffer.appendBuffer(segment.data.buffer);
});
```

### Metadata
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:

```js
transmuxer.on('data', function (segment) {
  // create a metadata text track cue for each ID3 frame:
  segment.metadata.frames.forEach(function(frame) {
    metadataTextTrack.addCue(new VTTCue(time, time, frame.value));
  });
  // create a VTTCue for all the parsed CEA-608 captions:
  segment.captions.forEach(function(cue) {
    captionTextTrack.addCue(new VTTCue(cue.startTime, cue.endTime, cue.text));
  });
});
```

## MP4 Inspector
Parse MP4s into javascript objects or a text representation for display or debugging:
```js
// drop in a Uint8Array of an MP4:
var parsed = muxjs.mp4.tools.inspect(bytes);
// dig into the boxes:
console.log('The major brand of the first box:', parsed[0].majorBrand);
// print out the structure of the MP4:
document.body.appendChild(document.createTextNode(muxjs.textifyMp4(parsed)));
```
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](https://github.com/videojs/mux.js/blob/master/debug/index.html) in your browser.

## Building
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
contributing.
npm package: @sqhead/tinyh264
Description: web assembly h264 decoder
Author: Erik De Rijcke
Latest version: 0.0.9

# Tiny H264

This project was forked from [h264bsd](https://github.com/oneam/h264bsd).

Available on npm as `tinyh264` and meant to be used with a builder system like webpack as [worker module](https://webpack.js.org/loaders/worker-loader/).
See `demo` folder for an example.

All non-essential operations like color conversions, querying cropping parameters or render to canvas have been removed.
All required decoding operations have been moved to C to optimize performance. 

Quick tests show an up to 50% performance improvement on chrome, and up to 20% on Firefox.

- Input is expected to be a picture of NALs (a complete access units or AU) as Uint8Array, the output result is a yuv420 buffer as Uint8Array.
- Profile must be constrained-baseline or baseline. 
- Only I and P frames are considered supported (so no B-frames).

This project was created for use in [Greenfield](https://github.com/udevbe/greenfield)

# Building
## Prerequisites
- Bash

Make sure you have sourced the emscripten environment and run `npm install && npm run build`.