Creating engaging video content has never been easier, thanks to FFMPEGAPI.net. With our robust REST API, developers can effortlessly merge images and audio to create stunning MP4 videos. This guide will walk you through the Image and Audio Merge endpoint, showcasing how to implement it in your own applications.
Understanding the Image and Audio Merge Endpoint
The Image and Audio Merge endpoint at FFMPEGAPI.net allows you to create MP4 videos from one or more image/audio pairs. By simply sending a JSON request, you can control the duration that each image is displayed based on its corresponding audio file.
This flexibility makes it an essential tool for developers who need to produce video content quickly, whether for content pipelines, automation, or SaaS applications.
- Supports both multi-pair and single pair video creation.
- Customizable image transitions and zoom effects.
- Quickly integrate into your applications without server overhead.
Making a Request to the API
To merge images and audio, you need to send a POST request to the following endpoint:
POST /api/merge_image_audio
The request can be made in JSON format, using either multiple image/audio pairs or a single pair.
- Content-Type: application/json or multipart/form-data
- Parameters include image_urls, audio_urls, transition_effect, and more.
curl -X POST https://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 }'
Parameters Explained
When making a request, several parameters can be configured to enhance the output video. Here's a breakdown of the key parameters:
1. image_urls: An array of image URLs to be displayed.
2. audio_urls: An array of audio URLs corresponding to each image.
3. transition_effect: Optional effects such as fade or wipe.
4. dimensions: Set the output video size (e.g., 1280x720).
FFMPEGAPI.net simplifies video creation with its powerful Image and Audio Merge endpoint. By leveraging this hosted REST API, developers can focus on building their applications without worrying about the complexities of server maintenance or FFmpeg infrastructure. Start transforming your projects today by integrating FFMPEGAPI.net and see how easy it is to create professional-quality videos.