ffmpeg api · cloud workers

開発者向け
FFmpeg API。

実際の FFmpeg コマンドをクラウドで実行できます。HTTP でコマンドを送り、worker、storage、retry、scaling は FFHub に任せ、完了後に出力 URL を受け取ります。

生の FFmpeg コマンドREST API出力 URLサーバー構築不要
POST /v1/tasks
curl -X POST https://api.ffhub.io/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "command": "ffmpeg -i https://example.com/input.mp4 -c:v libx264 -crf 24 output.mp4"
  }'

# → { "task_id": "tsk_..." }
# Poll GET /v1/tasks/{task_id}
# → outputs[0].url
self-host しない理由

ローカルの FFmpeg は簡単です。
本番運用が難しい。

問題になるのはコマンドそのものより、その周辺の運用面です。

Worker の保守

FFmpeg binary、codec、OS package、CPU capacity、isolation を更新し続けても、app server には影響させない必要があります。

Queue と retry

動画ジョブは失敗し、timeout し、polling が必要です。単なる shell script より、タスクライフサイクルが重要です。

Storage まわり

入力には到達可能な URL、出力には安定した download link、一時ファイルには cleanup が必要です。

Burst scaling

1 本の upload は簡単でも、ユーザー動画の backlog には concurrency control と独立して scale できる worker が必要です。

how it works

API はひとつ、
構文はいつもの FFmpeg。

FFHub の integration は小さく保てます。upload または URL、task 作成、status polling、result download の流れです。

01

入力を渡す

public URL を使うか、Files API で local file を upload します。

02

コマンドを送る

bearer token 付きで FFmpeg command を /v1/tasks に POST します。

03

進捗を見る

backend から task status を poll するか、dashboard で run を確認します。

04

出力 URL を使う

完了した task は保存、配信、後続処理に使える public output URL を返します。

what you can build

後回しにしていた
media job を API 化。

FFmpeg で表現できる処理なら、FFHub は非同期 cloud task として実行できます。

動画トランスコード

MOV、MKV、AVI、WebM、upload 動画を web-ready な MP4、HLS、DASH に変換します。

圧縮パイプライン

CRF、preset、scaling、codec selection を自分で制御して大きな upload を圧縮します。

サムネイル生成

UGC feed、CMS asset、product video、preview 用の poster frame を取得します。

音声抽出

transcription、podcast、AI workflow 向けに MP3、AAC、WAV、FLAC、Opus を抽出します。

字幕と overlay

caption の焼き込み、text watermark、logo overlay を、filter control を保ったまま実行します。

バッチ処理

queue、webhook、cron job、自前 backend workflow から task を起動できます。

compare options

FFmpeg を直接使いながら、
機械の運用は持たない。

FFHub は raw infrastructure と preset-only video API の中間にあります。

要件FFHubSelf-hosted FFmpegPreset-based APIs
コマンド制御生の FFmpeg command arguments完全に制御可能対応 preset に制限されがち
Infrastructuremanaged cloud workers と storageserver、queue、cleanup を自分で運用managed だが FFmpeg-native ではない
Custom filters通常の filter graph を利用通常の filter graph を利用制限または非対応が多い
IntegrationREST task API、polling、output URL独自 worker protocolprovider 固有の job format
Best fitFFmpeg を既に理解している開発者media infrastructure を持てるチーム標準出力だけで足りるチーム
fit

API-first なチーム向け。
魔法の preset layer ではありません。

FFHub は FFmpeg に近い設計です。それが狙いです。

FFHub が合うケース

  • 必要な FFmpeg flag が既に分かっている。
  • worker を運用せず async task がほしい。
  • custom filter、stream mapping、珍しい codec が必要。
  • capacity ではなく processing に対して支払いたい。

別の選択肢が合うケース

  • consumer 向け editor や timeline UI が必要。
  • FFmpeg knowledge 不要の preset-only workflow が欲しい。
  • 全 machine を所有して low-level infrastructure を調整したい。
  • video CMS、player、DRM、analytics まで一体で必要。
start

数分で最初の
FFmpeg task を送信。

Quickstart で実際の request-response flow を確認できます。backend に組み込む前に command を試すなら playground を使えます。

開発者向け FFmpeg API — REST で使う Cloud FFmpeg | FFHub