Skip to main content

Video (FFmpeg)

An exporter that uses FFmpeg to turn your animation intoa finished video.

The exporter is still relatively new and may not have all the features you need.If you have an idea for how to improve it, feel free to on GitHub.

Installation

info

You do not need to install FFmpeg yourself. It will be installedautomatically together with the exporter.

New project

When scaffolding a new project , youcan select Video (FFmpeg) in the list of available exporters. This willautomatically install the required dependencies and add the necessaryconfiguration.

Existing project

If you want to install the exporter in an existing project, run the followingcommand:

                            
                              
                                npm
                                
                                install
                                 --save @motion-canvas/ffmpeg
                                

And then configure it in your vite.config.ts file:

                            
                              
                                
                                 import {defineConfig} from 'vite';
                                
import motionCanvas from '@motion-canvas/vite-plugin';
+ import ffmpeg from '@motion-canvas/ffmpeg';

export default defineConfig({
plugins: [
motionCanvas(),
+ ffmpeg(),
],
});

Configuration

After selecting the Video (FFmpeg) exporter in the Video Settings tab, thefollowing configuration options will become available:

Include audio

When enabled, the audio track will be included in the rendered video. Thisoption is only available if you've set up audio for thecurrent project.

Fast start

When enabled, the video will be rendered with the Fast Start option. It's anoptimization for videos that will be served over the web. It rearranges thevideo data in the file, allowing the video to begin playing before it hasfinished downloading.