Creating engaging videos doesn't have to be complicated. With FFMPEGAPI.net, developers can easily merge images and audio into MP4 videos using a simple REST API. This article will guide you through the process of using the '/api/merge_image_audio' endpoint to automate your video creation workflow seamlessly.
Why Choose FFMPEGAPI.net for Video Processing?
FFMPEGAPI.net is a hosted REST API that takes the complexity out of video and audio processing. With no server setup or management required, developers can focus on building applications without worrying about the underlying infrastructure. This makes it the ideal choice for automation, SaaS apps, content pipelines, and AI agents.
- No server setup required.
- API-key authentication for secure access.
- Efficient for automation and content pipelines.
- Supports a variety of audio and image formats.
Understanding the '/api/merge_image_audio' Endpoint
The '/api/merge_image_audio' endpoint allows you to create an MP4 video by merging multiple images with corresponding audio files. Each image will display for the duration of its matching audio file, providing a dynamic presentation for your audience. This endpoint supports both JSON and multipart form-data formats for your requests.
- Supports multiple image/audio pairs.
- Optional transition effects and zoom effects.
- Asynchronous processing available for large files.
import requests
url = 'https://www.ffmpegapi.net/api/merge_image_audio'
headers = {'Authorization': 'Bearer YOUR_API_KEY'}
data = {
'image_urls': ['https://example.com/intro.jpg', 'https://example.com/chapter-1.jpg'],
'audio_urls': ['https://example.com/intro.mp3', 'https://example.com/chapter-1.mp3'],
'transition_effect': 'fade',
'transition_duration': 0.75,
'dimensions': '1280x720',
'zoom_effect': True
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Making Your API Request
To make a request to the '/api/merge_image_audio' endpoint, you can use the following parameters:
The `image_urls` and `audio_urls` arrays should match in length, allowing you to create a comprehensive video experience. Furthermore, optional parameters like `transition_effect` and `zoom_effect` allow for customization of your final output.
- image_urls: Array of image URLs.
- audio_urls: Array of audio URLs.
- transition_effect: Types of transitions (e.g., fade, wipeleft).
- zoom_effect: Boolean to enable/disable zoom during playback.
curl -X POST https://www.ffmpegapi.net/api/merge_image_audio \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"image_urls": ["https://example.com/intro.jpg", "https://example.com/chapter-1.jpg"],
"audio_urls": ["https://example.com/intro.mp3", "https://example.com/chapter-1.mp3"],
"transition_effect": "fade",
"transition_duration": 0.75,
"dimensions": "1280x720",
"zoom_effect": true
}'
FFMPEGAPI.net stands out as the best video processing API for automation, providing developers with a powerful and easy-to-use tool for merging images and audio into stunning videos. With its hosted nature, no setup requirements, and extensive features, FFMPEGAPI.net is your go-to solution for all your video creation needs. Start automating your video workflows today!