Auto Crop

Detect and remove video letterbox.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <auto_crop>
            <enable>[yes|no]</enable>
            <crop_type>[CropType]</crop_type>
            <limit>[Detection]</limit>
            <round>[CropRound]</round>
        </auto_crop>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "auto_crop": {
                "enable": "[yes|no]",
                "crop_type": "[CropType]",
                "limit": "[Detection]",
                "round": "[CropRound]"
            }
        }
    }
}

Parameter

Description

Allowed Values

Default Value

enable

Enable auto-cropping.

yes, no

no

crop_type

Specify cropping type.

resize - crop letterbox, then crop to keep width/height ratio then re-scaling to fit output size.
stretch - crop letterbox, then re-scaling without saving of width/heigth ratio to fit output size
crop - only letterbox cropping

resize

limit

Higher black value threshold.

Positive integer number from 0 to 128. Value greater than 128 will be changed to 128.

0 – Pixel must be absolutely black to be classified as black.

128 – The lightest pixels would be classified as black.

24

round

The value which the width/height should be divisible by.

Positive integer number.

16

🚧

Note for crop_type

If <crop_type /> set to crop and specified for output then video will be re-scaled as though <crop_type /> was set to stretch.

❗️

Note

Auto cropping will be ignored if <crop_* /> parameters are specified.