mp4box-ts
v1.0.10
Published
defined mp4's boxes by typescript and some userful tools
Downloads
29
Maintainers
Readme
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
- Fork the repository
- Create Feat_xxx branch
- Commit your code
- Create Pull Request
Gitee Feature
- You can use Readme_XXX.md to support different languages, such as Readme_en.md, Readme_zh.md
- Gitee blog blog.gitee.com
- Explore open source project https://gitee.com/explore
- The most valuable open source project GVP
- The manual of Gitee https://gitee.com/help
- The most popular members https://gitee.com/gitee-stars/