Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mtsee/render-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

render-video

Convert canvas animation to video in browser using WebCodecs API.

Basic usage

const mp4Blob = await renderVideo(async function(frameIndex) {
 if (frameIndex === canvasPlayer.totalFrames) return;
 await canvasPlayer.seek(frameIndex);
 return canvasPlayer.canvas;
});
download(mp4Blob);

Audio support

const mp4Blob = await renderVideo(getFrameCallback, {
 audio: "https://xxx/yyy.mp3"
});

Demos

canvas player https://ziyunfei.github.io/render-video/demo/canvas player.html

images slideshow https://ziyunfei.github.io/render-video/demo/images slideshow.html

gif to mp4 https://ziyunfei.github.io/render-video/demo/gif to mp4.html

lottie to mp4 https://ziyunfei.github.io/render-video/demo/lottie to mp4.html

screen recording https://ziyunfei.github.io/render-video/demo/screen recording.html

Browser support

Chrome 94+ only.

About

Convert canvas animation to video in browser using WebCodecs API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%

AltStyle によって変換されたページ (->オリジナル) /