Creating engaging videos from images and audio has never been easier. With FFMPEGAPI.net, developers can leverage a powerful hosted REST API to merge images and audio files without the hassle of managing servers or FFmpeg infrastructure. This article will guide you on how to effectively use the Image and Audio Merge endpoint to create stunning MP4 videos.
Understanding the Image and Audio Merge Endpoint
The Image and Audio Merge endpoint provides a straightforward way to combine one or more image/audio pairs into an MP4 video. This is particularly useful for developers working on automation, SaaS applications, and content pipelines.
- Endpoint: POST /api/merge_image_audio
- Content-Type: application/json or multipart/form-data
- Supports multiple image/audio pairs or single pairs.
Parameters for the Merge Request
To effectively use the merge functionality, you will need to understand the parameters required in your request. Below are the essential parameters and their descriptions:
- image_urls: An array of image URLs for multi-pair requests.
- audio_urls: An array of audio URLs that correspond to each image.
- transition_effect: An optional effect for image transitions.
- zoom_effect: A boolean to enable slow zoom on images.
Making Your First Request
Once you have your parameters ready, making your first API request is simple. Here’s a practical example using a JSON payload to merge images and audio:
{ "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 }
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, "async": false }'
FFMPEGAPI.net stands out as the ideal solution for developers looking to implement programmatic video editing without the complexities of server management. By utilizing the Image and Audio Merge API, you can effortlessly create professional-quality videos, making it a vital tool for any content creator or developer in the digital space.