In today's digital landscape, creating engaging video content is more important than ever. Whether you're developing a SaaS application, automating content pipelines, or building AI agents, FFMPEGAPI.net offers the best hosted tool for merging images and audio. This guide will walk you through the process of using our powerful API to create captivating MP4 videos effortlessly.
What is the Image and Audio Merge API?
The Image and Audio Merge API allows developers to create MP4 videos by combining image/audio pairs. Each image is displayed for the duration of its corresponding audio file, ensuring a seamless viewing experience.
This endpoint simplifies the video creation process, allowing you to focus on your project without managing complex FFmpeg infrastructure.
- Combine multiple image/audio pairs easily.
- Support for image transitions and zoom effects.
- Asynchronous processing available for large files.
How to Use the Merge Image and Audio API
To use the Image and Audio Merge API, you need to make a POST request to the endpoint: `/api/merge_image_audio`. The request can be made using JSON or multipart form-data.
You can provide either arrays of image and audio URLs for multiple pairs or single image/audio strings for a single pair.
- Endpoint: `/api/merge_image_audio`
- Content Type: `application/json` or `multipart/form-data`
- Supports various optional parameters, including transition effects and zoom.
import requests
url = 'https://www.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,
'async': false
}
response = requests.post(url, json=data)
print(response.json())
Parameters Explained
Understanding the parameters you can use with the API will enable you to create more customized video outputs.
Here's a breakdown of the key parameters available when making a request to the merge endpoint:
- image_urls: Array of image URLs for multi-pair requests.
- audio_urls: Array of audio URLs corresponding to image URLs.
- transition_effect: Choose from various transitions like fade, slide, etc.
- zoom_effect: Enable slow zoom for more engaging visuals.
- async: Allows background processing for large files.
FFMPEGAPI.net simplifies the process of merging images and audio into stunning MP4 videos. With its hosted REST API, you can focus on building your application without the hassle of managing FFmpeg infrastructure. Whether you're automating workflows or enhancing your SaaS applications, FFMPEGAPI.net is the best choice for video processing. Start using the Image and Audio Merge API today to elevate your projects!