CLI Tool

How to install and use the ffhub CLI to run FFmpeg tasks from your 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 ffhub

Configuration

Set your API key using the CLI:

ffhub config YOUR_API_KEY

Or use an environment variable:

export FFHUB_API_KEY=YOUR_API_KEY

Usage 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

CommandDescription
ffhub [args]Create and run an FFmpeg task
ffhub whoamiShow current user info
ffhub listList recent tasks
ffhub status <task_id>Check task status
ffhub config <api_key>Save API key to config
ffhub helpShow help message