comparison
weepy opened this issue · 5 comments
can you explain why this is better or different from "recordrtc" https://github.com/muaz-khan/RecordRTC ?
Never heard of that library, but it seems to be a library for recording MediaStreams. You don't need to go to a library for that, you can simply use MediaRecorder. webm-muxer
is a bit lower level, as you're not limited to recording real-time streams but can procedurally create a video offline (offline = not real time). webm-muxer
also makes use of the (low-level) WebCodecs API, which MediaRecorder
and the library you linked do not.
I originally built this library for a replay rendering system in my web game, exactly because MediaRecorder
or any type of real-time stream recording thing did not suffice and was not what I needed. The replay renderer works offline, meaning it can render the replay at any resolution or framerate desireable, and it takes as long as it needs to for that. You can render at 8K 240FPS and you'll get a perfectly smooth video out.
If all you want to do is record some real-time media, like a microphone or a screen, MediaRecorder
should suffice for that - no need to use any library for that.
Does this answer your question somewhat?
That usecase is exactly what this library was made for. By decoupling your rendering process from any real-time limitations, you can ensure your videos are 100% smooth and have no skipped frames. For my web game, I refactored the audio engine to be able to use OfflineAudioContext as well, which then allows me to render the audio offline as well (and MUCH faster than real time). Combine canvas with that, and you can render smooth videos.
Good luck!