Media
Compress video files by reducing file size while maintaining quality using CRF, resolution scaling, and codec optimization
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/video-compressor' \
-F 'file=@/path/to/videoFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/video-compressor' \
-F 'videoFile=/path/to/file.ext' \
-F 'crf=23' \
-F 'preset=medium' \
-F 'scalePercent=100' \
-F 'outputFormat=mp4' \
-F 'audioBitrate=128' \
-F 'removeAudio=false'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/video-compressor| Name | Type | Required | Description |
|---|---|---|---|
| videoFile | fileupload required | Yes | — |
| crf | range | No | Lower = better quality, larger file. 18-28 is recommended (23 is default for H.264) |
| preset | select | No | — |
| scalePercent | range | No | Scale down resolution to reduce file size further (100% = original size) |
| outputFormat | select |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-video-compressor": {
"name": "video-compressor",
"description": "Compress video files by reducing file size while maintaining quality using CRF, resolution scaling, and codec optimization",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=video-compressor",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "video-compressor",
"arguments": {
"videoFile": "https://example.com/file.ext",
"crf": 23,
"preset": "medium",
"scalePercent": 100,
"outputFormat": "mp4",
"audioBitrate": 128,
"removeAudio": false
}
}
}| — |
| audioBitrate | range | No | Audio quality (lower = smaller file, 128kbps is standard) |
| removeAudio | checkbox | No | Remove audio track completely for maximum compression |
File result
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]