MediaStreamRecorder
MediaStreamRecorder copied to clipboard
How to concat files blob??
hi @muaz-khan !
On demo : https://www.webrtc-experiment.com/msr/video-recorder.html When i click button "Save" then it only save first record. So how i want save all file or concat files blob. thanks
@NguyenTungs Use ffmpeg to concatenate the video files afterwards, it's impossible to do so in the browser.
You can set longest interval:
recorder.start( 60 * 60 * 10000);
btnStopRecording.onclick = function() {
mediaRecorder.ondataavailable = function (blob) {
console.log('single huge blob', blob.size);
};
recorder.stop();
};
Or use new Blob([array])
:
var arrayOfBlobs = [blob1, blob2, blob3, blob4];
var singleBlob = new Blob(arrayOfBlobs , { type: 'video/webm'} );
var singleFile = new File(arrayOfBlobs , 'filename.webm', { type: 'video/webm'} );
Or: https://github.com/muaz-khan/ConcatenateBlobs
@msmuenchen , @muaz-khan Thanks for share your solutions 👍