Ferramenta CLI
Como instalar e usar o CLI ffhub para executar tarefas FFmpeg pelo terminal.
The FFHub CLI lets you run FFmpeg tasks directly from your terminal. Local files are automatically uploaded to the cloud for processing.
Installation
npm install -g ffhubConfiguration
Set your API key using the CLI:
ffhub config YOUR_API_KEYOr use an environment variable:
export FFHUB_API_KEY=YOUR_API_KEYUsage Examples
Transcode a video
ffhub "ffmpeg -i input.mov -c:v libx264 -preset fast output.mp4"Compress a video
ffhub "ffmpeg -i input.mp4 -c:v libx264 -crf 28 output.mp4"Extract audio
ffhub "ffmpeg -i video.mp4 -vn -c:a libmp3lame audio.mp3"When the input file is a local path, the CLI automatically uploads it before running the command. Once the task completes, the output file is downloaded to your current directory.
Commands Reference
| Command | Description |
|---|---|
ffhub [args] | Create and run an FFmpeg task |
ffhub whoami | Show current user info |
ffhub list | List recent tasks |
ffhub status <task_id> | Check task status |
ffhub config <api_key> | Save API key to config |
ffhub help | Show help message |
Links
- npm package: ffhub on npm