# Audio & video tools

Audio and video APIs inspect media, convert or extract audio, work with subtitle tracks, and produce thumbnails or waveform data. An agent or script can call them when a task needs guarded fetching and media tools such as ffmpeg or ffprobe. The input may be an audio file, a video or other media container, or an existing subtitle track, depending on the member.

media-probe reports container, duration, bit rate and per-stream codec and resolution without decoding the media. audio-convert transcodes audio from one format to another, with optional bit rate and sample rate. audio-extract takes an audio track from a video or other container and returns it in a chosen audio format. video-thumbnail takes a timestamp and returns one frame as an image, optionally scaled to a requested width.

subtitle-extract takes a text subtitle track from a media container and returns it as a subtitle file. subtitle-convert works on a subtitle file, converting it to another subtitle format and normalizing cues through a cue model. waveform-data reduces an audio file to normalized peaks for drawing; it does not return audio samples. These outputs have distinct scopes: the probe reports media properties without decoding, a thumbnail is a selected frame, and subtitle extraction works with a text track already present in the container.

- Shelf: Media. Requires a heavy dependency.
- Default price: $0.003 per successful call
- Timeout ceiling: 94 s

## 7 APIs

| API | What it does | Price | Max input | Max duration | Timeout |
| --- | --- | --- | --- | --- | --- |
| [Audio Convert API](https://grist.tools/docs/audio-convert) | Transcodes an audio file between WAV, MP3, FLAC, AAC and Opus, with an optional bit rate and sample rate. | $0.003 | 100 MB | 60 min (3,600 s) | 94 s |
| [Audio Extract API](https://grist.tools/docs/audio-extract) | Extracts the audio track from a video (or any container) and returns it in a chosen audio format. | $0.003 | 200 MB | 60 min (3,600 s) | 94 s |
| [Media Probe API](https://grist.tools/docs/media-probe) | Reads a media file's container, duration, bit rate and per-stream codec/resolution without decoding it. | $0.003 | 100 MB | none | 30 s |
| [Subtitle Convert API](https://grist.tools/docs/subtitle-convert) | Converts a subtitle track between SubRip (.srt) and WebVTT (.vtt), normalising the cues. | $0.003 | 5 MB | none | 15 s |
| [Subtitle Extract API](https://grist.tools/docs/subtitle-extract) | Extracts a text subtitle track from a media container (MKV, MP4, WebM) as SubRip or WebVTT. | $0.003 | 200 MB | none | 60 s |
| [Video Thumbnail API](https://grist.tools/docs/video-thumbnail) | Grabs a single frame from a video at a chosen timestamp as a PNG or JPEG, optionally scaled to a width. | $0.003 | 200 MB | none | 60 s |
| [Waveform Data API](https://grist.tools/docs/waveform-data) | Reduces an audio file to a fixed number of normalised waveform peaks for drawing, without shipping samples. | $0.003 | 100 MB | none | 90 s |

## Conversions in this family

- [AIFF to AAC](https://grist.tools/tools/aiff-to-aac)
- [AIFF to FLAC](https://grist.tools/tools/aiff-to-flac)
- [AIFF to MP3](https://grist.tools/tools/aiff-to-mp3)
- [AIFF to Opus](https://grist.tools/tools/aiff-to-opus)
- [AIFF to WAV](https://grist.tools/tools/aiff-to-wav)
- [AVI to AAC](https://grist.tools/tools/avi-to-aac)
- [AVI to FLAC](https://grist.tools/tools/avi-to-flac)
- [AVI to JPEG](https://grist.tools/tools/avi-to-jpeg)
- [AVI to MP3](https://grist.tools/tools/avi-to-mp3)
- [AVI to Opus](https://grist.tools/tools/avi-to-opus)
- [AVI to PNG](https://grist.tools/tools/avi-to-png)
- [AVI to SRT](https://grist.tools/tools/avi-to-srt)
- [AVI to WebVTT](https://grist.tools/tools/avi-to-vtt)
- [AVI to WAV](https://grist.tools/tools/avi-to-wav)
- [FLAC to AAC](https://grist.tools/tools/flac-to-aac)
- [FLAC to MP3](https://grist.tools/tools/flac-to-mp3)
- [FLAC to Opus](https://grist.tools/tools/flac-to-opus)
- [FLAC to WAV](https://grist.tools/tools/flac-to-wav)
- [MKV to AAC](https://grist.tools/tools/mkv-to-aac)
- [MKV to FLAC](https://grist.tools/tools/mkv-to-flac)
- [MKV to JPEG](https://grist.tools/tools/mkv-to-jpeg)
- [MKV to MP3](https://grist.tools/tools/mkv-to-mp3)
- [MKV to Opus](https://grist.tools/tools/mkv-to-opus)
- [MKV to PNG](https://grist.tools/tools/mkv-to-png)
- [MKV to SRT](https://grist.tools/tools/mkv-to-srt)
- [MKV to WebVTT](https://grist.tools/tools/mkv-to-vtt)
- [MKV to WAV](https://grist.tools/tools/mkv-to-wav)
- [MP3 to AAC](https://grist.tools/tools/mp3-to-aac)
- [MP3 to FLAC](https://grist.tools/tools/mp3-to-flac)
- [MP3 to Opus](https://grist.tools/tools/mp3-to-opus)
- [MP3 to WAV](https://grist.tools/tools/mp3-to-wav)
- [MP4 to AAC](https://grist.tools/tools/mp4-to-aac)
- [MP4 to FLAC](https://grist.tools/tools/mp4-to-flac)
- [MP4 to JPEG](https://grist.tools/tools/mp4-to-jpeg)
- [MP4 to MP3](https://grist.tools/tools/mp4-to-mp3)
- [MP4 to Opus](https://grist.tools/tools/mp4-to-opus)
- [MP4 to PNG](https://grist.tools/tools/mp4-to-png)
- [MP4 to SRT](https://grist.tools/tools/mp4-to-srt)
- [MP4 to WebVTT](https://grist.tools/tools/mp4-to-vtt)
- [MP4 to WAV](https://grist.tools/tools/mp4-to-wav)
- [Ogg to AAC](https://grist.tools/tools/ogg-to-aac)
- [Ogg to FLAC](https://grist.tools/tools/ogg-to-flac)
- [Ogg to JPEG](https://grist.tools/tools/ogg-to-jpeg)
- [Ogg to MP3](https://grist.tools/tools/ogg-to-mp3)
- [Ogg to Opus](https://grist.tools/tools/ogg-to-opus)
- [Ogg to PNG](https://grist.tools/tools/ogg-to-png)
- [Ogg to SRT](https://grist.tools/tools/ogg-to-srt)
- [Ogg to WebVTT](https://grist.tools/tools/ogg-to-vtt)
- [Ogg to WAV](https://grist.tools/tools/ogg-to-wav)
- [SRT to WebVTT](https://grist.tools/tools/srt-to-vtt)
- [WebVTT to SRT](https://grist.tools/tools/vtt-to-srt)
- [WAV to AAC](https://grist.tools/tools/wav-to-aac)
- [WAV to FLAC](https://grist.tools/tools/wav-to-flac)
- [WAV to MP3](https://grist.tools/tools/wav-to-mp3)
- [WAV to Opus](https://grist.tools/tools/wav-to-opus)

## Questions

### How do subtitle extraction and conversion differ?

subtitle-extract reads an existing text subtitle track from a media container and returns it as a subtitle file. subtitle-convert converts a subtitle file to another subtitle format while normalizing its cues.

### What does media-probe report?

It reports the container, duration, bit rate and per-stream codec and resolution without decoding the media file.

### Does waveform-data return audio samples?

No. It reduces an audio file to a fixed number of normalized waveform peaks for drawing without returning the samples.

This page as HTML: https://grist.tools/tools/av. Every page of grist.tools has a Markdown version at its address plus .md.
