Transcode Video
Immutable Catalog + Curated Guide
This lossless descriptor comes from the active Portal catalog and is enhanced with reviewed examples.
- Contract tier:
agent_ready - Risk:
write - Catalog version:
2026-07-12.3 - Descriptor hash:
401a1189db42529f3e271882d6d3d618af1f257f18bd8db73dd98fa09bfe53bc
Convert source video to target format and codec profile.
Request Body
{
"jsonrpc": "2.0",
"id": "ffmpeg-ffmpeg-transcode-example",
"method": "tools/call",
"params": {
"name": "ffmpeg.ffmpeg_transcode",
"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": [
"asset_id",
"preset"
],
"properties": {
"preset": {
"type": "string",
"description": "Exact approved FFmpeg preset name."
},
"asset_id": {
"type": "string",
"description": "Stable ID of one staged FFmpeg media asset."
},
"priority": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional queue priority configured by the server, such as urgent or batch."
}
},
"additionalProperties": false
}
Output Schema
{
"type": "object",
"required": [
"job_id",
"cache_hit"
],
"properties": {
"job_id": {
"type": "string",
"description": "Stable ID used with the job readback tools."
},
"cache_hit": {
"type": "boolean",
"description": "Whether a matching completed result was reused."
},
"output_asset_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Completed output asset IDs when immediately available from cache."
}
},
"additionalProperties": false
}
Code Examples
- cURL
- Node.js
- Python
curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "ffmpeg-ffmpeg-transcode-example",
"method": "tools/call",
"params": {
"name": "ffmpeg.ffmpeg_transcode",
"arguments": {
"source_url": "https://cdn.example.com/video/demo.mov",
"target_format": "mp4",
"video_codec": "h264",
"audio_codec": "aac",
"resolution": "1920x1080"
}
}
}'
const response = await fetch('https://portal.madpanda3d.com/api/mcp', {
method: 'POST',
headers: {
Authorization: 'Bearer mad_live_***',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "ffmpeg-ffmpeg-transcode-example",
"method": "tools/call",
"params": {
"name": "ffmpeg.ffmpeg_transcode",
"arguments": {
"source_url": "https://cdn.example.com/video/demo.mov",
"target_format": "mp4",
"video_codec": "h264",
"audio_codec": "aac",
"resolution": "1920x1080"
}
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = 'https://portal.madpanda3d.com/api/mcp'
headers = {
'Authorization': 'Bearer mad_live_***',
'Content-Type': 'application/json',
}
payload = {
"jsonrpc": "2.0",
"id": "ffmpeg-ffmpeg-transcode-example",
"method": "tools/call",
"params": {
"name": "ffmpeg.ffmpeg_transcode",
"arguments": {
"source_url": "https://cdn.example.com/video/demo.mov",
"target_format": "mp4",
"video_codec": "h264",
"audio_codec": "aac",
"resolution": "1920x1080"
}
}
}
response = requests.post(url, headers=headers, json=payload, timeout=60)
print(response.json())
Example Responses
- 200 Success
- 422 Unsupported Profile
{
"ok": true,
"output_url": "https://cdn.example.com/output/demo-1080.mp4",
"size_bytes": 18455672
}
{
"ok": false,
"error": "validation_error",
"message": "target_format not supported"
}