Editly: Slick, Declarative Command Line Video Editing & API
Summary
Editly is a powerful Node.js and ffmpeg-based tool for declarative non-linear video editing. It allows users to programmatically create videos from clips, images, audio, and titles with smooth transitions and music. Available as both a simple CLI and a flexible JavaScript API, Editly offers a fast and extensible solution for various video creation needs.
Repository Info
Tags
Click on any tag to explore related repositories
Introduction
Editly is an open-source, Node.js and ffmpeg-based tool for declarative non-linear video editing. It provides both a command-line interface (CLI) for quick video assembly and a flexible JavaScript API for programmatic video creation. With 5,160 stars, 346 forks, and an MIT license, Editly is a popular choice for developers looking to automate video production. Written in TypeScript, it offers a slick and efficient way to create videos from various media assets.
Installation
To get started with Editly, you need Node.js (LTS recommended) and ffmpeg (and ffprobe) installed and available in your system's PATH. Once these prerequisites are met, you can install Editly globally via npm:
npm i -g editly
Examples
Editly supports both a straightforward command-line interface and a powerful JavaScript API. Here are some examples to illustrate its usage:
Command Line Interface
Create a simple randomized video edit from videos, images, and text with an audio track:
editly \
title:'My video' \
clip1.mov \
clip2.mov \
title:'My slideshow' \
img1.jpg \
img2.jpg \
title:'THE END' \
--fast \
--audio-file-path /path/to/music.mp3
You can also create an MP4 (or GIF) from a JSON or JSON5 edit specification:
editly my-spec.json5 --fast --keep-source-audio --out output.gif
JavaScript Library
For more complex or integrated workflows, Editly provides a JavaScript API:
import editly from "editly";
// See editSpec documentation
await editly(editSpec);
For a comprehensive list of examples and detailed editSpec
configurations, refer to the official examples directory.
Why Use Editly?
Editly stands out for its unique blend of flexibility and automation in video production. Key reasons to consider using Editly include:
- Edit videos with code: Programmatically control every aspect of your video.
- Declarative API with fun defaults: Simplify complex video editing tasks.
- Supports any input/output size: Handle 4K video, DSLR photos, and output to any dimensions like Instagram (1:1, 9:16) or YouTube (16:9).
- Overlay text and subtitles: Easily add textual elements to your videos.
- Custom content with Canvas/Fabric.js/GL shaders: Extend functionality with custom JavaScript or GLSL shaders.
- GIF output: Create animated GIFs directly.
- Advanced audio features: Automatic audio crossfading, ducking, and normalization.
Common use cases for Editly include:
- Creating slideshows from pictures with text overlays.
- Generating fast-paced trailers or promo videos.
- Producing tutorial videos with help text.
- Developing news stories.
- Resizing videos to specific dimensions and frame rates with automatic letterboxing/cropping.
- Creating podcasts with multiple mixed audio tracks.
Links
- Official GitHub Repository: mifi/editly
- NPM Package: editly
- Discord Community: Join Discord