3. Initiate transcoding
Once your source files are successfully uploaded to the S3 bucket and you've created a Viewable, you're ready to initiate the transcoding process.
1. Analyze Your Source Files
Constructing the transcoding request body correctly is crucial. To do this, you need a detailed understanding of your media container and the audio, video, and subtitle tracks inside it.
We recommend using a tool like ffprobe
(part of the FFmpeg toolkit) to inspect your media files.
ffprobe -v error -show_format -show_streams input_file.mp4
This will provide detailed metadata to help you accurately define the tracks section in your request.
2. Construct the Transcoding Request
Once you have the required track information, submit your transcoding request using this endpoint:
Key fields to include:
viewableId
— The ID returned when you created the Viewable.tracks
— Describes the video, audio, and subtitle files you've uploaded.
Important:
The
tracks
section must match the actual uploaded files. If the configuration is incorrect, the transcoding process will fail.
You may also include any subtitle files in the request if they’ve already been uploaded to the S3 bucket.
Upon success, the response will include the Asset ID for the resulting VOD Playable.
3. Track Transcoding Progress
You can monitor the progress of your transcoding job in two ways:
Option A: Via the Magine Pro Console
Option B: Programmatically via API
Use the Asset ID from the previous step with this endpoint:
🔗 Get VOD
This will return the current status of the VOD asset.
4. Add or Remove Subtitles After Transcoding
If you need to update subtitle tracks after the transcoding is complete, use the following endpoints:
🔗 Subtitle Management Endpoints
Note:
When updating subtitles after transcoding, you must Base64-encode the full subtitle file and include it directly in the request body — rather than uploading it to S3.
📁 Example
Transcode request body
{
"sourceId": "test_0001",
"viewableId": "075753f9-a410-467e-b7bb-0d9c50d015ad",
"drm": true,
"inputs": [
{
"name": "input_1",
"source": "com-magine-partners-magine-pro-demo/vod/test_0001/magninepro-eng.srt",
"storage": "s3"
},
{
"name": "input_2",
"source": "com-magine-partners-magine-pro-demo/vod/test_0001/magninepro-spa.srt",
"storage": "s3"
},
{
"name": "input_3",
"source": "com-magine-partners-magine-pro-demo/vod/test_0001/maginepro-short.mp4",
"storage": "s3"
}
],
"tracks": {
"audio": [
{
"name": "input_3/audio_1",
"input": "input_3",
"channels": 2,
"language": "eng",
"containerIndex": 1
}
],
"video": {
"name": "input_3/video",
"input": "input_3",
"frameRate": {
"numerator": 24,
"denominator": 1
},
"interlaced": true,
"resolution": {
"width": 1280,
"height": 720
}
},
"subtitles": [
{
"name": "input_1/subtitle_eng",
"input": "input_1",
"language": "eng"
},
{
"name": "input_2/subtitle_spa",
"input": "input_2",
"language": "spa"
}
]
}
}
Updated 18 days ago