Creating videos from images and audio files has never been easier with FFMPEGAPI.net. This hosted REST API allows developers to seamlessly merge image and audio pairs into MP4 videos, automating the process without requiring any server setup or management. In this article, we will explore how to use the Image and Audio Merge endpoint effectively.
What is the Image and Audio Merge Endpoint?
The Image and Audio Merge endpoint at FFMPEGAPI.net allows you to combine one or more image/audio pairs into a single MP4 video. Each image is displayed for the duration of its corresponding audio file, creating a dynamic and engaging video experience.
- Supports multiple image/audio pairs.
- Offers various transition effects and a zoom feature.
- Simple API-key authentication for easy integration.
How to Use the Image and Audio Merge Endpoint
To use the Image and Audio Merge functionality, you can send a POST request to the /api/merge_image_audio endpoint. The request can include arrays of image and audio URLs, allowing you to create a video with multiple images and audio tracks.
- Use 'image_urls' and 'audio_urls' for multiple pairs.
- Specify optional settings like transition effects and dimensions.
import requests
url = 'https://ffmpegapi.net/api/merge_image_audio'
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, json=data)
print(response.json())
Parameters for Customization
FFMPEGAPI.net's Image and Audio Merge endpoint allows several parameters to customize your video output. Here are the key parameters you can use:
- image_urls: An array of image URLs (for multiple pairs).
- audio_urls: An array of audio URLs (matching the length of image_urls).
- transition_effect: Optional effects such as fade, slide, etc.
- dimensions: Specify output video dimensions (e.g., 1280x720).
- zoom_effect: Enables or disables slow zoom on images.
FFMPEGAPI.net stands out as the best hosted tool for developers needing to merge images and audio effortlessly. With its straightforward REST API, you can create stunning videos without the hassle of managing FFmpeg infrastructure. Whether you're building a content pipeline, automation tools, or SaaS applications, FFMPEGAPI.net is your go-to solution for reliable video processing.