All Projects → tnfe → Ffcreator

tnfe / Ffcreator

Licence: mit
一个基于node.js的高速短视频加工库 A fast short video processing library based on node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ffcreator

FFCreatorLite
一个基于node.js的轻量极速短视频加工库 A lightweight and fast short video processing library based on node.js
Stars: ✭ 155 (-83.65%)
Mutual labels:  ffmpeg, video-processing
Pyjumpcutterv2
carykh's but with improvements and a GUI!
Stars: ✭ 25 (-97.36%)
Mutual labels:  ffmpeg, video-processing
video-summarizer
Summarizes videos into much shorter videos. Ideal for long lecture videos.
Stars: ✭ 92 (-90.3%)
Mutual labels:  ffmpeg, video-processing
Vidgear
A High-performance cross-platform Video Processing Python framework powerpacked with unique trailblazing features 🔥
Stars: ✭ 2,048 (+116.03%)
Mutual labels:  ffmpeg, video-processing
eloquent-ffmpeg
High-level API for FFmpeg's Command Line Tools
Stars: ✭ 71 (-92.51%)
Mutual labels:  ffmpeg, video-processing
Online Video Editor
API based Online Video Editing using FFMPEG & NodeJs for Backend Editing
Stars: ✭ 176 (-81.43%)
Mutual labels:  ffmpeg, video-processing
video-audio-tools
To process/edit video and audio with Python+FFmpeg. [简单实用] 基于Python+FFmpeg的视频和音频的处理/剪辑。
Stars: ✭ 164 (-82.7%)
Mutual labels:  ffmpeg, video-processing
Dokai
Collection of Docker images for ML/DL and video processing projects
Stars: ✭ 58 (-93.88%)
Mutual labels:  ffmpeg, video-processing
Trim.lua
Trim mode for mpv — Turn mpv into Lossless Audio / Video Editor.
Stars: ✭ 24 (-97.47%)
Mutual labels:  ffmpeg, video-processing
nebula
Media asset management and broadcast automation system
Stars: ✭ 103 (-89.14%)
Mutual labels:  ffmpeg, video-processing
Fwf
HTML video editor with FFmpeg
Stars: ✭ 128 (-86.5%)
Mutual labels:  ffmpeg, video-processing
Ffmpeg Libav Tutorial
FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more
Stars: ✭ 7,074 (+646.2%)
Mutual labels:  ffmpeg, video-processing
Screen Recorder Ffmpeg Cpp
*Multimedia project* A screen recording application to capture your desktop and store in a video format. Click here to watch the demo
Stars: ✭ 98 (-89.66%)
Mutual labels:  ffmpeg, video-processing
Lintel
A Python module to decode video frames directly, using the FFmpeg C API.
Stars: ✭ 240 (-74.68%)
Mutual labels:  ffmpeg, video-processing
Conv2mp4 Ps
This Powershell script will recursively search through a user-defined file path and convert all videos of user-specified file types to MP4 with H264 video and AAC audio using ffmpeg. The purpose of this script is to reduce transcoding CPU load on a media server like Plex or Emby and increase video compatibility across platforms.
Stars: ✭ 97 (-89.77%)
Mutual labels:  ffmpeg, video-processing
Super-Stitch
一款视频超级拼接软件
Stars: ✭ 28 (-97.05%)
Mutual labels:  ffmpeg, video-processing
DuME
A fast, versatile, easy-to-use and cross-platform Media Encoder based on FFmpeg
Stars: ✭ 66 (-93.04%)
Mutual labels:  ffmpeg, video-processing
Xabe.ffmpeg
.NET Standard wrapper for FFmpeg. It allows to process media without know how FFmpeg works, and can be used to pass customized arguments to FFmpeg from dotnet core application.
Stars: ✭ 411 (-56.65%)
Mutual labels:  ffmpeg, video-processing
Mlt
MLT Multimedia Framework
Stars: ✭ 836 (-11.81%)
Mutual labels:  ffmpeg, video-processing
Deep Embedded Memory Networks
https://arxiv.org/abs/1707.00836
Stars: ✭ 19 (-98%)
Mutual labels:  video-processing

English | 简体中文

NPM Version Package License Travis CI Code Style PRs Node Version

Overview

FFCreator is a lightweight and flexible short video processing library based on Node.js. You only need to add some pictures, music or video clips, you can use it to quickly create a very exciting video album.

Nowadays, short video is an increasingly popular form of media communication. Like weishi and tiktok is full of all kinds of wonderful short videos. So how to make users visually create video clips on the web easily and quickly. Or based on pictures Text content, dynamic batch generation of short videos is a technical problem.

FFCreator is a lightweight and flexible solution that requires few dependencies and low machine configuration to start working quickly. And it simulates 90% animation effects of animate.css. You can easily convert the animation effects on the web page side into videos.

When you need to process a lot of video without special cool transition animations, FFCreatorLite is a better choice, please click here for details.

For more introduction, please see here

Features

  • Based on node.js development, it is very simple to use and easy to expand and develop.
  • Very few dependencies, easy to install, cross platform, just a common configuration linux server.
  • The video processing speed is very fast, a 5 minute video only needs 1-2 minutes.
  • Nearly a hundred kinds of scene transition animation effects.
  • Support picture, sound, video clips, text and other elements.
  • Contains most animation effects of animate.css, css animation is converted to video.
  • Support subtitle components, can combine subtitles to speech to produce audio news.
  • Support simple (expandable) VTuber, you can add YouTuber based on sequence frames.
  • FFCreatorLite has faster speed, sometimes it is more suitable for you than FFCreator.

Demo

Useage

Install npm Package

npm install ffcreator --save

Note: To run the preceding commands, Node.js and npm must be installed.

Node.js

const { FFScene, FFText, FFVideo, FFAlbum, FFImage, FFCreator } = require("ffcreator");

// Create FFCreator instance
const creator = new FFCreator({
    cacheDir,
    outputDir,
    width: 800,
    height: 450
});

// Create scene
const scene = new FFScene();
scene.setBgColor("#ffcc22");
scene.setDuration(6);
scene.setTransition("GridFlip", 2);
creator.addChild(scene);

// Create Image and add animation effect
const image = new FFImage({ path: path.join(__dirname, "../assets/01.jpg") });
image.addEffect("moveInUp", 1, 1);
image.addEffect("fadeOutDown", 1, 4);
scene.addChild(image);

// Create Text
const text = new FFText({ text: "hello 你好", x: 400, y: 300 });
text.setColor("#ffffff");
text.setBackgroundColor("#000000");
text.addEffect("fadeIn", 1, 1);
scene.addChild(text);

// Create a multi-photo Album
const album = new FFAlbum({
    list: [img1, img2, img3, img4],   // Picture collection for album
    x: 250,
    y: 300,
    width: 500,
    height: 300,
});
album.setTransition('zoomIn');      // Set album switching animation
album.setDuration(2.5);             // Set the stay time of a single sheet
album.setTransTime(1.5);            // Set the duration of a single animation
scene.addChild(album);

// Create Video
const video = new FFVideo({ path, x: 300, y: 50, width: 300, height: 200 });
video.addEffect("zoomIn", 1, 0);
scene.addChild(video);

creator.output(path.join(__dirname, "../output/example.mp4"););
creator.start();        // Start processing
creator.closeLog();     // Close log (including perf)

creator.on('start', () => {
    console.log(`FFCreator start`);
});
creator.on('error', e => {
    console.log(`FFCreator error: ${JSON.stringify(e)}`);
});
creator.on('progress', e => {
    console.log(colors.yellow(`FFCreator progress: ${e.state} ${(e.percent * 100) >> 0}%`));
});
creator.on('complete', e => {
    console.log(colors.magenta(`FFCreator completed: \n USEAGE: ${e.useage} \n PATH: ${e.output} `));
});

For a more detailed tutorial, please check here

About Audio

Sound is the soul of a video. FFCreator supports multiple ways to add audio. You can not only add global background music, but also set your own voice or soundtrack for each individual scene.

  • In FFVideo - Turn on video background music (default off).
const video = new FFVideo({path, x: 100, y: 150, width: 500, height: 350});
video.setTimes('00:00:18', '00:00:33');
video.setAudio(true); // Turn on
  • Add a global background audio.
const creator = new FFCreator({
  cacheDir,
  outputDir,
  audio: path, // background audio
});

// or
creator.addAudio({path, loop, start});
  • Add your own separate music for each scene.
scene.addAudio(path);
// or
scene.addAudio({path, loop, start});

Installation

1. Install node-canvas and headless-gl dependencies

If it is a computer with a display device, such as a personal pc computer with windows, Mac OSX system, or a server server with a graphics card or display device, you can skip this step without installing this dependency.

If you are using Centos, Redhat, Fedora system, you can use yum to install.

sudo yum install gcc-c++ cairo-devel pango-devel libjpeg-turbo-devel giflib-devel

InstallXvfb and Mesa

sudo yum install mesa-dri-drivers Xvfb libXi-devel libXinerama-devel libX11-devel

If you are using Debian, ubuntu system, you can use apt to install.

sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++
sudo apt-get install libgl1-mesa-dev xvfb libxi-dev libx11-dev

2. Because FFCreator depends on FFmpeg, you need to install a regular version of FFmpeg

For a more detailed tutorial, please check here

Start Up

If it is a computer with a display device, such as a personal pc computer or a server server with a graphics card or display device, start normally npm start

Otherwise, You must use the xvfb-run script command to start the program to use webgl under the Linux server

xvfb-run more detailed command parameters http://manpages.ubuntu.com/manpages/xenial/man1/xvfb-run.1.html

xvfb-run -s "-ac -screen 0 1280x1024x24" npm start

Questions

  1. During installation warning missing package'xi'
No package 'xi'

foundgyp: Call to 'pkg-config --libs-only-l x11 xi xext' returned exit status 1 while in angle/src/angle.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp

Solution

yum install libXi-devel libXinerama-devel libX11-devel
  1. Start node app and prompt error message doesn't support WebGL....

Solution

The node app should be started as follows.

xvfb-run -s "-ac -screen 0 1280x1024x24" npm start
  1. Npm install error ERR! command sh -c node-pre-gyp install --fallback-to-build

Solution

It may be caused by your node version. If it is nodev15, there will be this problem. https://github.com/Automattic/node-canvas/issues/1645 . Please use the stable version of node.js. For example, nodev14 (even version).

Contribute

You are very welcome to join us in developing FFCreator, if you want to contribute code, please read here.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].