# Extract Audio

Extracts audio from video bytes and returns ephemeral runtime binary audio.

## Behavior

- Outputs OGG audio as a binary value on `output`.
- The extracted audio is not kept unless you store it.

Use `Upload Media` after this node only when you explicitly want to persist the extracted audio.

## Inputs

**input** — Video/media input. Accepts:

- binary video from another node
- `{ "binary": ... }`
- HTTP Request binary response shape: `{ "body": ... }`
- media object id string
- `{ "object_id": "..." }`

## Configuration

**output_format** — Extracted audio format.

- `ogg` only for v1.

**filename** — Optional output filename. Defaults to the source filename with `.ogg`.

## Outputs

**output** — Runtime binary audio object:

```json
{
  "binary": { "__binary__": true },
  "filename": "clip.ogg",
  "content_type": "audio/ogg",
  "size_bytes": 12345,
  "metadata": {
    "format": "ogg",
    "codec": "vorbis",
    "sample_rate": 48000,
    "channels": 1,
    "duration_secs": 12.3
  }
}
```

## Examples

### Telegram video summary

```text
Telegram Trigger
  -> Telegram Download
  -> Extract Audio
  -> Transcribe Audio
  -> AI Agent
  -> Telegram Send
```

### Discord video summary

```text
Discord Bot
  -> HTTP Request attachment URL
  -> Extract Audio
  -> Transcribe Audio
  -> AI Agent
  -> Discord Action
```

### Persist extracted audio

```text
Extract Audio
  -> Upload Media(kind_hint = audio)
```

## Runtime Errors

| Error | Cause |
|---|---|
| `unsupported media container for audio extraction` | The file is not in a supported container |
| `unsupported audio codec for extraction` | Audio codec is unsupported |
| `video contains no audio track` | No decodable audio track exists |
| `video exceeds maximum audio extraction size` | Source exceeds extraction limit |
| `video exceeds maximum audio extraction duration` | Decoded duration exceeds extraction limit |
| `extracted audio exceeds maximum size` | Encoded OGG exceeds output limit |
