0.0.5 • Published 2 years ago

render-video v0.0.5

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

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.

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago