AI-powered CLI that translates natural language to safe ffmpeg commands
Project description
๐ฌ aiclip
Stop Googling ffmpeg commands. Just describe what you want.
aiclip is an AI-powered CLI that translates natural language into safe, previewable ffmpeg commands. Built for developers, content creators, and anyone who works with media files but doesn't want to memorize complex syntax.
โจ Why aiclip?
- ๐ค AI-Native: Translate plain English to perfect ffmpeg commands
- ๐ Safety First: Preview every command before execution
- โก 10x Faster: Skip the documentation, Stack Overflow, and trial-and-error
- ๐ฏ Battle-Tested: Generates reliable, production-ready commands
- ๐ Smart Defaults: Sensible codec and quality settings out of the box
# Instead of this...
ffmpeg -i input.mp4 -vf "scale=1280:720" -c:v libx264 -c:a aac -b:v 2000k output.mp4
# Just say this...
aiclip "convert input.mp4 to 720p with good quality"
๐ Quick Start
Installation
# Install from PyPI
pip install ai-ffmpeg-cli
# Or with Homebrew (coming soon)
brew install aiclip
Setup
# Set your OpenAI API key
export OPENAI_API_KEY="sk-your-key-here"
# Or create a .env file
echo "OPENAI_API_KEY=sk-your-key-here" > .env
First Command
# Interactive mode - just describe what you want
aiclip
> convert this video to 720p
โโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ # โ Command โ
โโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1 โ ffmpeg -i input.mp4 -vf scale=1280:720 -c:v libx264... โ
โโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Run these commands? [Y/n]
๐ Usage Examples
Video Processing
# Convert formats
aiclip "convert input.mov to mp4 with h264 and aac"
# Resize videos
aiclip "downscale video.mp4 to 720p"
aiclip "make input.mp4 1080p resolution"
# Compress files
aiclip "compress large-video.mp4 to smaller size"
aiclip "reduce file size with CRF 23"
Audio Operations
# Extract audio
aiclip "extract audio from movie.mp4 to mp3"
aiclip "get audio track from video as wav"
# Remove audio
aiclip "remove audio from video.mp4"
Trimming & Cutting
# Time-based cutting
aiclip "trim first 30 seconds from video.mp4"
aiclip "keep segment from 2:15 to 3:45 in input.mp4"
aiclip "cut out middle 5 minutes"
Image Extraction
# Thumbnails
aiclip "create thumbnail at 10 seconds from video.mp4"
aiclip "extract frame at 2:30 as PNG"
# Frame sequences
aiclip "extract one frame every 5 seconds"
aiclip "get all frames from video as images"
Advanced Operations
# Overlays
aiclip "add watermark logo.png to top-right of video.mp4"
aiclip "overlay text on video at position 10:10"
# Batch processing
aiclip "convert all .mov files to .mp4"
๐๏ธ Command Line Options
# One-shot mode (no interaction)
aiclip "your command here"
# Skip confirmation prompts
aiclip --yes "convert video.mp4 to 720p"
# Preview only (don't execute)
aiclip --dry-run "compress input.mp4"
# Use different AI model
aiclip --model gpt-4o-mini "extract audio"
# Increase timeout for complex requests
aiclip --timeout 120 "complex processing task"
# Verbose logging for troubleshooting
aiclip --verbose "your command"
๐ง Configuration
aiclip uses environment variables and .env files for configuration:
# Required
OPENAI_API_KEY=sk-your-openai-api-key
# Optional
AICLIP_MODEL=gpt-4o # AI model to use
AICLIP_DRY_RUN=false # Preview commands by default
๐ฏ Smart Defaults & Safety
- Preview First: Every command is shown before execution
- Overwrite Protection: Warns before overwriting existing files
- Sensible Codecs: Automatically chooses h264+aac for MP4, libx265 for compression
- Stream Copy: Uses
-c copyfor trimming when possible (faster, lossless) - Context Aware: Scans your directory to suggest input files and durations
๐ Supported Operations
| Operation | Examples | ffmpeg Equivalent |
|---|---|---|
| Convert | "convert to mp4", "make it h264" | -c:v libx264 -c:a aac |
| Resize | "720p", "1920x1080", "scale to 50%" | -vf scale=1280:720 |
| Compress | "make smaller", "CRF 28" | -c:v libx265 -crf 28 |
| Extract Audio | "get audio as mp3" | -q:a 0 -map a |
| Trim | "first 30 seconds", "2:15 to 3:45" | -ss 00:02:15 -to 00:03:45 |
| Thumbnail | "frame at 10s" | -ss 00:00:10 -vframes 1 |
| Overlay | "watermark top-right" | -filter_complex overlay=W-w-10:10 |
| Batch | "all *.mov files" | Shell loops with glob patterns |
๐ ๏ธ Development
# Clone and setup
git clone https://github.com/yourusername/ai-ffmpeg-cli.git
cd ai-ffmpeg-cli
make setup
# Run tests
make test
# Check code quality
make lint
# Try demo commands
make demo
๐ Requirements
- Python 3.10+ (uses modern type hints)
- ffmpeg installed and available in PATH
- macOS:
brew install ffmpeg - Ubuntu:
sudo apt install ffmpeg - Windows: Download from ffmpeg.org
- macOS:
- OpenAI API key for natural language processing
๐ Troubleshooting
Common Issues
"OPENAI_API_KEY is required"
# Set your API key
export OPENAI_API_KEY="sk-your-key-here"
# Or add it to .env file
"ffmpeg not found in PATH"
# Install ffmpeg
brew install ffmpeg # macOS
sudo apt install ffmpeg # Ubuntu
# Windows: download from ffmpeg.org
"Failed to parse natural language prompt"
- Try being more specific in your request
- Use
--model gpt-4ofor better accuracy - Increase timeout with
--timeout 120 - Check your internet connection
"No input files found"
- Ensure files exist in current directory
- Check file extensions match your request
- Use
lsto verify available files
Getting Help
- ๐ Documentation: Full guides at [docs link]
- ๐ฌ Discord: Join our community for real-time help
- ๐ Issues: Report bugs on GitHub Issues
- ๐ก Discussions: Feature requests and Q&A on GitHub Discussions
๐ค Contributing
We love contributions! Whether it's:
- ๐ Bug reports and feature requests
- ๐ Documentation improvements
- ๐งช Test cases for edge scenarios
- ๐ป Code contributions for new features
- ๐จ Examples and tutorials
See our Contributing Guide to get started.
๐ What's Next?
- ๐ Batch Templates: Save and reuse complex workflows
- ๐๏ธ GUI Mode: Visual interface for non-CLI users
- โก Local Models: Run without internet using local AI
- ๐ข Team Features: Shared commands and analytics
- ๐ Integrations: GitHub Actions, Docker, CI/CD pipelines
๐ License
MIT License - see LICENSE file for details.
โญ Support
If aiclip saves you time, please:
- โญ Star this repository
- ๐ฆ Share on social media
- ๐ Write a review or blog post
- ๐ฌ Tell your developer friends
Made with โค๏ธ by developers who got tired of Googling ffmpeg commands
๐ฌ Turn your words into perfect video commands
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_ffmpeg_cli-0.1.0.tar.gz.
File metadata
- Download URL: ai_ffmpeg_cli-0.1.0.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a666c4edd147b0f686860be90adad57171b9010e41e01f3a5b94b7de1769dd1e
|
|
| MD5 |
33cca3a8c3e7add074778747dd8f739f
|
|
| BLAKE2b-256 |
581b52c9b461f478085bf42ad27bc19c3e11546e1a94b447c46b8d2c45446217
|
File details
Details for the file ai_ffmpeg_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_ffmpeg_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecfb82e4d2de3e598c78e419cb2bbdcdfb0991079f8645c35be5d0bb33fe3114
|
|
| MD5 |
238b0a3fd70574439e22653d6d63d832
|
|
| BLAKE2b-256 |
e45cef799b13fa9247257086df8239e44ee3609ae9866a9058ea65eb3414056b
|