defined mp4's boxes by typescript and some userful tools
const bytesStr = 00 00 00 21 61 76 63 43 01 64 00 1F FF E1 00 0A
;
const dataArray = hexStringToUnit8Array(bytesStr);
const box = AVCC.parse(dataArray);
console.log(box);
`
mp4box 转 Unit8Array
`
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()));
``