Closed numberwolf closed 3 years ago
I don't know how you construct the naluVPS
in your play.js
file, but when I load it in http://localhost:9000/test/filereader.html the data looks correct:
I think in your code you forget that the VPS array is an array that starts with a number of NAL:
for (j=0; j < numOfArrays; j++) {
unsigned int(1) array_completeness;
bit(1) reserved = 0;
unsigned int(6) NAL_unit_type;
unsigned int(16) numNalus;
for (i=0; i< numNalus; i++) {
unsigned int(16) nalUnitLength;
bit(8*nalUnitLength) nalUnit;
}
}
That's why your buffers all start with 0,0,0,1
This is vps by stream analyzer(software)
This is vps by mp4box.js
Can not decode and play
File [
https://user-images.githubusercontent.com/11828206/102516009-5db9e480-40c9-11eb-937e-84468156b90b.mp4
](url)