Reputation: 1799
I'm using MediaRecorder to record animation from the canvas element. After downloading the video, the video information is empty (duration, bitrate, frame rate...)
Here is how I make the download URL
const blob = new Blob(data, { type: 'video/webm' });
const url = window.URL.createObjectURL(blob);
Is there any way to add metadata to download files?
Upvotes: 7
Views: 2093
Reputation: 84
When initializing the MediaRecorder, add a detailed mimetype, seems to do the trick in my case:
let recorder = new MediaRecorder(stream, { mimeType: "video/mp4;codecs=avc1,mp4a.40.2" });
Upvotes: 0