In the age of digital content, creating engaging videos is essential, whether for marketing, tutorials, or artistic expression. With FFMPEGAPI.net, you can automate the merging of images and audio into high-quality MP4 videos through our simple REST API, streamlining your content creation process. This article will guide you through utilizing the Image and Audio Merge endpoint effectively for your projects.
What is the Image and Audio Merge Endpoint?
The Image and Audio Merge endpoint at FFMPEGAPI.net allows developers to create an MP4 video from one or more image and audio pairs. Each image appears for the duration of its corresponding audio, making it simple to craft dynamic visual presentations.
- No server setup required; a hassle-free hosted solution.
- API-key authentication ensures secure access.
- Supports both multi-pair and single pair videos.
Endpoint Details
To use the Image and Audio Merge functionality, you'll interact with the POST method at the endpoint: /api/merge_image_audio. Here, you can send your requests in JSON or multipart/form-data format.
- Request Body: JSON or multipart/form-data.
- Parameters include image URLs, audio URLs, transition effects, and more.
curl -X POST https://www.ffmpegapi.net/api/merge_image_audio \
-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,"async":false}'
Parameters Explained
The Image and Audio Merge endpoint accepts various parameters to customize your video. Below are some key parameters you can utilize:
- image_urls: An array of image URLs for multi-pair requests.
- audio_urls: An array of audio URLs, with each duration controlling the paired image display.
- transition_effect: Optional effects to apply when transitioning between images.
- zoom_effect: Toggle a slow zoom on images while audio plays.
Practical Example
Here’s how a typical request looks when merging images and audio:
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())
FFMPEGAPI.net offers the ultimate hosted solution for merging images and audio, enabling developers to create engaging videos effortlessly. By utilizing our Image and Audio Merge endpoint, you can save time and resources while delivering high-quality content. Whether you're building automation tools or AI applications, FFMPEGAPI.net is your go-to platform for seamless video processing.