It uses FFmpeg, which is open-source, and there are many libraries available. I recently implemented it in JavaScript & flutter, both had library/package, implementation was simple.