02 February 2023
almost 2 years ago by Encoding.com Product Team #2
TTML and MCC caption to caption conversion
Added support new output closed captions types: ttml and mcc.
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>AddMedia</action> <!-- required-->
<source>[ClosedCaptionsSourceFile]</source> <!-- required-->
<format>
<output>closed_captions</output> <!-- required-->
<destination>[DestinationURL]</destination> <!-- required-->
<type>[ttml|mcc]</type>
<ttml_profile>[TTMLProfile]</ttml_profile>
<!-- format params -->
</format>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<key>>", // required
"action": "AddMedia", // required
"source": "[ClosedCaptionsSourceFile]", // required
"format": {
"output": "closed_captions", // required
"destination": "[DestinationURL]", // required
"type": "[ttml|mcc]",
"ttml_profile": "[TTMLProfile]"
// format params
}
}
}
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
type | Convert closed captions to specified type | srt, scc, webvtt, dfxp, ttml, mcc | srt |
ttml_profile | TTML profile | basic, smpte_st2052, smpte_ismc1, smpte_ismc1_1, smpte_itt | basic |
For ttml_profile
The <ttml_profile /> parameter applied only if <type /> set to ttml.
Source Teletext page ID
Added ability to set source teletext page id to extract or copy for muxed-in closed caption and caption to caption output format.
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>AddMedia</action> <!-- required-->
<source>[ClosedCaptionsSourceFile]</source> <!-- required-->
<format>
<output>closed_captions</output> <!-- required-->
<destination>[DestinationURL]</destination> <!-- required-->
<type>[ttml|mcc]</type>
<teletext_page_id>[PageID]</teletext_page_id>
<!-- format params -->
</format>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<key>>", // required
"action": "AddMedia", // required
"source": "[ClosedCaptionsSourceFile]", // required
"format": {
"output": "closed_captions", // required
"destination": "[DestinationURL]", // required
"teletext_page_id": "[PageID]"
// format params
}
}
}
<?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-->
<closed_captions>
<teletext_page_id>[PageID]</teletext_page_id>
<!-- closed captions params -->
</closed_captions>
<!-- Multiple closed captions params may be included in output format -->
<closed_captions>
<!-- closed captions params -->
</closed_captions>
<!-- format params -->
</format>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<key>>", // required
"action": "[Action]", // required
"source": "[SourceFile]", // required
"format": {
"output": "[OutputFormat]", // required
"closed_captions": [
{
"teletext_page_id": "[PageID]"
// closed captions params
},
{
// closed captions params
}
]
// format params
}
}
}
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
teletext_page_id | Teletext page id to copy or extract | Non-negative integer number | none |
Task processing log
Added parameter to extend GetStatus with task processing log
Added API request to show specified task processing log
GetStatus
Request
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required -->
<userkey><<key>></userkey> <!-- required -->
<action>GetStatus</action> <!-- required -->
<mediaid>[MediaID]</mediaid> <!-- required -->
<include_task_status>[yes|no]</include_task_status>
<include_qc_task_status>[yes|no]</include_qc_task_status>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<key>>", // required
"action": "GetStatus", // required
"mediaid": "[MediaID]", // required
"include_task_status": "[yes|no]",
"include_qc_task_status": "[yes|no]"
}
}
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
mediaid | Media ID | Positive integer number | none |
include_task_status | Include Task Processing log | yes, no | no |
include_qc_task_status | Include child QC media processing log | yes, no | no |
Response
<?xml version="1.0"?>
<response>
<format>
<task_status>
<state>
<time>[StateDateTime]</time>
<message>[Message]</message>
</state>
<state>
<time>[StateDateTime]</time>
<message>[Message]</message>
</state>
<!-- multiple state messages -->
<state>
<time>[StateDateTime]</time>
<message>[Message]</message>
</state>
</task_status>
<!-- format params -->
</format>
<format>
<!-- ... -->
</format>
<!-- media params -->
</response>
{
"response": {
"format": [
{
"task_status": {
"state": [
{
"time": "[StateDateTime]",
"message": "[Message]"
},
{
"time": "[StateDateTime]",
"message": "[Message]"
},
// multiple state messages
{
"time": "[StateDateTime]",
"message": "[Message]"
}
]
}
// format params
},
{
// format params
}
]
// media params
}
}
GetTaskStatus
Request
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required -->
<userkey><<key>></userkey> <!-- required -->
<action>GetTaskStatus</action> <!-- required -->
<mediaid>[MediaID]</mediaid> <!-- required -->
<taskid>[TaskID]</taskid> <!-- required -->
<include_qc>[yes|no]</include_qc>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<key>>", // required
"action": "GetTaskStatus", // required
"mediaid": "[MediaID]", // required
"taskid": "[TaskID]" // required
"include_qc": "[yes|no]"
}
}
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
mediaid | Media ID | Positive integer number | none |
taskid | Task ID | Positive integer number | none |
include_qc | Include child QC media processing log | yes, no | no |
Response
<?xml version="1.0"?>
<response>
<list>
<mediaid>[MediaID]</mediaid>
<taskid>[TaskID]</taskid>
<state>
<time>[StateDateTime]</time>
<message>[Message]</message>
</state>
<state>
<time>[StateDateTime]</time>
<message>[Message]</message>
</state>
<!-- multiple state messages -->
<state>
<time>[StateDateTime]</time>
<message>[Message]</message>
</state>
</list>
</response>
{
"response": {
"list": {
"mediaid": "[MediaID]",
"taskid": "[TaskID]",
"state": [
{
"time": "[StateDateTime]",
"message": "[Message]"
},
{
"time": "[StateDateTime]",
"message": "[Message]"
},
// multiple state messages
{
"time": "[StateDateTime]",
"message": "[Message]"
}
]
}
}
}