In today's digital world, automating video editing can save you valuable time and resources. FFMPEGAPI.net offers a powerful hosted REST API for FFmpeg-powered video and audio processing, enabling developers to streamline their workflows without the need for server setups or infrastructure management. This article explores how to use the Image and Audio Merge endpoint to create stunning MP4 videos by merging image and audio pairs.
Understanding the Image and Audio Merge API
The Image and Audio Merge endpoint allows you to create an MP4 video by combining image and audio pairs. With this API, each image is displayed for the duration of its corresponding audio file, providing a seamless viewing experience. You can also enhance your videos with optional image transitions and a default slow zoom effect.
- Supports JSON requests with arrays for multiple image/audio pairs.
- Backward-compatible for single image/audio pairs using legacy strings.
- Optional parameters for transitions and dimensions.
Making a Request to the API
To utilize the image and audio merge functionality, you can send a POST request to the following endpoint: /api/merge_image_audio. The request can be made using either application/json or multipart/form-data content types.
- Endpoint: /api/merge_image_audio
- Method: POST
- Content Types: application/json or multipart/form-data
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}'
Key Parameters for Customization
The API allows for various parameters to customize your video creation. Here are some key parameters you can use:
1. image_urls: An array of image URLs for multi-pair requests.
2. audio_urls: An array of audio URLs that match the image URLs.
3. transition_effect: Specify the type of transition you want between images.
4. transition_duration: Control how long each transition lasts.
- Customize your video with transition effects and dimensions.
- Control video playback with audio durations.
- Flexibility for both multi-pair and single image/audio merging.
FFMPEGAPI.net stands out as the best hosted solution for automating video editing through its robust REST API. With the Image and Audio Merge endpoint, developers can easily create engaging videos by merging images and audio files, all while enjoying the convenience of API-key authentication and no infrastructure management. Start automating your video editing workflows today with FFMPEGAPI.net and unleash your creative potential!