Extract audio from video
Pull the audio track from a video — for podcasts, audio-only playback, or when you need audio without the video overhead.
API
ittybit audio \
-i https://example.com/video.mp4 \
--cloudconst task = {
input: "https://example.com/video.mp4",
kind: "audio",
};
const res = await fetch("https://api.ittybit.com/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ITTYBIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(task),
});
const data = await res.json();import requests
task = {
"input": "https://example.com/video.mp4",
"kind": "audio",
}
res = requests.post(
"https://api.ittybit.com/tasks",
headers={"Authorization": f"Bearer {api_key}"},
json=task,
)
data = res.json()TASK='{
"input": "https://example.com/video.mp4",
"kind": "audio"
}'
curl -X POST https://api.ittybit.com/tasks \
-H "Authorization: Bearer $ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d "$TASK" Default is MP3. For AAC:
{"input": "https://...", "kind": "audio", "options": {"format": "aac"}}
CLI
ittybit audio \
-i video.mp4 \
-o audio.mp3
ittybit audio \
-i video.mp4 \
-o audio.flac \
--format flac
Trimming
ittybit audio \
-i video.mp4 \
-o clip.mp3 \
--start 60 \
--end 120
Formats
| Format | Notes |
|---|---|
mp3 | Universal, lossy |
aac | Better quality per bit |
opus | Best compression, modern browsers |
wav | Lossless, large |
flac | Lossless, compressed |
ogg | Vorbis, open format |
S3 input/output
Extract audio from S3-hosted video using connections:
ittybit audio \
-i s3://uploads/interview.mp4 \
-o s3://audio/interview.mp3 \
--connection my-s3
See also
- API
POST /taskswithkind: "audio"— extract audio via HTTP - CLI
audio— full reference for audio flags and options - Convert uploads for web playback — process the video itself
- Extract thumbnails — pull poster frames from the same video