{"id":28512390,"url":"https://github.com/ali-master/llmpeg","last_synced_at":"2025-10-28T02:35:53.923Z","repository":{"id":296861024,"uuid":"994705538","full_name":"ali-master/llmpeg","owner":"ali-master","description":"AI-powered FFmpeg command generator. Describe your video task in plain English, get the perfect FFmpeg command instantly.","archived":false,"fork":false,"pushed_at":"2025-06-02T15:16:56.000Z","size":600,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-08T23:50:10.488Z","etag":null,"topics":["ai","bun","cli","command-line-tool","ffmpeg","javascript","llm","nodejs","typescript","video-processing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ali-master.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-02T11:02:58.000Z","updated_at":"2025-07-05T13:39:57.000Z","dependencies_parsed_at":"2025-06-03T02:35:57.909Z","dependency_job_id":null,"html_url":"https://github.com/ali-master/llmpeg","commit_stats":null,"previous_names":["ali-master/llmpeg"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ali-master/llmpeg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fllmpeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fllmpeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fllmpeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fllmpeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ali-master","download_url":"https://codeload.github.com/ali-master/llmpeg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fllmpeg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281374330,"owners_count":26490013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bun","cli","command-line-tool","ffmpeg","javascript","llm","nodejs","typescript","video-processing"],"created_at":"2025-06-09T00:37:51.290Z","updated_at":"2025-10-28T02:35:53.917Z","avatar_url":"https://github.com/ali-master.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"assets/logo.svg\" alt=\"LLmpeg Logo\" width=\"240\" height=\"240\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \n  \u003ch1\u003eLLmpeg\u003c/h1\u003e\n  \n  \u003cp\u003e\n    \u003cstrong\u003e🎥 Transform natural language into FFmpeg commands using AI\u003c/strong\u003e\n  \u003c/p\u003e\n  \n  \u003cp\u003e\n    \u003ca href=\"#-features\"\u003eFeatures\u003c/a\u003e •\n    \u003ca href=\"#-installation\"\u003eInstallation\u003c/a\u003e •\n    \u003ca href=\"#-quick-start\"\u003eQuick Start\u003c/a\u003e •\n    \u003ca href=\"#-examples\"\u003eExamples\u003c/a\u003e •\n    \u003ca href=\"#-supported-ai-models\"\u003eModels\u003c/a\u003e •\n    \u003ca href=\"#-contributing\"\u003eContributing\u003c/a\u003e\n  \u003c/p\u003e\n  \n  \u003cp\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@usex/llmpeg\"\u003e\n      \u003cimg src=\"https://img.shields.io/npm/v/@usex/llmpeg?style=flat-square\u0026color=00DC82\u0026label=npm\" alt=\"npm version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/ali-master/llmpeg/blob/master/LICENSE\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/license/ali-master/llmpeg?style=flat-square\u0026color=00DC82\" alt=\"license\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/ali-master/llmpeg\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/stars/ali-master/llmpeg?style=flat-square\u0026color=00DC82\" alt=\"github stars\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n## ✨ Features\n- 🤖 **Multi-Model Support**: OpenAI, Claude, Gemini, and Grok\n- 🎯 **Natural Language**: Describe tasks in plain English\n- 📋 **Cross-Platform Clipboard**: Works on macOS, Windows, Linux\n- ⚡ **Direct Execution**: Run commands immediately\n- 🔐 **Secure Configuration**: API keys stored locally\n- 🎨 **Beautiful CLI**: Colorful and intuitive interface\n- 📚 **Command History**: Track all generated commands with smart search\n- ⭐ **Favorites System**: Save and organize frequently used commands\n- 🏷️ **Smart Tagging**: Auto-categorize commands for easy retrieval\n- 📊 **Usage Analytics**: View statistics about your command usage\n- 🎯 **Preset Templates**: 30+ built-in presets for common FFmpeg tasks\n- 🛠️ **Custom Presets**: Create your own parameterized templates\n- 📁 **Category Browser**: Organized presets by task type\n\n## 📦 Installation\n\n```bash\n# npm\nnpm install -g @usex/llmpeg\n\n# bun (recommended)\nbun install -g @usex/llmpeg\n\n# yarn\nyarn global add @usex/llmpeg\n\n# pnpm\npnpm add -g @usex/llmpeg\n```\n\n### System Requirements\n\n- **Node.js** 18.0.0 or higher\n- **FFmpeg** installed on your system ([Download FFmpeg](https://ffmpeg.org/download.html))\n- **API Key** from at least one AI provider\n\n## 🚀 Quick Start\n\n### 1️⃣ Initialize Configuration\n\n```bash\nllmpeg init\n```\n\nThis creates a configuration file at `~/.llmpeg/config.json` with placeholders for your API keys.\n\n### 2️⃣ Add Your API Key\n\n```bash\n# Choose your preferred AI provider\nllmpeg config --openai YOUR_OPENAI_KEY\nllmpeg config --claude YOUR_ANTHROPIC_KEY\nllmpeg config --gemini YOUR_GOOGLE_KEY\nllmpeg config --grok YOUR_XAI_KEY\n```\n\n### 3️⃣ Generate Your First Command\n\n```bash\nllmpeg \"convert video.mp4 to gif with 10fps\"\n```\n\n## 📖 Usage\n\n### Basic Syntax\n\n```bash\nllmpeg [options] \"\u003cyour request in natural language\u003e\"\n```\n\n### Command Options\n\n| Option | Alias | Description |\n|--------|-------|-------------|\n| `--model \u003cprovider\u003e` | `-m` | AI provider to use (`openai`, `claude`, `gemini`, `grok`) |\n| `--provider \u003cmodel\u003e` | `-p` | Specific model variant (e.g., `gpt-4`, `claude-3-opus`) |\n| `--copy` | `-c` | Copy command to clipboard |\n| `--execute` | `-e` | Execute the generated command immediately |\n| `--verbose` | `-v` | Show detailed output |\n\n### Configuration Commands\n\n```bash\n# Initialize configuration\nllmpeg init [--force]\n\n# Show current configuration\nllmpeg config --show\n\n# Set API keys\nllmpeg config --openai YOUR_KEY\nllmpeg config --claude YOUR_KEY\nllmpeg config --gemini YOUR_KEY\nllmpeg config --grok YOUR_KEY\n\n# Set preferences\nllmpeg config --default-provider claude\nllmpeg config --default-model gpt-4-turbo\nllmpeg config --auto-copy true\n```\n\n### History Commands\n\n```bash\n# Interactive history browser (default)\nllmpeg history\n\n# List recent commands\nllmpeg history --list\nllmpeg history -l\n\n# Show favorites\nllmpeg history --favorites\nllmpeg history -f\n\n# Search history\nllmpeg history --search \"convert to gif\"\nllmpeg history -s \"video compression\"\n\n# Filter by tag\nllmpeg history --tag video\nllmpeg history -t audio\n\n# View statistics\nllmpeg history --stats\n\n# Export history\nllmpeg history --export json\nllmpeg history --export csv\n\n# Clear history (with confirmation)\nllmpeg history --clear\n```\n\n### Preset Commands\n\n```bash\n# Interactive preset browser (default)\nllmpeg presets\n\n# List all presets\nllmpeg presets --list\nllmpeg presets -l\n\n# Filter by category\nllmpeg presets --category \"Video Conversion\"\nllmpeg presets -c \"Audio Processing\"\n\n# Search presets\nllmpeg presets --search \"compress\"\nllmpeg presets -s \"gif\"\n\n# Use a specific preset\nllmpeg presets --use convert-to-mp4\nllmpeg presets -u video-to-gif\n\n# Create custom preset\nllmpeg presets --create\n\n# Export all presets\nllmpeg presets --export\n```\n\n## 🎬 Examples\n\n### Video Operations\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eConvert Formats\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nllmpeg \"convert video.mov to mp4 with h264 codec\"\n# Output: ffmpeg -i video.mov -c:v libx264 -c:a aac output.mp4\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eResize Video\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nllmpeg \"resize video to 720p maintaining aspect ratio\"\n# Output: ffmpeg -i input.mp4 -vf scale=-1:720 output.mp4\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eCreate GIF\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nllmpeg \"create gif from video between 5-10 seconds\"\n# Output: ffmpeg -i input.mp4 -ss 5 -t 5 -vf \"fps=10,scale=320:-1:flags=lanczos\" output.gif\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eExtract Frames\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nllmpeg \"extract 1 frame per second as jpg images\"\n# Output: ffmpeg -i input.mp4 -vf fps=1 frame_%04d.jpg\n```\n\u003c/details\u003e\n\n### Audio Operations\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eExtract Audio\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nllmpeg \"extract audio from video as mp3 320kbps\"\n# Output: ffmpeg -i input.mp4 -vn -acodec mp3 -ab 320k output.mp3\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eChange Volume\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nllmpeg \"increase audio volume by 50%\"\n# Output: ffmpeg -i input.mp4 -af \"volume=1.5\" output.mp4\n```\n\u003c/details\u003e\n\n### Advanced Operations\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eBatch Processing\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nllmpeg \"convert all mp4 files to webm with vp9 codec\"\n# Output: for f in *.mp4; do ffmpeg -i \"$f\" -c:v libvpx-vp9 \"${f%.mp4}.webm\"; done\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eStreaming\u003c/b\u003e\u003c/summary\u003e\n\n```bash\nllmpeg \"stream video to rtmp server\"\n# Output: ffmpeg -re -i input.mp4 -c copy -f flv rtmp://server/live/stream\n```\n\u003c/details\u003e\n\n## 🤖 Supported AI Models\n\n### OpenAI\n- `gpt-4o-mini` (default) - Fast and efficient\n- `gpt-4` - Most capable\n- `gpt-4-turbo` - Latest GPT-4 with vision\n- `gpt-3.5-turbo` - Fast and cost-effective\n\n### Claude (Anthropic)\n- `claude-3-haiku-20240307` (default) - Fast and efficient\n- `claude-3-sonnet-20240229` - Balanced performance\n- `claude-3-opus-20240229` - Most capable\n\n### Google Gemini\n- `gemini-1.5-flash` (default) - Fast multimodal\n- `gemini-1.5-pro` - Advanced reasoning\n- `gemini-pro` - Balanced performance\n\n### Grok (xAI)\n- `grok-beta` (default) - Latest model\n\n## ⚙️ Configuration\n\n### Priority Order\n\n1. **CLI flags** (highest priority)\n2. **Environment variables**\n3. **Config file** (`~/.llmpeg/config.json`)\n4. **`.env` files**\n\n### Environment Variables\n\n```bash\nexport OPENAI_API_KEY=\"your-key\"\nexport ANTHROPIC_API_KEY=\"your-key\"\nexport GOOGLE_GENERATIVE_AI_API_KEY=\"your-key\"\nexport XAI_API_KEY=\"your-key\"\nexport LLMPEG_DEFAULT_PROVIDER=\"claude\"\n```\n\n### Config File Structure\n\n```json\n{\n  \"openai\": {\n    \"apiKey\": \"your-openai-key\",\n    \"defaultModel\": \"gpt-4o-mini\"\n  },\n  \"claude\": {\n    \"apiKey\": \"your-claude-key\",\n    \"defaultModel\": \"claude-3-haiku-20240307\"\n  },\n  \"gemini\": {\n    \"apiKey\": \"your-gemini-key\",\n    \"defaultModel\": \"gemini-1.5-flash\"\n  },\n  \"grok\": {\n    \"apiKey\": \"your-grok-key\",\n    \"defaultModel\": \"grok-beta\"\n  },\n  \"defaultProvider\": \"openai\",\n  \"autoCopy\": false\n}\n```\n\n## 🎯 Preset Templates\n\nLLmpeg includes 30+ professionally crafted presets for common FFmpeg tasks, organized by category. Each preset is a parameterized template that guides you through the process.\n\n### Built-in Preset Categories\n\n- **Video Conversion**: MP4, WebM, AVI, MOV conversions with optimal settings\n- **Video Compression**: Optimize for web, Discord, social media platforms\n- **GIF Creation**: Create high-quality GIFs with palette optimization\n- **Audio Processing**: Extract, convert, normalize audio tracks\n- **Video Editing**: Trim, merge, watermark, resize videos\n- **Effects \u0026 Filters**: Blur, stabilize, color correction\n- **Social Media**: Instagram, TikTok, YouTube optimized formats\n- **Streaming**: RTMP streaming setup for various platforms\n- **Advanced**: Frame extraction, thumbnail generation, batch processing\n\n### Preset Features\n\n- **Smart Parameters**: Each preset includes customizable parameters with validation\n- **Difficulty Levels**: Marked as beginner, intermediate, or advanced\n- **Common Use Marking**: Quickly find the most popular presets\n- **Examples**: See how each preset works with real examples\n- **Custom Presets**: Create and save your own templates\n\n### Using Presets\n\n1. **Browse**: Use `llmpeg presets` to explore available templates\n2. **Select**: Choose a preset that matches your task\n3. **Customize**: Fill in the required parameters (files, quality, etc.)\n4. **Execute**: Generate and run the FFmpeg command\n\nExample workflow:\n```bash\n$ llmpeg presets\n\u003e Browse by category\n\u003e Video Conversion\n\u003e Convert to MP4\n\u003e Input file: movie.avi\n\u003e Quality: 23 (Medium)\n✓ Generated command: ffmpeg -i movie.avi -c:v libx264 -crf 23 -c:a aac output.mp4\n```\n\n## 📚 Command History \u0026 Favorites\n\nLLmpeg automatically tracks all your generated commands, making it easy to reuse, organize, and learn from your past work.\n\n### Interactive History Browser\n\nThe interactive mode provides a user-friendly interface to:\n- Browse recent commands with arrow keys\n- Search through your entire history\n- Mark commands as favorites\n- Add tags and categories\n- Copy or execute commands directly\n- View detailed statistics\n\n### Smart Features\n\n- **Auto-tagging**: Commands are automatically tagged based on content (video, audio, conversion, etc.)\n- **Usage tracking**: See how often you use each command\n- **Favorites**: Star frequently used commands for quick access\n- **Categories**: Organize commands by project or purpose\n- **Export/Import**: Backup your history or share with team members\n\n### History Storage\n\n- History is stored in `~/.llmpeg/history.json`\n- Maximum 1000 commands are kept (favorites are never deleted)\n- Failed attempts are also tracked for learning purposes\n\n## 📋 Clipboard Support\n\n### macOS\nNative support via `pbcopy`\n\n### Windows\nNative support via `clip`\n\n### Linux\nInstall one of these utilities:\n\n```bash\n# X11 users\nsudo apt-get install xclip\n# or\nsudo apt-get install xsel\n\n# Wayland users\nsudo apt-get install wl-clipboard\n```\n\n## 🛠️ Development\n\n```bash\n# Clone repository\ngit clone https://github.com/ali-master/llmpeg\ncd llmpeg\n\n# Install dependencies\nbun install\n\n# Development\nbun run start:dev        # Run in dev mode\nbun run start:cli:dev    # Run CLI in dev mode\n\n# Build\nbun run build           # Build for production\nbun run test:types      # Type checking\nbun run format          # Format code\nbun run lint            # Lint code\n```\n\n## 🤝 Contributing\n\nWe love contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📈 Roadmap\n\n- [x] Command history and favorites ✅\n- [x] Preset templates for common tasks ✅\n- [ ] Interactive mode for command refinement\n- [ ] Integration with popular video platforms\n- [ ] Web interface\n- [ ] VSCode extension\n- [ ] Team collaboration features\n- [ ] AI-powered command suggestions based on history\n- [ ] Plugin system for custom extensions\n\n## 🐛 Troubleshooting\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eNo API key found\u003c/b\u003e\u003c/summary\u003e\n\n```bash\n# Check your configuration\nllmpeg config --show\n\n# Ensure at least one API key is set\nllmpeg config --openai YOUR_KEY\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eCommand execution fails\u003c/b\u003e\u003c/summary\u003e\n\n- Ensure FFmpeg is installed: `ffmpeg -version`\n- Use verbose mode: `llmpeg -v \"your command\"`\n- Check the generated command before executing\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClipboard not working\u003c/b\u003e\u003c/summary\u003e\n\n- **Linux**: Install `xclip`, `xsel`, or `wl-copy`\n- **WSL**: May need additional configuration\n- Use manual copy as fallback\n\u003c/details\u003e\n\n## 📄 License\n\nMIT © [Ali Torki](https://github.com/ali-master)\n\n## 🙏 Acknowledgments\n\n- [Vercel AI SDK](https://sdk.vercel.ai/) - AI model integration\n- [Bun](https://bun.sh/) - JavaScript runtime\n- [Commander.js](https://github.com/tj/commander.js/) - CLI framework\n- [Chalk](https://github.com/chalk/chalk) - Terminal styling\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003csub\u003eBuilt with ❤️ by \u003ca href=\"https://github.com/ali-master\" target=\"_blank\"\u003eAli Torki\u003c/a\u003e, for developers. Happy encoding! 🎬\u003c/sub\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/ali-master/llmpeg\"\u003e⭐ Star us on GitHub\u003c/a\u003e •\n    \u003ca href=\"https://linkedin.com/in/alitorki\"\u003e🐦 Follow on Linkedin\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-master%2Fllmpeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fali-master%2Fllmpeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-master%2Fllmpeg/lists"}