1.0.10 • Published 10 months ago

mp4box-ts v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

mp4-typescript

Description

defined mp4's boxes by typescript and some userful tools

Software Architecture

mp4box-ts { ...utils ...structures }

mp4box-ts/boxes { AVCC, AVC1 ...

}

Installation

npm install mp4box-ts --save

Instructions

const bytesStr = `00 00 00 21 61 76 63 43 01 64 00 1F FF E1 00 0A
27 64 00 1F AC 56 80 50 05 B9
01 00 04
28 EE 3C B0`;
const dataArray = hexStringToUnit8Array(bytesStr);
const box = AVCC.parse(dataArray);
console.log(box);
    const avccBox = new AVCC();
    avccBox.configurationVersion = 1;
    avccBox.AVCProfileIndication = 100;
    avccBox.profileCompatibility = 0;
    avccBox.AVCLevelIndication = 31;
    avccBox.lengthSizeMinusOne.setValue(3);
    avccBox.numOfSequenceParameterSets.setValue(1);
    avccBox.SPS = [AVCCParameters.parse(Buffer.from("27 64 00 1F AC 56 80 50 05 B9".replace(/\s/g, ""), "hex"))];
    avccBox.numOfPictureParameterSets = 1;
    avccBox.PPS = [AVCCParameters.parse(Buffer.from("28 EE 3C B0".replace(/\s/g, ""), "hex"))];
    console.log(Buffer.from(avccBox.getBuffer()));

Contribution

  1. Fork the repository
  2. Create Feat_xxx branch
  3. Commit your code
  4. Create Pull Request

Gitee Feature

  1. You can use Readme_XXX.md to support different languages, such as Readme_en.md, Readme_zh.md
  2. Gitee blog blog.gitee.com
  3. Explore open source project https://gitee.com/explore
  4. The most valuable open source project GVP
  5. The manual of Gitee https://gitee.com/help
  6. The most popular members https://gitee.com/gitee-stars/
1.0.10

10 months ago

1.0.9

11 months ago