A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

Port mkvmerge to JavaScript



W3C MediaRecorder implementation at browsers output Matroska and WebM files.

What is not currently possible using existing APIs shipped with the browser

MediaRecorder specification does not provide a means to concatenate MediaStreamTracks into a single recording without using WebRTC RTCRtpSender.replaceTrack() to replace a live MediaStreamTrack in a live MediaStream.

In brief, see

Current workarounds

Proposed solution

Port mkvmerge from C++ to JavaScript including all available options.

Define the port as a method of the global object at modern browsers, for example, Window, Worker and Worklet.

mkvmerge supports reading and concatenating and Matroska and WebM files. Version 36.0.0 supports merging input Matroska or WebM files that potentially include variable width and height (pixel dimensions) into one Matroska or WebM output file (https://mkvtoolnix.download/doc/NEWS.md).

This program takes the input from several media files and joins their streams (all of them or just a selection) into a Matroska™ file; see the Matroska website.

Linux Creation/Editing

Use mkvmerge

There is an interesting guide on how to fix audio/video sync on this forum