18 August 2016
Main/alternate source language settings for advanced_hls output
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>[MediaAction]</action> <!-- required-->
<format>
<output>advanced_hls</output>
<main_source>
<language>[Language]</language>
</main_source>
<alternate_source>
<language>[Language]</language>
</alternate_source>
</format>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "[MediaAction]",
"format": {
"output": "advanced_hls",
"main_source": {
"language": "[Language]"
},
"alternate_source": {
"language": "[Language]"
}
}
}
}
Option Name | Description | Allowed Values | Default Values |
---|---|---|---|
Main source params | |||
Language | Main source Language attribute. | Valid language name | |
Alternate source params | |||
Language | Alternate source Language attribute. | Valid language name |
Note
This article acceptable only for Reserved Instances users!
To force failover media processing to Encoding.com Instances you can set high in the section.
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>[MediaAction]</action> <!-- required-->
<priority>high</priority>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "[MediaAction]",
"priority": "high"
}
}
To force encoder process multiple source segments in parallel, add <multijob_workflow>yes</multijob_workflow> to the . By default media would be processed as standard multisource media. Also you can set specific part of source as program segment by setting start and end params in source URL. E.g. http://[SourcePath]/[SourceFile]?start=[SegmentStartSecond]&end=[SegmentEndSecond]
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>[Action]</action> <!-- required-->
<source>[SourceSegment][SegmentDuration]</source>
<!-- Multiple source segments -->
<source>[SourceSegment][SegmentDuration]</source>
<multijob_workflow>[yes|no]</multijob_workflow>
<format>
<output>advanced_hls</output> <!-- required-->
</format>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "[Action]",
"source": [
"[SourceSegment][SegmentDuration]",
"[SourceSegment][SegmentDuration]"
],
"multijob_workflow": "[yes|no]",
"format": {
"output": "advanced_hls"
}
}
}
Constant framerate for H.264 codec
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>[Action]</action> <!-- required-->
<format>
<output>[Output]</output> <!-- required-->
<video_codec_parameters>
<force-cfr>[yes|no]</force-cfr>
</video_codec_parameters>
</format>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "[Action]",
"format": {
"output": "[Output]",
"video_codec_parameters": {
"force-cfr": "[yes|no]"
}
}
}
}
Option Name | Description | Allowed Values | Default Values |
---|---|---|---|
force-cfr | Force keep constant framerate | yes,no | no |
Encryption method and encryption initialization vector for advanced_hls output
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>[Action]</action> <!-- required-->
<format>
<output>advanced_hls</output>
<encryption_method>[aes-128-cbc|sample-aes]</encryption_method>
<encryption_iv>[Hexidecimal string]</encryption_iv>
</format>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "[Action]",
"format": {
"output": "advanced_hls",
"encryption_method": "[aes-128-cbc|sample-aes]",
"encryption_iv": "[Hexidecimal string]"
}
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
Format params | |||
encryption_method | Encryption method | aes-128-cbc, sample-aes | aes-128-cbc |
encryption_iv | Encryption initialization vector | 32 hexidecimal characters ([0-9a-f]) | aes-128-cbc - sequence number of the segment file, sample-aes - randomly generated value |
Manifest settings for advanced_hls output
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>[Action]</action> <!-- required-->
<format>
<output>advanced_hls</output>
<stream>
<!-- Stream params -->
<!-- Manifests fields -->
<manifest>
<basename>[BaseName]</basename> <!-- required-->
<add_to_manifest>[ManifestName]:[Position],[ManifestName]:[Position]</add_to_manifest>
<destination>[ManifestDestination]</destination>
</manifest>
<!-- Multiple manifests may be included -->
<manifest>
<!-- manifes tparams -->
</manifest>
</stream>
<!-- Manifests fields -->
<manifest>
<basename>[BaseName]</basename> <!-- required-->
<destination>[ManifestDestination]</destination>
<add_audio_only>[yes|no]</add_audio_only>
</manifest>
<!-- Multiple manifests may be included -->
<manifest>
<!-- manifest params -->
</manifest>
</format>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "[Action]",
"format": {
"output": "advanced_hls",
"stream": {
"manifest": [
{
"basename": "[BaseName]",
"add_to_manifest": "[ManifestName]:[Position],[ManifestName]:[Position]",
"destination": "[ManifestDestination]"
},
" "
]
},
"manifest": [
{
"basename": "[BaseName]",
"destination": "[ManifestDestination]",
"add_audio_only": "[yes|no]"
},
" "
]
}
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
Main manifests params | |||
basename | Main manifest basename | String | |
destination | Main manifest destination | Valid destination URL | |
add_audio_only | Add audio only stream to this manifest | yes, no | yes |
Stream manifests params | |||
basename | Stream manifest basename | String | |
add_to_manifest | Add to one or several specified main manifests | Comma sepparated list of manifests. Optionally manifest's position could be specified as [ManifestName]:[Position] | |
destination | Stream manifest destination | Valid destination URL |
Direct copy for closed captions:
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>[Action]</action> <!-- required-->
<format>
<!-- Format fields -->
<closed_captions>
<direct_copy>[yes|no]</direct_copy>
</closed_captions>
</format>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "[Action]",
"format": {
"closed_captions": {
"direct_copy": "[yes|no]"
}
}
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
direct_copy | If video has Closed Captions data stored in cea-608/cea-708 tracks, system will directly copy closed captions to the output. | yes, no | no |
Added 3 new requests:
Action | Description |
---|---|
GetQueueTime | Get current queue statistics. |
GetQueueStats | Get queue statistics for selected date range. |
SetHostKey | Add SSH RSA key for host, that could be used as destination for your media. |
SetHostKey
This request sets private SSH RSA key for specified host, that could be used as media destination.
Request:
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action_user_id>[ActionUserID]</action_user_id>
<action>SetHostKey</action>
<hostname>[HostName]</hostname>
<username>[UserName]</username>
<key_data>
<![CDATA[
-----BEGIN RSA PRIVATE KEY-----
<!--RSA Key Data-->
-----END RSA PRIVATE KEY-----
]]>
</key_data>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action_user_id": "[ActionUserID]",
"action": "SetHostKey",
"hostname": "[HostName]",
"username": "[UserName]",
"key_data": "-----BEGIN RSA PRIVATE KEY----------END RSA PRIVATE KEY-----"
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
hostname | Host name | Valid hostname | |
username | Auth user name | Valid username | |
key_data | RSA key | Valid RSA key |
Response:
<?xml version="1.0"?>
<response>
<action>sethostkey</action>
<status>Success</status>
</response>
{
"response": {
"action": "sethostkey",
"status": "Success"
}
}
GetQueueTime
This request returns queue statistics for currently processing medias
Request:
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>GetQueueTime</action>
<mediaid>[MediaID]</mediaid> <!-- Optional -->
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "GetQueueTime",
"mediaid": "[MediaID]"
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
mediaid | Media IDs lsit | Comma separated list |
Response:
Note
If there are no medias that waiting for download or encode then request will respond with error 'The queue is empty!'
- If not specified, all medias in queue will be returned
- and
- * 'download' – media sources are waiting for download * 'encode' – media sources downloaded, media tasks are waiting for encode
- – 'yes' if processing limit exceeded
<?xml version="1.0"?>
<response>
<average>[Average Queue Time]</average>
<averageSeconds>[Average Queue Time in seconds]</averageSeconds>
<media>
<id>[Media ID]</id>
<average>[Average Media Queue Time]</average>
<averageSeconds>[Average Media Queue Time in seconds]</averageSeconds>
<job>
<id>[Task IDs]</id>
<type>[Download|Encode]</type>
<status>[Task Status]</status>
<format>[Task Format]</format>
<overlimit>[yes|no]</overlimit>
<time>[Task Queue Time]</time>
<timeSeconds>[Task Queue Time in seconds]</timeSeconds>
</job>
</media>
<media>
<!-- Media list -->
</media>
</response>
{
"response": {
"average": "[Average Queue Time]",
"averageseconds": "[Average Queue Time in seconds]",
"media": [
{
"id": "[Media ID]",
"average": "[Average Media Queue Time]",
"averageseconds": "[Average Media Queue Time in seconds]",
"job": {
"id": "[Task IDs]",
"type": "[Download|Encode]",
"status": "[Task Status]",
"format": "[Task Format]",
"overlimit": "[yes|no]",
"time": "[Task Queue Time]",
"timeseconds": "[Task Queue Time in seconds]"
}
}
]
}
}
GetQueueStats
This request returns queue statistics for selected date range.
Request:
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>GetQueueStats</action>
<mediaid>[MediaID]</mediaid> <!-- Optional -->
<date_from>[YYYY-MM-DD HH:MM:SS]</date_from> <!-- Optional -->
<date_to>[YYYY-MM-DD HH:MM:SS]</date_to> <!-- Optional -->
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "GetQueueStats",
"mediaid": "[MediaID]",
"date_from": "[YYYY-MM-DD HH:MM:SS]",
"date_to": "[YYYY-MM-DD HH:MM:SS]"
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
mediaid | Media IDs lsit | Comma separated list | |
date_from | Date Range start date | Valid date in format 'YYYY-MM-DD HH:MM:SS' | One month before <date_to> |
date_to | Date Range end date | Valid date in format 'YYYY-MM-DD HH:MM:SS' | Now |
Response:
- If specified:
<?xml version="1.0"?>
<response>
<date_from>[Date Range Start]</date_from>
<date_to>[Date Range End]</date_to>
<media>
<id>[MediaID]</id>
<average>[Average Queue Time]</average>
<averageSeconds>[Average Queue Time in seconds]</averageSeconds>
</media>
<media>
<!-- Media list -->
</media>
</response>
{
"response": {
"date_from": "[Date Range Start]",
"date_to": "[Date Range End]",
"media": [
{
"id": "[MediaID]",
"average": "[Average Queue Time]",
"averageseconds": "[Average Queue Time in seconds]"
}
]
}
}
- If not specified:
<?xml version="1.0"?>
<response>
<date_from>[Date Range Start]</date_from>
<date_to>[Date Range End]</date_to>
<media>
<id>[MediaIDs comma separated list]</id>
<average>[Average Queue Time]</average>
<averageSeconds>[Average Queue Time in seconds]</averageSeconds>
</media>
</response>
{
"response": {
"date_from": "[Date Range Start]",
"date_to": "[Date Range End]",
"media": {
"id": "[MediaIDs comma separated list]",
"average": "[Average Queue Time]",
"averageseconds": "[Average Queue Time in seconds]"
}
}
}