Skip to main content
View as Markdown

Dimension Control - Content Management

Dimension Control​

Control output resolution when composing or concatenating sources with different dimensions.

Dimension Attribute Types​

TypeBehavior
KalturaAspectRatioCropAttributesCrops source to target aspect ratio (removes edges)
KalturaAspectRatioScaleAttributesScales to fit target ratio with letterbox/pillarbox (adds black bars)
KalturaResolutionCropAttributesCrops to exact pixel dimensions

Parameters​

KalturaAspectRatioCropAttributes / KalturaAspectRatioScaleAttributes:

ParameterTypeDescription
aspectRatioXintWidth ratio component (e.g., 16)
aspectRatioYintHeight ratio component (e.g., 9)

KalturaResolutionCropAttributes:

ParameterTypeDescription
widthintTarget width in pixels
heightintTarget height in pixels

Usage​

Dimension attributes apply to KalturaOperationResources (multi-clip concat) via the dimensionsAttributes field:

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]=KalturaOperationResources" \
-d "resource[dimensionsAttributes][objectType]=KalturaAspectRatioCropAttributes" \
-d "resource[dimensionsAttributes][aspectRatioX]=16" \
-d "resource[dimensionsAttributes][aspectRatioY]=9" \
-d "resource[resources][0][objectType]=KalturaOperationResource" \
-d "resource[resources][0][resource][objectType]=KalturaEntryResource" \
-d "resource[resources][0][resource][entryId]=$KALTURA_SOURCE_ENTRY_1" \
-d "resource[resources][0][resource][flavorParamsId]=0" \
-d "resource[resources][0][operationAttributes][0][objectType]=KalturaClipAttributes" \
-d "resource[resources][0][operationAttributes][0][offset]=0" \
-d "resource[resources][0][operationAttributes][0][duration]=10000" \
-d "resource[resources][1][objectType]=KalturaOperationResource" \
-d "resource[resources][1][resource][objectType]=KalturaEntryResource" \
-d "resource[resources][1][resource][entryId]=$KALTURA_SOURCE_ENTRY_2" \
-d "resource[resources][1][resource][flavorParamsId]=0" \
-d "resource[resources][1][operationAttributes][0][objectType]=KalturaClipAttributes" \
-d "resource[resources][1][operationAttributes][0][offset]=0" \
-d "resource[resources][1][operationAttributes][0][duration]=10000"