Yahweasel / libav.js

This is a compilation of the libraries associated with handling audio and video in ffmpeg—libavformat, libavcodec, libavfilter, libavutil, libswresample, and libswscale—for emscripten, and thus the web.
288 stars 18 forks source link

Fixmonostereo #26

Closed martenrichter closed 1 year ago

martenrichter commented 1 year ago

This PR introduces additional bindings for the stereo and mono patch. As the old ffmpeg channel api will go away with api version 60 and it is currently at 58, I have added some wrappers to emulate the old behavior, so that they will not break. But I can remove them if you do not like them. The second commit adds minor code to save the codecid, if the codec parameters do not provide a codecid.

martenrichter commented 1 year ago

Ok, I screed up, here, the OpusEncoder is now broken, probably due to the changed channel_layout bindings. Encoder requires chnnel_layout to be set it says.

martenrichter commented 1 year ago

Fixed

Yahweasel commented 1 year ago

My apologies for the slow response. I've been sick for a week (and am still sick >: ( ).

THANK YOU for fixing the channel_layout/channels vs. ch_layout thing. I've had that on my "need to get to this" list for quite a while, but the new data structure made things awkward. Probably a more general way of accessing the new data structure will eventually be needed, but this is much better than the "ignore it" strategy I had before.

I'm running tests, but so far everything is good. Will probably merge later today.