Vanilagy / mp4-muxer

MP4 multiplexer in pure TypeScript with support for WebCodecs API, video & audio.
https://vanilagy.github.io/mp4-muxer/demo
MIT License
419 stars 32 forks source link

Add support for specification of raw rotation matrix #45

Closed Syquel closed 5 months ago

Vanilagy commented 5 months ago

Lol that's crazy. What transformations are you planning on performing? 🤔

Generally not opposed to this addition, albeit it's very niche.

Syquel commented 5 months ago

I am transcoding videos and in most cases the source container format is MP4.
Currently I have to convert the matrix of the source MP4 container to the approximate rotation angle to configure mp4-muxer correctly.

Unfortunately that's not always 0, 90, 180, 270, but might be a little bit more complex.
The VLC source code demonstrates that behavior: https://code.videolan.org/videolan/vlc/-/blob/master/modules/demux/avformat/demux.c?ref_type=heads#L136-L169

Therefore I would like to just copy the matrix from the source MP4 to the target so I don't have to worry about the specifics.

Vanilagy commented 5 months ago

It's out as v4.2.0 :) 💨 💨 💨 💨 💨 💨 💨 💨