Overview of FFCreator
masteranimate.css) and convert them into video files. It is particularly useful for automated batch video synthesis, building visualization platforms, or powering video album applications.repository·master·Indexed 25 days ago
https://github.com/tnfe/ffcreatorA lightweight and flexible Node.js library for programmatically creating short videos. FFCreator allows developers to assemble images, text, video clips, and audio into dynamic video albums using CSS-like animation effects. It includes specialized classes such as FFScene, FFImage, FFText, FFVideo, FFAlbum, FFSubtitle, and FFVtuber to manage video elements and transitions.
animate.css) and convert them into video files. It is particularly useful for automated batch video synthesis, building visualization platforms, or powering video album applications.Choose between FFCreator and FFCreatorLite based on your animation and performance requirements:
opengl and shader for fine-grained rendering and supports nearly a hundred transition effects, subtitles, and photo albums. It has more complex installation dependencies (e.g., cairo, libjpeg, g++).FFmpeg command splicing, making it 2-3 times faster than FFCreator. It supports pictures, videos, text, and background music with animate.css style animations, but lacks complex transition effects, subtitles, and photo albums. It only requires FFmpeg as a dependency.Key Technical Differences:
FFCreatorLite uses the upper-left corner (fixed); FFCreator uses the center (customizable).FFCreatorLite, FFText must be provided with a font file path; in FFCreator, it is not required.FFCreator provides the following capabilities:
animate.css animations.FFCreatorLite is available for even faster synthesis speeds.When choosing a video rendering solution, consider the following comparison between FFCreator, aerender.exe (After Effects), and MLT Framework:
FFCreator uses opengl for graphics rendering and shader post-processing for transition effects, with FFmpeg for final video synthesis. For simpler requirements with fewer dependencies and faster processing, use FFCreatorLite.
node.js; supports both template-based and dynamic, data-driven animation composition.An automated rendering solution based on Adobe After Effects templates.
aerender.exe), making it incompatible with Linux-based DevOps workflows; slow rendering speeds (3-5x slower than FFCreator); limited to fixed templates and cannot support dynamic, non-customized video assembly.An open-source multimedia framework designed for broadcast television.
FFmpeg, JACK, Movit, SOX, and libvorbis; supports template-based video generation.FFCreator; steep learning curve and complex installation/setup; heavy for small-to-medium projects.Unlike traditional methods that rely solely on FFmpeg (which is difficult to use for fine-grained animations) or After Effects (which can be heavy and complex), FFCreator uses a hybrid approach:
opengl for high-efficiency graphics and animation.shader for generating transition effects.FFmpeg to compile the final video output.When choosing a video production technology, consider the following comparison between FFCreator and other common methods:
opengl for graphics rendering and shader post-processing for transitions, with FFmpeg for final video synthesis.FFCreatorLite.aerender.exe for automated batch processing of templates.FFCreator), and limited to fixed templates.FFmpeg, JACK, Movit, SOX, and libvorbis.FFCreator, and a steeper learning curve with complex installation/build processes.Install the ffcreator package using npm or yarn to start using the library for video processing.
npm install ffcreator --save
# or
yarn add ffcreatorFFCreator 6.0 introduces the FFChart component, which supports most echarts.js demos. This allows you to create high-quality data visualization videos.
Note: To ensure stability, FFCreator uses echarts.js version v5.1.2. Because video rendering differs from web rendering, you should manually adjust margins, font sizes, and other layout options to achieve the best visual result.
Use FFCreatorCenter.createTemplate to define a reusable video animation template. This is typically done once in a service layer. The callback provides an object (e.g., containing an image path) that you use to instantiate FFCreator, FFScene, and other elements like FFImage with specific effects and animations.
// This can be implemented in a service and executed once
FFCreatorCenter.createTemplate(tempid, ({ image }) => {
const creator = new FFCreator({...});
const scene = new FFScene();
scene.setBgColor('#b33771');
creator.addChild(scene);
const fimg = new FFImage({ path: image, x: 100, y: 200 });
fimg.addEffect('fadeInLeft', 1, 1);
scene.addChild(fimg);
// Add more elements and animations...
creator.start();
return creator;
});On servers without a display device, you must start your application using xvfb-run to simulate a display environment.
xvfb-run -s "-ac -screen 0 1280x1024x24" npm startIf your server does not have a display device (no GPU/monitor attached), you must use xvfb-run to simulate a display environment for WebGL to work. Use the following command to start your application:
xvfb-run -s "-ac -screen 0 1280x1024x24" npm startYou can use FFCreator's Lottie rendering capabilities to build video album mini-programs (similar to popular apps like 'Xiao Nian Gao'). This workflow allows you to convert animated designs into high-speed server-side video synthesis.
Workflow Steps: