Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix 2-N video tracks of concatenated Blobs of media recording not rendering playback? #132

Closed
guest271314 opened this issue Aug 22, 2017 · 1 comment

Comments

@guest271314
Copy link

This issue is a followup to #130.

After further browsing questions, answers and documentations arrived at the following, which is close to what am trying to achieve without third party software, using a server, or system calls; though does not meet requirement fully, yet.

According to FFmpeg FAQ at 3.14.3 Concatenating using the concat protocol (file level)

A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow one to concatenate video by merely concatenating the files containing them.

Using pattern at this Answer at webRTC convert webm to mp4 with ffmpeg.js we can convert video/webm to video/mp4

So you can get mp4 recording directly from chrome MediaRecorder with following hack

var options = {mimeType: 'video/webm;codecs=h264'}; 
mediaRecorder = new MediaRecorder(stream, options);
.....
//Before merging blobs change output mime 
var blob = new Blob(recordedBlobs, {type: 'video/mp4'});
// And name your file as video.mp4

Have been able to create videos using MediaRecorder and concatenate the resulting Blobs using new Blob(chunks, {type:"video/mp4"}) where chunks is an array of Blobs resulting from event.data of dataavailable event, stored at an array, where the Blobs can be arranged in any order.

The issue is that no matter the order of the Blobs passed to new Blob() only the first video recording plays, then stops at the last frame of the first video, while each of the audio parts of the concatenated Blobs render playback.

The expected result is for each video and audio render playback, not for audio to continue playback following first concatenated Blob while video following first concatenated Blob does not render playback.

How to solve this issue?

@plepisnew
Copy link

did you figure it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants