[Integrations](https://spiral.ai/integrations) › [Google Antigravity](https://spiral.ai/integrations/antigravity) › [FFmpeg](https://spiral.ai/integrations/antigravity/ffmpeg)

# How to Use FFmpeg in Google Antigravity

FFmpeg handles precise media jobs: trimming recordings, resizing video, cropping frames, and converting formats. Choose it when you can specify the edit with timestamps, dimensions, and an output format.

|  |  |
| --- | --- |
| Model | FFmpeg |
| Available through | Spiral |
| Category | Video |
| Price | $0.0013 per run, plus $0.00052 per second FFmpeg runs (whole seconds, at least one). Held at `max_seconds`, default 300. |
| Returns | video, audio, image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with FFmpeg in Google Antigravity

- Use FFmpeg to cut the project's demo recording from 00:00:12 to 00:00:32, re-encoding for an accurate start.
- Use FFmpeg to resize the project's 1920 × 1080 walkthrough to 1280 × 720.
- Use FFmpeg to export a PNG at 00:00:08 from the project's onboarding recording.
- Use FFmpeg to crop the project's 1920 × 1080 demo to the central 1080 × 1080 square.
- Use FFmpeg to encode the project's review video with libx264 at CRF 23, keeping its dimensions.

## How to set up FFmpeg in Google Antigravity

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Open the MCP config**: * Antigravity App: click Customizations, then Installed. In the MCP Servers section, click Copy Config File Path and open that file. * Antigravity IDE: click … at the top of the agent side panel, select MCP Servers, then Manage MCP Servers › View raw config. * Antigravity CLI: edit `~/.gemini/config/mcp_config.json`.

2. **Add the server**: Add Spiral under `mcpServers`:

```json
{
  "mcpServers": {
    "spiral": {
      "serverUrl": "https://api.spiral.ai/mcp"
    }
  }
}
```

3. **Sign in**: In the Antigravity App, open Customizations › Installed. Under MCP Servers, click Authenticate next to Spiral. Sign in to Spiral, pick the organization and click Authorize. Copy the authorization code the browser shows, paste it into Enter authorization code and click Submit. No API key.

### Use the Spiral skill

1. **Send Google Antigravity this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run FFmpeg**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "spiral",
    "model": "ffmpeg",
    "input": {
      "command": "<command>"
    }
  }'
```

Then paste one of the prompts above: Google Antigravity finds FFmpeg on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/antigravity

## FFmpeg tools and prices

- [FFmpeg Media Editor](https://spiral.ai/tools/spiral/ffmpeg) (Spiral): $0.0013 per run, plus $0.00052 per second FFmpeg runs (whole seconds, at least one). Held at `max_seconds`, default 300.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| inputs |  | [] | Files the command names as {in0}, {in1}, … (Toolbox file links or public links), each at most 2 GB. Not needed when the command gives https links after -i. |
| max_seconds | 1 to 1800 | 300 | The longest FFmpeg may run, in seconds. The hold is this many seconds; the charge is the seconds it ran. |

## What can you do with FFmpeg in Google Antigravity?

Turn project recordings into demo clips, screenshots, and review copies with FFmpeg. Use the project's media requirements to specify timestamps, dimensions, and encoding quality.

### Cut a demo excerpt

Keep a specific section of a product recording using exact start and end timestamps.

### Prepare smaller review copies

Resize footage to 1280 × 720 for review, with an explicit compression quality target.

### Crop a square product clip

Select a square area from landscape footage for a product listing.

### Export tutorial screenshots

Extract still frames at chosen timestamps for instructions or release notes.

### Assemble a lesson

Join approved clips in order after checking that their media properties match.

### Convert delivery formats

Convert an existing recording to the container and encoding required by its destination.

### Create compressed previews

Encode preview videos with a specified quality target while keeping the source dimensions.

## Overview

- [Spiral media tools](https://spiral.ai/providers/spiral)
- [All Google Antigravity guides](https://spiral.ai/integrations/antigravity)

## FFmpeg in other agents

- [Amp](https://spiral.ai/integrations/amp/ffmpeg)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/ffmpeg)
- [Claude](https://spiral.ai/integrations/claude-desktop/ffmpeg)
- [Claude Code](https://spiral.ai/integrations/claude-code/ffmpeg)
- [Cline](https://spiral.ai/integrations/cline/ffmpeg)
- [Codex](https://spiral.ai/integrations/codex/ffmpeg)
- [Cursor](https://spiral.ai/integrations/cursor/ffmpeg)
- [Devin](https://spiral.ai/integrations/devin/ffmpeg)
- [dots](https://spiral.ai/integrations/dots/ffmpeg)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/ffmpeg)
- [Gemini](https://spiral.ai/integrations/gemini/ffmpeg)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/ffmpeg)
- [goose](https://spiral.ai/integrations/goose/ffmpeg)
- [Grok](https://spiral.ai/integrations/grok/ffmpeg)
- [Grok Build](https://spiral.ai/integrations/grok-build/ffmpeg)
- [Hermes](https://spiral.ai/integrations/hermes/ffmpeg)
- [Instinct](https://spiral.ai/integrations/instinct/ffmpeg)
- [Manus](https://spiral.ai/integrations/manus/ffmpeg)
- [Muse](https://spiral.ai/integrations/muse/ffmpeg)
- [Muse Code](https://spiral.ai/integrations/muse-code/ffmpeg)
- [n8n](https://spiral.ai/integrations/n8n/ffmpeg)
- [Notion](https://spiral.ai/integrations/notion/ffmpeg)
- [OpenClaw](https://spiral.ai/integrations/openclaw/ffmpeg)
- [opencode](https://spiral.ai/integrations/opencode/ffmpeg)
- [Perplexity](https://spiral.ai/integrations/perplexity/ffmpeg)
- [Raycast](https://spiral.ai/integrations/raycast/ffmpeg)
- [VS Code](https://spiral.ai/integrations/vscode/ffmpeg)
- [Windsurf](https://spiral.ai/integrations/windsurf/ffmpeg)
- [Zapier](https://spiral.ai/integrations/zapier/ffmpeg)

## More Google Antigravity guides

- [ElevenLabs Dubbing](https://spiral.ai/integrations/antigravity/elevenlabs-dubbing)
- [FILM Video Interpolation](https://spiral.ai/integrations/antigravity/film-video-interpolation)
- [DreamActor V2](https://spiral.ai/integrations/antigravity/dreamactor-v2)
- [FLUX 3 Draft Enhance](https://spiral.ai/integrations/antigravity/flux-3-draft-enhance)
- [Depth Anything Video](https://spiral.ai/integrations/antigravity/depth-anything-video)
- [FLUX 3 Extend Video](https://spiral.ai/integrations/antigravity/flux-3-extend-video)

## Questions about FFmpeg in Google Antigravity

**Can Google Antigravity use FFmpeg?**

Yes. Add Spiral to Google Antigravity as an MCP server, and Google Antigravity can find and run FFmpeg like any built-in tool.

**How much does FFmpeg cost in Google Antigravity?**

$0.0013 per run, plus $0.00052 per second FFmpeg runs (whole seconds, at least one). Held at `max_seconds`, default 300. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Google Antigravity plan is separate.

**Do I need a Spiral account to use FFmpeg in Google Antigravity?**

No. Spiral runs FFmpeg on its own Spiral account. You sign in to Spiral once and never paste a key.

**How long does it take to set up FFmpeg in Google Antigravity?**

About two minutes: open the MCP config, then add the server, then sign in.

**Does Google Antigravity wait while FFmpeg runs?**

FFmpeg runs in the background. Google Antigravity starts the run, checks on it and gives you the video, audio, image when it's ready.

**What is FFmpeg useful for?**

Use FFmpeg for concrete media edits: trim a recording, crop a frame, resize a video, convert formats, or join clips. Give the agent measurable instructions such as timestamps and output dimensions.

**Which output resolutions can I request?**

Specify dimensions such as 1280 × 720 or 1080 × 1920. State whether you want the picture resized or cropped, since those produce different compositions.

**Can FFmpeg cut at an exact timestamp?**

Transcoding supports accurate seeking by default. A cut made by copying streams can retain material before the requested start, so request re-encoding when the opening frame matters.

**Can FFmpeg edit without losing quality?**

Stream copying preserves the encoded quality when changing a compatible container or selecting streams. Cropping and resizing require decoded frames, so they cannot use stream copying.

**Can I join clips with different encodings?**

The concat demuxer requires matching codecs, time bases, and stream layouts. Ask the agent to check those properties and make the clips compatible before joining them.

