Video Overlay

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

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <!-- Format params -->
        <overlay>
            <!-- Common overlay params -->
            <overlay_source>[Overlay1Source]</overlay_source> <!-- required-->
            <overlay_left>[Overlay1PositionXfromLeft]</overlay_left>
            <overlay_right>[Overlay1PositionXfromRight]</overlay_right>
            <overlay_top>[Overlay1PositionYfromTop]</overlay_top>
            <overlay_bottom>[Overlay1PositionYfromBottom]</overlay_bottom>
            <size>[Overlay1Size]</size>
            <keep_audio>[0,1]</keep_audio>
        </overlay>
        <!-- ... -->
        <overlay>
            <!-- Overlay params -->
        </overlay>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "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
                }
            ]
        }
    }
}

Parameter

Description

Allowed Values

Default Value

overlay_source

Specify a valid URL to the overlay source file.

Valid URL.

None

overlay_left

Specify 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_right

Specify the position x of right overlay's sidewith starting point from right.

Non-negative integer or % from output video width

None

overlay_top

Specify the position y of top overlay's side (with starting point from top).

Non-negative integer, % from output video width, or ‘center’

None

overlay_bottom

Specify the position y of bottom overlay's side with starting point from bottom.

Non-negative integer or % from output video width

None

size

Specify the overlay size in pixels.

WxH where W and H – positive integers, or % from result video width.

None

keep_audio

Keep overlay's audio.

0,1

0

❗️

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.