codereel
v1.0.3
Published
A CLI tool for codereel
Readme
CodeReel
A CLI tool for creating videos and animations using FFmpeg, inspired by FFCreator functionality.
Installation
npm install -g codereelPrerequisites
- Node.js (v12 or higher)
- FFmpeg must be installed and available in your PATH
Installing FFmpeg
macOS:
brew install ffmpegUbuntu/Debian:
sudo apt update
sudo apt install ffmpegWindows: Download from ffmpeg.org and add to PATH
Usage
codereel <command> [options]Commands
create-video
Create a video from a single image.
codereel create-video <input> <output> [options]Options:
--duration <seconds>- Video duration in seconds (default: 5)--fps <frames per second>- Frame rate (default: 30)--width <pixels>- Video width (default: 1920)--height <pixels>- Video height (default: 1080)
Example:
codereel create-video image.jpg output.mp4 --duration 10 --width 1280 --height 720animate-images
Create an animation video from a sequence of images in a folder.
codereel animate-images <folder> <output> [fps]Parameters:
folder- Path to folder containing image sequenceoutput- Output video file pathfps- Frames per second (default: 30)
Requirements:
- Images should be named sequentially (e.g., 0001.png, 0002.png, etc.)
- Supported formats: JPG, JPEG, PNG, BMP, TIFF
Example:
codereel animate-images ./frames animation.mp4 24demo
Create a demo video by combining an image with MP3 audio.
codereel demo <image> <audio> <output>Parameters:
image- Path to image fileaudio- Path to MP3 audio fileoutput- Output video file path
Features:
- Video duration matches audio length
- Image is scaled to 1920x1080
- H.264 video codec with AAC audio
Example:
codereel demo poster.jpg soundtrack.mp3 demo.mp4help
Display help information.
codereel help
# or
codereel --help
codereel -hExamples
Basic Image to Video
codereel create-video photo.jpg video.mp4Custom Duration and Resolution
codereel create-video image.png output.mp4 --duration 15 --width 1920 --height 1080 --fps 60Image Sequence Animation
# Assuming you have 0001.png, 0002.png, ... in ./frames/
codereel animate-images ./frames movie.mp4 30Audio-Visual Demo
codereel demo cover.jpg music.mp3 presentation.mp4Error Handling
The tool includes comprehensive error checking:
- Validates FFmpeg installation
- Checks file existence before processing
- Provides clear error messages for missing parameters
- Handles FFmpeg execution errors gracefully
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
ISC
