Skip to main content

Transcode Video

Curated Reference

This page is maintained from curated documentation data.

POSTffmpeg.transcode_video

Convert source video to target format and codec profile.

Request Body

{
"jsonrpc": "2.0",
"id": "ffmpeg-transcode-video-example",
"method": "tools/call",
"params": {
"name": "ffmpeg.transcode_video",
"arguments": {
"source_url": "https://cdn.example.com/video/demo.mov",
"target_format": "mp4",
"video_codec": "h264",
"audio_codec": "aac",
"resolution": "1920x1080"
}
}
}

Arguments Schema

{
"type": "object",
"required": [
"source_url",
"target_format"
],
"properties": {
"source_url": {
"type": "string"
},
"target_format": {
"type": "string"
},
"video_codec": {
"type": "string"
},
"audio_codec": {
"type": "string"
},
"resolution": {
"type": "string"
}
},
"additionalProperties": false
}

Code Examples

curl -X POST 'https://madpanda3d.com/lab/mad-mcps/portal/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "ffmpeg-transcode-video-example",
"method": "tools/call",
"params": {
"name": "ffmpeg.transcode_video",
"arguments": {
"source_url": "https://cdn.example.com/video/demo.mov",
"target_format": "mp4",
"video_codec": "h264",
"audio_codec": "aac",
"resolution": "1920x1080"
}
}
}'

Example Responses

{
"ok": true,
"output_url": "https://cdn.example.com/output/demo-1080.mp4",
"size_bytes": 18455672
}