Media
Заменяет аудиодорожку в видеофайле на новый аудиофайл, сохраняя исходное видео
Вызовите этот инструмент из своего кода на трёх языках.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/video-audio-replace' \
-F 'file=@/path/to/videoFile.ext'
curl -X POST 'https://api.elysiatools.com/upload/video-audio-replace' \
-F 'file=@/path/to/audioFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/ru/api/tools/video-audio-replace' \
-F 'videoFile=/path/to/file.ext' \
-F 'audioFile=/path/to/file.ext' \
-F 'outputFormat=mp4' \
-F 'audioVolume=100' \
-F 'videoCopy=true'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/video-audio-replace| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| videoFile | fileнужна загрузка | Да | — |
| audioFile | fileнужна загрузка | Да | — |
| outputFormat | select | Нет | — |
| audioVolume | range | Нет | Настройка громкости аудио (0-500%, 100% = оригинал) |
| videoCopy | checkbox | Нет | Копировать видеопоток без перекодирования (быстрее, без потери качества) |
Файловый результат
{
"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)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-video-audio-replace": {
"name": "video-audio-replace",
"description": "Заменяет аудиодорожку в видеофайле на новый аудиофайл, сохраняя исходное видео",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=video-audio-replace",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "video-audio-replace",
"arguments": {
"videoFile": "https://example.com/file.ext",
"audioFile": "https://example.com/file.ext",
"outputFormat": "mp4",
"audioVolume": 100,
"videoCopy": true
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]