Video merging api with images
Video merging api with images
{
"width": 1280,
"height": 720,
"images": [
{
"url": "https://picsum.photos/1920/1080.jpg?random=1",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=2",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=1",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=2",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=1",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=2",
"duration": 3
}
],
"audio_url": "https://example.com/xY9BCIBv5iBWPFJb9e-ai_tmpsvdc8waw.wav",
"audio_mode": "video_length",
"transition": "fade",
"bg_audio_url": "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",
"bg_audio_volume": 0.2
}
[
{
"job_id": "1406c589-a1f4-45d5-8745-aae07bc4de38",
"status": "pending",
"message": "Job created. Poll status_url for progress.",
"result_url": "https://eranol.com/api/v1/ffmpeg/result/1406c589-a1f4-45d5-8745-aae07bc4de38",
"status_url": "https://eranol.com/api/v1/ffmpeg/status/1406c589-a1f4-45d5-8745-aae07bc4de38"
}
]
Send your requests to the following URL using the specified HTTP method.
POST https://eranol.com/api/v1/ffmpeg/mergeSend the following JSON payload in the request body. Adjust the values to match your use case.
{
"width": 1280,
"height": 720,
"images": [
{
"url": "https://picsum.photos/1920/1080.jpg?random=1",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=2",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=1",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=2",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=1",
"duration": 3
},
{
"url": "https://picsum.photos/1920/1080.jpg?random=2",
"duration": 3
}
],
"audio_url": "https://example.com/xY9BCIBv5iBWPFJb9e-ai_tmpsvdc8waw.wav",
"audio_mode": "video_length",
"transition": "fade",
"bg_audio_url": "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",
"bg_audio_volume": 0.2
}All available options for this endpoint. Required parameters are marked accordingly.
| Parameter | Type | Default | Description |
|---|---|---|---|
| images | array | required | List of image slides |
| images[].url | string | required | Image URL (jpg, png, webp, gif) |
| images[].duration | float | required | Display duration in seconds |
| audio_url | string | required | Main audio file URL (mp3, wav, ogg, flac, aac) — plays at 100% volume |
| bg_audio_url | string | null | Optional background music URL — mixed under the main audio |
| bg_audio_volume | float | 0.2 | Background music volume (0.0–1.0). Default 0.2 = 20% |
| width | int | 1280 | Output width (16-7680) |
| height | int | 720 | Output height (16-4320) |
| fps | int | 24 | Frames per second (1-120) |
| fit | string | contain | contain (letterbox) or cover (crop to fill) |
| transition | string | none | none (hard cut) or fade (dissolve) |
| fade_secs | float | 0.5 | Fade duration (only when transition=fade) |
| video_codec | string | libx264 | Video encoder |
| audio_codec | string | aac | Audio encoder |
| format | string | mp4 | Output container format |
| audio_mode | string | shortest | shortest or video_length |
Use the following cURL command to make a request to this API endpoint. Replace YOUR_API_KEY with your actual API key from the dashboard.
curl -X POST "https://eranol.com/api/v1/ffmpeg/merge" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"width":1280,"height":720,"images":[{"url":"https://picsum.photos/1920/1080.jpg?random=1","duration":3},{"url":"https://picsum.photos/1920/1080.jpg?random=2","duration":3},{"url":"https://picsum.photos/1920/1080.jpg?random=1","duration":3},{"url":"https://picsum.photos/1920/1080.jpg?random=2","duration":3},{"url":"https://picsum.photos/1920/1080.jpg?random=1","duration":3},{"url":"https://picsum.photos/1920/1080.jpg?random=2","duration":3}],"audio_url":"https://example.com/xY9BCIBv5iBWPFJb9e-ai_tmpsvdc8waw.wav","audio_mode":"video_length","transition":"fade","bg_audio_url":"https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3","bg_audio_volume":0.2}'Below is an example of a successful JSON response from this endpoint.
[
{
"job_id": "1406c589-a1f4-45d5-8745-aae07bc4de38",
"status": "pending",
"message": "Job created. Poll status_url for progress.",
"result_url": "https://eranol.com/api/v1/ffmpeg/result/1406c589-a1f4-45d5-8745-aae07bc4de38",
"status_url": "https://eranol.com/api/v1/ffmpeg/status/1406c589-a1f4-45d5-8745-aae07bc4de38"
}
]A successful request will return one of the following HTTP status codes.