Cutting video in JavaScript

Viewed 129

I have a video element like:

<video id="video" width="320" height="240" autoplay controls muted></video><br/>

The stream data are pushed into an array:

let blobs_recorded = [];    
media_recorder = new MediaRecorder(camera_stream, { mimeType: 'video/webm' });
media_recorder.addEventListener('dataavailable', function(e) {
blobs_recorded.push(e.data);}

All is running fine and I can record a full video without problem. Well I want to create an new video from this full recorded video and only want to get the last three seconds of this vid until end. I tried to manipulate the Blobs but video is then black. I found out if I put the the first blob to the new video then I can see this video, but I got the metadata of the full big video in the small video. Any idea how I can solve it smart?

Greetings.

0 Answers
Related