v0.0.3
Creates a WebM video from a series of frames using the new WebCodecs API.
Repository
Current version released
2 years ago
Versions
createWebMFromFrames.js
Creates a WebM video from a series of frames using the new WebCodecs API.
import createWebMFromFrames from "https://deno.land/x/create_webm_from_frames@v0.0.3/mod.js";
let fileHandle = await window.showSaveFilePicker({
startIn: 'videos',
suggestedName: 'myVideo.webm',
types: [{
description: 'Video File',
accept: {'video/webm' :['.webm']},
}],
});
let fileWritableStream = await fileHandle.createWritable();
let webm = createWebMFromFrames(fileWritableStream, {width:config.codedWidth, height:config.codedHeight, bitrate:10e6});
webm.addFrame(frame1);
webm.addFrame(frame2);
await webm.save();
- Demo: https://josephrocca.github.io/createWebMFromFrames.js/demo
- All credit for this script goes to Nicholas Sherlock and jimbankoski.