Encoding.com API Documentation

The Encoding.com API

Welcome to the EDC developer hub. You'll find comprehensive guides and documentation to help you start working with EDC as quickly as possible, as well as support if you get stuck. Let's jump right in!

API Reference    

14 May 2020

6 months ago by Encoding.com Product Team #2

Float value vtt_segment_duration

Now value of <vtt_segment_duration /> in the <closed_caption /> block can be a float number.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>[OutputFormat]</output> <!-- required-->
        <!-- Format params -->
        <closed_captions>
            <vtt_segment_duration>[SegmentDuration]</vtt_segment_duration>
            <!-- closed captions params -->
        </closed_captions>
        <!-- Multiple closed captions params may be included in output format -->
        <closed_captions>
            <!-- closed captions params -->
        </closed_captions>
    </format></query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "[OutputFormat]", // required
            // Format params
            "closed_captions": [
                {
                    "vtt_segment_duration": "[SegmentDuration]"
                    // closed captions params,
                },
                {
                    // closed captions params
                }
            ]
        }
    }
}

Parameter

Description

Allowed Values

Default Value

vtt_segment_duration

Sets segments duration for WebVTT Closed Captions.

Positive float number

none

Replace real bitrate value in MPD manifests with specified in request

Added option that allows replacing calculated bitrate in MPD manifests for advanced_dash and advanced_fmp4 output formats with one specified in the request.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>[advanced_dash|advanced_fmp4]</output>
        <destination>[DestinationURL</destination> <!-- required-->
        <manifest>
            <replace_bitrate>[yes|no]</replace_bitrate>
            <!-- manifest params -->
        </manifest>
        <!-- Multiple manifests may be included -->
        <manifest>
           <!-- manifest params -->
        </manifest>
        <!-- Format params -->
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "[advanced_dash|advanced_fmp4]", // required
            "destination": "[DestinationURL]", // required
            "manifest": [
                {
                    "replace_bitrate": "[yes|no]"
                    // manifest params
                },
                {
                    // manifest params
                }
                // Multiple manifests may be included
            ]
            // Format params
        }
    }
}

Parameter

Description

Allowed Values

Default Value

replace_bitrate

Replace the calculated bitrate with the value specified in the request.

yes, no

no

🚧

For replace_bitrate parameter

<replace_bitrate /> parameter available only for advanced_dash and dash manifests of advanced_fmp4 output formats.

Add CHANNELS attribute to HLS manifest

Added option that allows adding CHANNELS attribute to the #EXT-X-MEDIA tag in the HLS manifest for advanced_hls, fmp4_hls, and advanced_fmp4.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>[advanced_hls|fmp4_hls|advanced_fmp4]</output>
        <destination>[DestinationURL</destination> <!-- required-->
        <manifest>
            <add_audio_channels>[yes|no|auto]</add_audio_channels>
            <!-- manifest params -->
        </manifest>
        <!-- Multiple manifests may be included -->
        <manifest>
           <!-- manifest params -->
        </manifest>
        <!-- Format params -->
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "[advanced_hls|fmp4_hls]", // required
            "destination": "[DestinationURL]", // required
            "manifest": [
                {
                    "add_audio_channels": "[yes|no|auto]"
                    // manifest params
                },
                {
                    // manifest params
                }
                // Multiple manifests may be included
            ]
            // Format params
        }
    }
}

Parameter

Description

Allowed Values

Default Value

add_audio_channels

Add CHANNELS attribute to #EXT-X-MEDIA tag

yes – always add
no – newer add
auto – add if <playlist_version /> is equal or greater than 7

auto

🚧

For add_audio_channels parameter

<add_audio_channels /> parameter available only for advanced_hls, fmp4_hls, and advanced_fmp4 output formats.

Thumbnails Set

Added special output format that allows creating several thumbnails in one format.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>thumbnailset</output>
        <thumbnail>
            <time>[Time]</time>
            <width>[Width]</width>
            <height>[Height]</height>
            <quality>[Quality]</quality>
            <file_extension>jpg</file_extension>
            <keep_aspect_ratio>[yes|no]</keep_aspect_ratio>
            <destination>[DestinationURL]</destination>
        </thumbnail>
        <!-- Multiple thumbnails may be included -->
        <thumbnail>
           <!-- thumbnail params -->
        </thumbnail>
        <!-- Format params -->
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "thumbnailset", // required
            "thumbnail": [
                {
                    "time": "[Time]",
                    "width": "[Width]",
                    "height": "[Height]",
                    "quality": "[Quality]",
                    "file_extension": "jpg",
                    "keep_aspect_ratio": "[yes|no]",
                    "destination": "DestinationURL]"
                },
                {
                    // thumbnail params
                }
                // Multiple thumbnails params may be included
            ]
            // Format params
        }
    }
}

Parameter

Description

Allowed Values

Default Value

time

Specify the timestamp in seconds, percentage, or interval to capture thumbnails.

hh:mm:ss.ms – once created thumbnail from given timestamp.
Example:

N% – Positive percentage number from 1 to 100%.
Will generate thumbnail on N% of video duration.
Example:

N – Positive number greater than 0.01.
Will generate thumbnail on N second.
Example:

N! – Positive integer number greater or equals to 1.
Will generate thumbnail on every N second.
Example:

5

width

Specify the thumbnail width in pixels.

Positive integer

none

height

Specify the thumbnail height in pixels.

Positive integer

none

quality

Image Quality

Positive integer between 1 and 100

83

file_extension

File Extension

jpg

none

keep_aspect_ratio

Keep image aspect ratio

yes, no

no

destination

Thumbnail destination

Valid URL

none