cfmpeg documentation

Run ffmpeg jobs remotely from your existing commands.

cfmpeg accepts ffmpeg-style commands, uploads local files or remote URLs, runs the encode on remote CPU and memory, streams progress, and returns the output.

$ cfmpeg runRemote job
cfmpeg --cf-cpu 16 --cf-memory 32g -i input.mov \
  -c:v libx264 -c:a aac output.mp4

Uploading input.mov      [====================] 100%
Encoding                 [==================--]  91%  speed=16 segment workers
Downloading output.mp4   [====================] 100%
ok complete.

01 / Quick start

Install, authenticate, and submit a job.

The shortest path from zero to a remote transcode is install, authenticate, and run the same ffmpeg-style command you already use.

Install

Install the CLI

Add cfmpeg to your local machine or CI runner.

Authenticate

Sign in once

Store an API key locally, or provide one through CI.

Run

Submit the encode

Use the ffmpeg-style command and let cfmpeg handle execution.

Quick start
curl -fsSL https://cfmpeg.com/install | sh

cfmpeg auth login

cfmpeg -i input.mov -c:v libx265 -crf 28 output.mp4

02 / Installation

Install cfmpeg as a single CLI.

Official installs include the pieces needed for streaming small jobs, segmenting large local files, and submitting remote URL inputs.

macOS and Linux (install script)
curl -fsSL https://cfmpeg.com/install | sh
Homebrew
brew install cfmpeg/tap/cfmpeg
Prebuilt binaries
# macOS and Linux, arm64 and x86_64, with checksums
https://github.com/cfmpeg/cfmpeg-cli/releases/latest
Cargo
cargo install cfmpeg

03 / Authentication

Authenticate locally or provide an API key in CI.

The CLI stores an API key in the standard cfmpeg config file for local use. In automation, provide the key through the environment.

Interactive login
cfmpeg auth login
cfmpeg auth status
cfmpeg auth logout
Environment variable
export CFMPEG_API_KEY=cfm_xxxxxxxxxxxx
config.toml
api_key = "cfm_xxxxxxxxxxxx"
local_fallback = true

04 / Usage

Use ffmpeg-style commands and let cfmpeg choose the transfer path.

Local files, large files, and remote URLs can use the same command shape. cfmpeg handles upload strategy, remote execution, progress, and output return.

Transcode to H.265
cfmpeg -i input.mov -c:v libx265 -crf 28 output.mp4
Extract audio
cfmpeg -i video.mp4 -vn -c:a libmp3lame audio.mp3
Several outputs
cfmpeg -i input.mov -c:v libx264 -crf 23 web.mp4 \
  -vn -c:a aac audio.m4a
Remote URL input
cfmpeg -i https://example.com/raw.mov -c:v libx264 output.mp4

05 / API

Create jobs, stream progress, and fetch outputs.

The CLI and website share the same HTTP API. Direct integrations create a job, upload any required input, stream status, and fetch outputs from these endpoints.

Job lifecycle

Create the job, attach input, start execution, and poll or stream status.

Output delivery

Fetch final outputs or consume completed batches while large jobs are still finishing.

GET/v1/health

API health check

POST/v1/jobs

Create an encoding job

POST/v1/jobs/{id}/start

Signal upload completion

GET/v1/jobs/{id}

Poll job status

GET/v1/jobs/{id}/stream

Receive SSE progress

POST/v1/jobs/{id}/ingest/segments/upload-targets

Get upload URLs for large local-file segments

POST/v1/jobs/{id}/ingest/complete

Tell cfmpeg the input upload is complete

GET/v1/jobs/{id}/output

Fetch output download URLs

GET/v1/jobs/{id}/output-batches

Fetch completed output batches while a large job is still finishing

GET/v1/usage

Read current billing-period usage

06 / Pricing

Billing is based on CPU, memory, and runtime.

Pick the CPU and memory shape for the encode. Completed jobs bill against your prepaid balance for the seconds they actually run.

Rate formula

$0.003144/core/min + $0.0005328/GiB/min

Balanced

2 CPU / 2 GiB

$0.0074/min

Minimum charge $0.0012

High CPU

8 CPU / 8 GiB

$0.029/min

Minimum charge $0.0049

Resource-based billing

Jobs are billed by CPU, memory, and the seconds the remote execution runs.

The minimum billable duration is 10 seconds.

Temporary job artifact retention is included in the metered rate.

Change one letter.

$ curl -fsSL https://cfmpeg.com/install | sh
Get an API key