gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.94k stars 326 forks source link

mp4box side data invalid rotation #284

Closed onthegit closed 2 years ago

onthegit commented 2 years ago

Hello,

thank you for the effort you put into this project. I was trying to use mp4box with webCodecs. I was able to create an mp4 file, however when I played the file the video was being rotated due to invalid rotation.

ffprobe shows invalid number of rotation in the metadata of the mp4 file:

Side data:
      displaymatrix: rotation of nan degrees

another ffprobe :

ffprobe -v quiet -select_streams v:0 -show_streams -i test.mp4
[SIDE_DATA]
side_data_type=Display Matrix
displaymatrix=
00000000:            0           0           0
00000001:            0           0           0
00000002:            0           0           0
rotation=-9223372036854775808

Is it possible to exclude SideData when using mp4box at addTrack or addSample?

According to https://github.com/w3c/webcodecs/issues/377#issuecomment-939035094 there is no side data in EncodedVideoChunk, so it looks like mp4box inserts it.

rakshans1 commented 2 years ago

@onthegit How did you solve this?