Video Stitcher

Drag, drop, and merge your MP4 files into one seamless video.

Drag & drop videos here

or click to browse files

MP4 files only

Upload at least two MP4 files to begin.

API Usage & Server Status

Integrate video merging into your own application and check the server's health.

POSThttps://studio--studio-905953478-a9dfc.us-central1.hosted.app/api/merge

Body

Send a multipart/form-data request with the MP4 files appended under the key 'videos'.

Response

On success, the API returns the merged video file with a Content-Type of video/mp4. On failure, it returns a JSON object with an error message.

Example JavaScript Client

// This example demonstrates how to call the Video Stitcher API from any
// JavaScript application, like one built in Google AI Studio.

const files = [file1, file2]; // Your File objects from an input element
const formData = new FormData();

files.forEach(file => {
  formData.append('videos', file);
});

// The API is asynchronous. You 'await' the response.
// A successful response *is* the merged video file.
fetch('https://studio--studio-905953478-a9dfc.us-central1.hosted.app/api/merge', {
  method: 'POST',
  body: formData,
})
.then(response => {
  if (!response.ok) {
    // If the server returns an error, it will be in JSON format
    return response.json().then(err => { throw new Error(err.message) });
  }
  // The response body is the raw binary data of the merged MP4 file.
  // This is how the calling application receives the merged video.
  return response.blob();
})
.then(blob => {
  // At this point, you have the merged video as a blob.
  // You can create a download link for the user.
  console.log('Merge successful! Video blob received.', blob);
  const url = window.URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.style.display = 'none';
  a.href = url;
  a.download = 'merged-video.mp4';
  document.body.appendChild(a);
  a.click();
  window.URL.revokeObjectURL(url);
})
.catch(error => {
  console.error('Error merging videos:', error);
  // You can display this error to the user in your application.
});

Server Health Check

This service relies on ffmpeg for video processing. After publishing, use this button to check if it's correctly installed and accessible on the server.