ffmpeg-generator

1.2.3 • Public • Published

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.

🎬 ffmpeg-generator

CLI tool to generate high-quality FFmpeg HLS commands — fast, smart, and stream-ready ⚡

⚡ What is ffmpeg-generator?

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 🚀


✨ Features

  • 📦 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)

🧑‍💻 Installation

❗ Warning: Make sure you have ffmpeg installed and available in your PATH.

npm install -g ffmpeg-generator

🚀 Usage

usage

ffgen <input-file> <output-dir> [optional-subfolder]
ffgen input.mp4 output-folder-path

❓ FAQ

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.

🧠 Author

Built with ❤️ by @sirojbek

“If you manually write FFmpeg commands in 2025… you need this CLI and a vacation 😭”

📜 License

MIT © 2025 Feel free to remix, extend, or publish your own variant.

Contact

Linked In: sirojbekmaqsudov


Made with ☕, bugs, and ffmpeg rage by Sirojbek, Smash that ⭐ on GitHub

Devs who know, know.

Package Sidebar

Install

npm i ffmpeg-generator

Weekly Downloads

37

Version

1.2.3

License

MIT

Unpacked Size

9.91 kB

Total Files

3

Last publish

Collaborators

  • sirojdev