Audio Encoding
Merge Audio Video

🔊 Merge Audio with Video

This endpoint merges an audio file into a video by replacing the existing audio track.

Endpoint

POST /merge-audio-video/

Full URL: https://ffmpeg-api-1-hmzg.onrender.com/merge-audio-video/

Form Data Parameters

  • video_url (string, required): URL of the input video
  • audio_url (string, required): URL of the input audio (MP3 recommended)
  • format (string, optional): Output format (mp4, avi, mov, mkv), default is mp4

Response

{
  "message": "Audio successfully merged into video",
  "output_file": "https://ffmpeg-api-1-hmzg.onrender.com/uploads/<id>_merged.mp4"
}
⚠️

The audio will replace the existing audio in the video. The duration is capped to the shorter of the two.

Usage Examples

curl -X POST https://ffmpeg-api-1-hmzg.onrender.com/merge-audio-video/ \
-F "video_url=https://example.com/sample-video.mp4" \
-F "audio_url=https://example.com/sample-audio.mp3" \
-F "format=mp4"