Ffmpeg Api | Merge Audio Video
Merge an audio file with a video file into a single output video. Supports configurable start offset for audio synchronization.
Quick Start
Requires an each::labs API key. Get one at eachlabs.ai.
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "ffmpeg-api-merge-audio-video",
"version": "0.0.1",
"input": {
"video_url": "https://example.com/silent-video.mp4",
"audio_url": "https://example.com/background-music.mp3",
"start_offset": 0
}
}'
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| audio_url | string | - | URL of the audio file to use as the audio track. |
| start_offset | number | 0 | Offset in seconds for when the audio should start relative to the video. |
| video_url | string | - | URL of the video file to use as the video track. |
Examples
Merge audio and video with no offset:
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "ffmpeg-api-merge-audio-video",
"version": "0.0.1",
"input": {
"video_url": "https://example.com/timelapse.mp4",
"audio_url": "https://example.com/ambient-music.mp3"
}
}'
Merge with audio starting 5 seconds in:
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "ffmpeg-api-merge-audio-video",
"version": "0.0.1",
"input": {
"video_url": "https://example.com/presentation.mp4",
"audio_url": "https://example.com/narration.wav",
"start_offset": 5
}
}'
Related Models
- Extract Frame - Extract frames from a video
- Merge Videos - Merge multiple videos together