Sawfish
Pricing
from $9.00 / 1,000 recipe: vision prep
Sawfish
Pay-per-task FFmpeg API for developers and AI agents. Probe, trim, extract audio, normalize loudness, contact sheets and subtitle burn-in, plus ready recipes for vision LLMs, speech-to-text and 9:16 shorts. Send a URL, get files and JSON back.
Pricing
from $9.00 / 1,000 recipe: vision prep
Rating
0.0
(0)
Developer
Sawfish Labs
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
an hour ago
Last modified
Categories
Features
Share
Sawfish — FFmpeg Video & Audio Task API for Devs & AI Agents
Sawfish is a pay-per-event FFmpeg media processing Actor built for developers, automation workflows, and AI agents.
Pass a public HTTPS media URL or an Apify Key-Value Store record, select one of 6 atomic FFmpeg operations or 3 AI-ready chained recipes, and receive structured JSON in the Dataset plus public Key-Value Store download URLs for generated media files.
What Sawfish Does
3 Chained AI Recipes (single run = multi-step pipeline)
| Operation | Pipeline Steps | Output |
|---|---|---|
recipe/vision-prep | Runs probe, extracts a timestamped contact sheet using exact real source PTS (select + showinfo, -fps_mode passthrough), and returns a structured JSON manifest (metadata, grid, frame_timestamps_sec, vision_hint) for multimodal vision models | .jpg or .webp + JSON manifest |
recipe/transcribe-prep | Extracts audio, downmixes to mono 16 kHz, applies 2-pass EBU R128 loudness normalization (-16 LUFS default), and exports 16-bit PCM WAV ready for speech-to-text | .wav |
recipe/shorts-prep | Trims [start_sec, end_sec], reframes to 9:16 vertical (720x1280 or 1080x1920), and applies 2-pass EBU R128 loudness normalization (-14 LUFS default) | .mp4 |
6 Atomic Operations
| Operation | Description | Output |
|---|---|---|
probe | Technical metadata: container, duration, file size, bitrate, video/audio codecs, resolution, FPS, sample rate, channels | JSON only (Dataset + KVS OUTPUT) |
extract-audio | Extracts audio as mp3 or wav (16000, 44100, or 48000 Hz, mono or stereo) | .mp3 or .wav |
contact-sheet | Generates a cols x rows grid (jpg or webp) with optional burned-in exact source PTS timestamps and frame_timestamps_sec JSON | .jpg or .webp |
trim | Cuts [start_sec, end_sec] in fast (stream copy) or accurate (frame-exact re-encode) mode | .mp4 or .mp3 |
normalize-audio | 2-pass EBU R128 loudness normalization (target_lufs, true_peak) keeping container or exporting mp3, wav, or mp4 | Original format, .mp3, .wav, or .mp4 |
burn-subtitles | Hardcodes srt or ass captions with configurable font size, hex colors, and vertical position (max 720p and 60 s) | .mp4 |
Usage Examples
1. Apify Console (JSON Input)
Run recipe/vision-prep on a public HTTPS video URL:
{"operation": "recipe/vision-prep","video_url": "https://example.com/demo.mp4","cols": 4,"rows": 3,"tile_width": 320,"image_format": "jpg"}
Or process a file already stored in your Apify Key-Value Store (recipe/transcribe-prep):
{"operation": "recipe/transcribe-prep","input_kvs_key": "interview.mp4","target_lufs": -16}
2. Synchronous REST API (run-sync-get-dataset-items)
Call Sawfish in a single HTTP request and get the Dataset JSON directly:
curl -sS -X POST \"https://api.apify.com/v2/acts/zyonelvis~sawfish/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"operation": "recipe/vision-prep","video_url": "https://example.com/demo.mp4","cols": 4,"rows": 3,"image_format": "jpg"}'
3. AI Agents via Apify MCP Server (mcp.apify.com)
Connect any Model Context Protocol (MCP) client to Apify's hosted MCP endpoint with Sawfish loaded as a tool:
{"mcpServers": {"apify": {"type": "http","url": "https://mcp.apify.com/?tools=zyonelvis/sawfish"}}}
The Apify MCP Server reads .actor/actor.json and .actor/input_schema.json automatically, exposing all 9 operations with parameter types, bounds, enums, and descriptions so an agent can chain:
probeto inspect duration, resolution, and audio tracks;recipe/vision-prepto inspect a timestamped contact sheet instead of uploading raw video;recipe/transcribe-prepto produce clean 16 kHz mono WAV audio for speech-to-text;trimorrecipe/shorts-prepto cut exact segments using the timestamps returned byvision-prep.
Sample Dataset Output (recipe/vision-prep)
{"operation": "recipe/vision-prep","status": "done","elapsed_ms": 185,"input_source": "https://example.com/demo.mp4","output_url": "https://api.apify.com/v2/key-value-stores/<STORE_ID>/records/contact_sheet.jpg","output_kvs_key": "contact_sheet.jpg","filename": "contact_sheet.jpg","content_type": "image/jpeg","size_bytes": 48210,"metadata": {"format_name": "mp4","duration_sec": 20.0,"size_bytes": 1248000,"bitrate_kbps": 499,"has_video": true,"has_audio": true,"video": { "codec": "h264", "width": 1280, "height": 720, "fps": 24.0 },"audio": { "codec": "aac", "sample_rate_hz": 44100, "channels": 2 }},"details": {"grid": { "cols": 4, "rows": 3, "tile_width": 320 },"frame_timestamps_sec": [0.0, 1.667, 3.333, 5.0, 6.667, 8.333, 10.0, 11.667, 13.333, 15.0, 16.667, 18.333],"vision_hint": "Contact sheet 4x3 with exact source PTS timestamps printed on each tile."},"charged_events": [{ "event_name": "actor-start", "count": 1 },{ "event_name": "recipe-vision-prep", "count": 1 }],"charge_limit_reached": false,"estimated_price_usd": 0.0095}
Pay-Per-Event (PPE) Pricing
Sawfish charges a minimal actor-start event plus the operation event only when processing succeeds. Before downloading media or running FFmpeg, Sawfish checks your maximum spending limit (maxTotalChargeUsd) and stops early without processing if the operation event would exceed your budget.
| Event Name | When Charged | Unit Price (USD) |
|---|---|---|
actor-start | Once per run (container initialization) | $0.0005 |
probe | Successful probe | $0.0015 |
extract-audio | Successful extract-audio (first 60 s included) | $0.0060 |
contact-sheet | Successful contact-sheet | $0.0070 |
trim | Successful trim (first 60 s included) | $0.0070 |
normalize-audio | Successful normalize-audio (first 60 s included) | $0.0100 |
burn-subtitles | Successful burn-subtitles (up to 720p, 60 s) | $0.0180 |
recipe-vision-prep | Successful recipe/vision-prep | $0.0090 |
recipe-transcribe-prep | Successful recipe/transcribe-prep (first 60 s included) | $0.0110 |
recipe-shorts-prep | Successful recipe/shorts-prep (first 60 s included) | $0.0160 |
extra-minute | Each started minute beyond 60 s on extract-audio, trim, normalize-audio, recipe/transcribe-prep, and recipe/shorts-prep | $0.0040 |
Limits & Security
- Input size limits: max 100 MB video · max 25 MB audio
- Media limits: max 10 minutes (
600 s) duration · max 1080p height - Operation-specific limits:
burn-subtitlesmax 720p and 60 s ·recipe/shorts-prepmax 180 s - Execution timeout: 90 seconds per FFmpeg command (
-threads 2) - Security hardening: HTTPS-only external downloads with SSRF, IPv4-mapped IPv6, and DNS-rebinding IP-pinning protection; binary magic-byte verification;
-protocol_whitelist file,pipe; no shell execution (shell=False)