Generate multi-resolution FFmpeg HLS commands from any .mp4 file via a smart CLI. Auto-detects streams, builds playlists, and speeds up your video pipeline.
CLI tool to generate high-quality FFmpeg HLS commands — fast, smart, and stream-ready ⚡
ffmpeg-generator
is a fast, developer-friendly CLI tool to generate and run complex FFmpeg commands for HLS transcoding. It auto-scales videos to multiple resolutions, handles audio streams, and outputs a fully functional master.m3u8
playlist — ready for streaming 🚀
- 📦 Converts
.mp4
to multi-quality.m3u8
(HLS) - 🔍 Auto-detects video resolution & audio index
- 📂 Smart directory structure with confirmation prompts
- 🧠 Built-in presets for:
- 2160p, 1440p, 1080p, 720p, 480p, 360p
- 🧪 Built-in
ffprobe
checks before processing - 💬 Interactive CLI with
inquirer
- ☁️ Perfect for streaming servers, encoding queues, media tools
- 🖼️ Optional logo watermark overlay on all resolutions (
--logo
) - 🚀 Customizable FFmpeg encoding preset speed (
--speed
) Supports:placebo
,slow
,medium
,fast
,faster
,veryfast
(default),superfast
,ultrafast
- ⏱️ Adjustable segment duration with
--hls-time
option (default:6
seconds)
❗ Warning: Make sure you have ffmpeg installed and available in your PATH.
npm install -g ffmpeg-generator
ffgen <input-file> <output-dir> [optional-subfolder]
ffgen input.mp4 output-folder-path
Q: Do I need FFmpeg installed? A: Yes, both ffmpeg and ffprobe must be in your PATH.
Q: Is it open-source? A: MIT license. Steal it. Fork it. Build on it.
Built with ❤️ by @sirojbek
“If you manually write FFmpeg commands in 2025… you need this CLI and a vacation 😭”
MIT © 2025 Feel free to remix, extend, or publish your own variant.
Linked In: sirojbekmaqsudov
Made with ☕, bugs, and ffmpeg rage by Sirojbek, Smash that ⭐ on GitHub
Devs who know, know.