Video Compression API

API Documentation

This API allows you to upload and compress video files. You can either upload a video file directly through the form below or provide a URL if the video is stored elsewhere.

Using the HTML Forms

To use the forms, select a video file or enter a video URL. Click "Upload!" or "Submit URL!" to compress the video.

Example Request

1. Select a video file or enter a video URL.

2. Click the appropriate button to submit.

API Endpoint Details

The API endpoints for uploading and compressing videos are:

POST /compress-video
POST /compress-video-path

Request Body

Use the forms below to submit a video file or URL:

Form Data Example
curl -F "video=@/path/to/your/video.mp4" http://localhost:5000/compress-video
URL Example
curl -X POST -H "Content-Type: application/json" -d '{"videoPath": "http://example.com/path/to/video.mp4"}' http://localhost:5000/compress-video-path

Response

Upon successful compression, the response will contain the URL where you can download the compressed video:

Success Response
{
    "statusCode": 200,
    "text": "Video compressed successfully. URL: /temp/compressed-video.mp4"
}

If there's an error, you'll receive an error message with a status code of 500:

Error Response
{
    "statusCode": 500,
    "text": "An error occurred during processing"
}

Upload and Compress Video

Upload a Video File

Provide a Video URL