Gathering detailed insights and metrics for @hola.org/mux.js
Gathering detailed insights and metrics for @hola.org/mux.js
Gathering detailed insights and metrics for @hola.org/mux.js
Gathering detailed insights and metrics for @hola.org/mux.js
npm install @hola.org/mux.js
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
283 Commits
1 Forks
29 Watching
3 Branches
3 Contributors
Updated on 05 Jun 2018
JavaScript (99.08%)
HTML (0.73%)
CSS (0.19%)
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-81.5%
10
Compared to previous week
Last month
13.4%
110
Compared to previous month
Last year
-53.7%
893
Compared to previous year
Lightweight utilities for inspecting and manipulating video container formats.
Feed in Uint8Array
s of an MPEG-2 transport stream, get out a fragmented MP4:
1// create a transmuxer:
2var transmuxer = new muxjs.mp4.Transmuxer(initOptions);
3// data events signal a new fMP4 segment is ready:
4transmuxer.on('data', function (segment) {
5 // Tada! Now you have an MP4 that you could use with Media Source Extensions
6 sourceBuffer.appendBuffer(segment.data.buffer);
7});
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:
1transmuxer.on('data', function (segment) {
2 // create a metadata text track cue for each ID3 frame:
3 segment.metadata.frames.forEach(function(frame) {
4 metadataTextTrack.addCue(new VTTCue(time, time, frame.value));
5 });
6 // create a VTTCue for all the parsed CEA-608 captions:
7 segment.captions.forEach(function(cue) {
8 captionTextTrack.addCue(new VTTCue(cue.startTime, cue.endTime, cue.text));
9 });
10});
Parse MP4s into javascript objects or a text representation for display or debugging:
1// drop in a Uint8Array of an MP4: 2var parsed = muxjs.inspectMp4(bytes); 3// dig into the boxes: 4console.log('The major brand of the first box:', parsed[0].majorBrand); 5// print out the structure of the MP4: 6document.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 in your browser.
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.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More