Caption Burn-In - Content Management
Caption Burn-In
Render caption text permanently into the video frame. Useful for social media distribution where players may not support subtitle tracks.
KalturaRenderCaptionAttributes
| Parameter | Type | Description |
|---|---|---|
objectType | string | KalturaRenderCaptionAttributes |
captionAssetId | string | ID of the captionAsset to burn in (required) |
fontSize | int | Font size in pixels |
fontColor | string | Text color in ASS format: &HBBGGRR& |
fontName | string | Font family name |
positionX | int | Horizontal position (pixels from left) |
positionY | int | Vertical position (pixels from top) |
borderStyle | int | 1=OUTLINE, 3=OPAQUE_BOX |
borderColor | string | Border/box color in ASS format |
bold | int | Bold weight (0=normal, 1=bold) |
italic | int | Italic (0=normal, 1=italic) |
ASS Color Format
Colors use &HBBGGRR& (hex, blue-green-red reversed from RGB):
| Color | ASS Value |
|---|---|
| White | &H00FFFFFF& |
| Black | &H00000000& |
| Yellow | &H0000FFFF& |
| Red | &H000000FF& |
Burn-In Example
curl -X POST "$KALTURA_SERVICE_URL/service/media/action/addContent" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "entryId=$KALTURA_ENTRY_ID" \
-d "resource[objectType]=KalturaOperationResource" \
-d "resource[resource][objectType]=KalturaEntryResource" \
-d "resource[resource][entryId]=$KALTURA_SOURCE_ENTRY_ID" \
-d "resource[resource][flavorParamsId]=0" \
-d "resource[operationAttributes][0][objectType]=KalturaClipAttributes" \
-d "resource[operationAttributes][0][offset]=0" \
-d "resource[operationAttributes][0][duration]=60000" \
-d "resource[operationAttributes][0][captionAttributes][objectType]=KalturaRenderCaptionAttributes" \
-d "resource[operationAttributes][0][captionAttributes][captionAssetId]=$KALTURA_CAPTION_ASSET_ID" \
-d "resource[operationAttributes][0][captionAttributes][fontSize]=24" \
-d "resource[operationAttributes][0][captionAttributes][fontColor]=&H00FFFFFF&" \
-d "resource[operationAttributes][0][captionAttributes][borderStyle]=1" \
-d "resource[operationAttributes][0][captionAttributes][borderColor]=&H00000000&"