Video Overlay

Overlay one video over another, similar to a picture in picture effect.

<?xml version="1.0"?>
<query>
    <userid>&lt;UserID&gt;</userid> {/* required */}
    <userkey>&lt;UserKey&gt;</userkey> {/* required */}
    <action>&lt;Action&gt;</action> {/* required */}
    <source>&lt;SourceFile&gt;</source> {/* required */}
    <format>
        {/* Format params */}
        <overlay>
            {/* Common overlay params */}
            <overlay_source>&lt;Overlay1Source&gt;</overlay_source> {/* required */}
            <overlay_left>&lt;Overlay1PositionXfromLeft&gt;</overlay_left>
            <overlay_right>&lt;Overlay1PositionXfromRight&gt;</overlay_right>
            <overlay_top>&lt;Overlay1PositionYfromTop&gt;</overlay_top>
            <overlay_bottom>&lt;Overlay1PositionYfromBottom&gt;</overlay_bottom>
            <size>&lt;Overlay1Size&gt;</size>
            <keep_audio>[0,1]</keep_audio>
        </overlay>
        {/* ... */}
        <overlay>
            {/* Overlay params */}
        </overlay>
    </format>
</query>
{
    "query": {
        "userid": "[UserID]",
        "userkey": "[UserKey]",
        "action": "[Action]",
        "source": "[SourceFile]", // required
        "format": {
            "overlay": [
                {
                    // Common overlay params
                    "overlay_source": "[Overlay1Source]",
                    "overlay_left": "[Overlay1PositionXfromLeft]",
                    "overlay_right": "[Overlay1PositionXfromRight]",
                    "overlay_top": "[Overlay1PositionYfromTop]",
                    "overlay_bottom": "[Overlay1PositionYfromBottom]",
                    "size": "[Overlay1Size]",
                    "keep_audio": "[0,1]"
                },
                {
                    // Overlay params
                }
            ]
        }
    }
}
ParameterDescriptionAllowed ValuesDefault Value
overlay_sourceSpecify a valid URL to the overlay source file.Valid URL.None
overlay_leftSpecify the position x of left overlay's side with starting point from left.Non-negative integer, or % from output video width, or ‘center’None
overlay_rightSpecify the position x of right overlay's sidewith starting point from right.Non-negative integer or % from output video widthNone
overlay_topSpecify the position y of top overlay's side (with starting point from top).Non-negative integer, % from output video width, or ‘center’None
overlay_bottomSpecify the position y of bottom overlay's side with starting point from bottom.Non-negative integer or % from output video widthNone
sizeSpecify the overlay size in pixels.WxH where W and H – positive integers, or % from result video width.None
keep_audioKeep overlay's audio.0,10

❗️

For overlay_source parameter

<overlay_source /> is a required field.

👍

For overlay_source parameter

Use ‘RLE(qtrle)’ video for alpha-transparent overlay.

🚧

For overlay_right and overlay_left parameters

If <overlay_right /> and <overlay_left /> are specified simultaneously – <overlay_right /> will be ignored.

🚧

For overlay_bottom and overlay_top parameters

If <overlay_bottom /> and <overlay_top /> are specified simultaneously – <overlay_bottom /> will be ignored.

❗️

For size parameter

Size of overlay source can’t be greater then size of output media.