23 January 2020
almost 5 years ago by Encoding.com Product Team #2
Removed GetQCStatus request
QC status information moved to GetStatus response.
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>GetStatus</action>
<mediaid>[MediaID]</mediaid><!-- required -->
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "GetQCStatus",
"mediaid": "[MediaID]"
}
}
Media ID
You can use the ID of original media or the ID of QC-media which you can find by GetStatus request or in UI.
Response For Original Media
<?xml version="1.0"?>
<response>
<id>[MediaID]</id>
<userid><<id>></userid>
<!-- media status -->
<status>[MediaStatus]</status>
<format>
<!-- output information -->
<qc_child_media>[QCMediaID]</qc_child_media>
<qc_child_media_status>[Passed|Failse|Quarantined]</qc_status>
<qc_report>[QCReportURL]</qc_report>
</format>
</response><?xml version="1.0"?>
<response>
<id>[MediaID]</id>
<userid><<id>></userid>
<!-- media status -->
<status>[MediaStatus]</status>
<format>
<!-- output information -->
<qc_child_media>[QCMediaID]</qc_child_media>
<qc_child_media_status>[Passed|Failse|Quarantined]</qc_status>
<qc_report>[QCReportURL]</qc_report>
</format>
</response>
{
"response": {
"id": "[MediaID]",
"userid": "<<id>>",
// media status
"status": "[MediaStatus]",
"format": {
// output information
"qc_child_media": "[QCMediaID]",
"qc_child_media_status": "[Passed|Failse|Quarantined]",
"qc_report": "[QCReportURL]"
}
}
}
Response For Child QC-Media
<?xml version="1.0"?>
<response>
<id>[MediaID]</id> <!-- Equals to qc_child_media_id in parent media GetStatus response -->
<userid><<id>></userid>
<!-- media status -->
<status>[MediaStatus]</status>
<qc_parent_media>[ParentMediaID]</qc_parent_media>
<qc_parent_task>[ParentTaskID]</qc_parent_task>
<qc_status>[Passed|Failse|Quarantined]</qc_status>
<qc_report>[QCReportURL]</qc_report>
<format>
<!-- output information -->
<id>[ParentTaskID]</id>
<status>[FormatStatus]</status>
</format>
</response>
{
"response": {
"id": "[MediaID]", // Equals to qc_child_media_id in parent media GetStatus response
"userid": "<<id>>",
// media status
"status": "[MediaStatus]",
"qc_parent_media": "[ParentMediaID]",
"qc_parent_task": "[ParentTaskID]".
"qc_status": "[Passed|Failse|Quarantined]",
"qc_report": "[QCReportURL]",
"format": {
// output information
"id": "[ParentTaskID]",
"status": "[FormatStatus]"
}
}
}
More options for Force Keyframes
Added new types of allowed values for <force_keyframes />.
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>addMedia</action>
<source>[SourceFile]</source> <!-- required-->
<format> <!-- required -->
<output>[output]</output> <!-- REQUIRED -->
<force_keyframes>[KeyFramePosition]</force_keyframes>
</format>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "addMedia",
"source": "[SourceFile]",
"format": {
"output": "[output]",
"force_keyframes": "[KeyFramePosition]"
}
}
}
Parameter | Description | Allowed Values | Default Values |
---|---|---|---|
force_keyframes | Specify when to capture keyframes. | positive integer number: N - insert IDR frame every N frames positive integer with "s" suffix. Ns - insert IDR frame every N second comma separated list. N1,N2,...,Nk* insert IDR frame on N1,N2,...,Nk seconds | none |
CableLabs
Added new MpegTS output format with CableLabs standard conformance.
Simple Request
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>AddMedia</action>
<source>[SourceFile]</source> <!-- required-->
<format> <!-- required -->
<output>cablelabs_mpegts</output>
<framerate>[FrameRate]</framerate>
<video_codec>[VideoCodec]</video_codec>
<audio_codec>[AudioCodec]</audio_codec>
<audio_bitrate>[AudioBitrate]</audio_bitrate>
<!-- common format parameters -->
<!-- multiple closed_captions may be included -->
<closed_captions>
<mux_type>[MuxType]</mux_type>
<!-- closed captions parameters -->
</closed_captions>
<closed_captions>
<!-- closed captions parameters -->
</closed_captions>
</format>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<id>>", // required
"action": "AddMedia",
"source": "[SourceFile]", // required
"format": { // required
"output": "cablelabs_mpegts",
"framerate": "[FrameRate]",
"video_codec": "[VideoCodec]",
"audio_codec": "[AudioCodec]",
"audio_bitrate": "[AudioBitrate]",
// common format parameters
// multiple closed_captions may be included
"closed_captions": [
{
"mux_type": "[MuxType]"
// closed captions parameters
}
]
}
}
}
Request With Default Values
Note
Most of the request parameters listed below mustn't be changed because it will may violate the CableLabs standard conformance.
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>AddMedia</action>
<source>[SourceFile]</source> <!-- required-->
<format> <!-- required -->
<output>cablelabs_mpegts</output>
<framerate>[FrameRate]</framerate>
<video_codec>[VideoCodec]</video_codec>
<audio_codec>[AudioCodec]</audio_codec>
<audio_bitrate>[AudioBitrate]</audio_bitrate>
<audio_channels_number>[ChannelsNumber]</audio_channels_number>
<audio_sample_rate>[SampleRate]</audio_sample_rate>
<layout>[Layout]</layout>
<patvsn>[PATVersion]</patvsn>
<profile>[Profile]</profile>
<keyframe>[GOPSize]</keyframe>
<psipat_rep>[PATRepetitionRate]</psipat_rep>
<psipmt_rep>[PMTRepetitionRate]</psipmt_rep>
<veryfast>[yes|no]</veryfast>
<noemptyaf>[yes|no]</noemptyaf>
<pktsize>[PacketSize]</pktsize>
<forceduration>[yes|no]</forceduration>
<color_primaries>[ColorPrimaries]</color_primaries>
<transfer_characteristics>[TransferCharacteristics]</transfer_characteristics>
<matrix_coefficients>[MatrixCoefficients]</matrix_coefficients>
<!-- common format parameters -->
<video_codec_options>
<!-- common video codec options -->
<b_strategy>[BFStrategy]</b_strategy>
<sc_threshold>[SceneCutNumber]</sc_threshold>
<bf>[BFNumber]</bf>
<keyint_min>[MinGOPSize]</keyint_min>
<level>[Level]</level>
<b-pyramid>[0,1]</b-pyramid>
<open-gop>[0,1]</open-gop>
<refs>[RefsCount]</refs>
<flags2>[Flags]</flags2>
<!-- mpeg2video codec options -->
<seq_disp_ext>[SequenceDisplayExtension]</seq_disp_ext>
<video_format>[VideoFormat]</video_format>
<force-open-gop>[0,1]</force-open-gop>
<force-seq-header>[0,1]</force-seq-header>
<force-seq-extension>[0,1]</force-seq-extension>
<mpv_flags>[MPVFlags]</mpv_flags>
</video_codec_options>
<program>
<pmt_pid>[PID]</pmt_pid>
<pcr_per>[PCRPeriod]</pcr_per>
<pcr_pes>[yes|no]</pcr_pes>
</program>
<video_stream>
<pid>[PID]</pid>
<auinfo>[yes|no]</auinfo>
<quadbyte>[yes|no]</quadbyte>
<insertsec>[yes|no]</insertsec>
<notlowdelay>[yes|no]</notlowdelay>
<rai>[yes|no]</rai>
<pes_align>[yes|no]</pes_align>
</video_stream>
<!-- multiple audio_stream may be included -->
<audio_stream>
<pid>[PID]</pid>
<atscbuf>[yes|no]</atscbuf>
<rai>[yes|no]</rai>
<pes_align>[yes|no]</pes_align>
<!-- audio stream parameters -->
</audio_stream>
<audio_stream>
<!-- audio stream parameters -->
</audio_stream>
<!-- multiple closed_captions may be included -->
<closed_captions>
<mux_type>[MuxType]</mux_type>
<!-- closed captions parameters -->
</closed_captions>
<closed_captions>
<!-- closed captions parameters -->
</closed_captions>
</format>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<id>>", // required
"action": "AddMedia",
"source": "[SourceFile]", // required
"format": { // required
"output": "cablelabs_mpegts",
"framerate": "[FrameRate]",
"video_codec": "[VideoCodec]",
"audio_codec": "[AudioCodec]",
"audio_bitrate": "[AudioBitrate]",
"audio_channels_number": "[ChannelsNumber]",
"audio_sample_rate": "[SampleRate]",
"layout": "[Layout]",
"patvsn": "[PATVersion]",
"profile": "[Profile]",
"keyframe": "[GOPSize]",
"psipat_rep": "[PATRepetitionRate]",
"psipmt_rep": "[PMTRepetitionRate]",
"veryfast": "[yes|no]",
"noemptyaf": "[yes|no]",
"pktsize": "[PacketSize]",
"forceduration": "[yes|no]",
"color_primaries": "[ColorPrimaries]",
"transfer_characteristics": "[TransferCharacteristics]",
"matrix_coefficients": "[MatrixCoefficients]",
// common format parameters
"video_codec_options": {
// common video codec options
"b_strategy": "[BFStrategy]",
"sc_threshold": "[SceneCutNumber]",
"bf": "[BFNumber]",
"keyint_min": "[MinGOPSize]",
"level": "[Level]",
"b-pyramid": "[0,1]",
"open-gop": "[0,1]",
"refs": "[RefsCount]",
"flags2": "[Flags]",
// mpeg2video codec options
"seq_disp_ext": "[SequenceDisplayExtension]",
"video_format": "[VideoFormat]",
"force-open-gop": "[0,1]",
"force-seq-header": "[0,1]",
"force-seq-extension": "[0,1]",
"mpv_flags": "[MPVFlags]"
},
"program": {
"pmt_pid": "[PID]",
"pcr_per": "[PCRPeriod]",
"pcr_pes": "[yes|no]"
},
"video_stream": {
"pid": "[PID]",
"auinfo": "[yes|no]",
"quadbyte": "[yes|no]",
"insertsec": "[yes|no]",
"notlowdelay": "[yes|no]",
"rai": "[yes|no]",
"pes_align": "[yes|no]"
},
"audio_stream": [
{
"pid": "[PID]",
"atscbuf": "[yes|no]",
"rai": "[yes|no]",
"pes_align": "[yes|no]"
}
],
"closed_captions": [
{
"mux_type": "[MuxType]"
}
]
}
}
}
Format Parameters
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
framerate | Specifies the frame rate. | 23.976, 24, 29.97, 30, 59.94 | none |
video_codec | Defines the codec used for your output. | libx264, mpeg2video, copy | libx264 |
audio_codec | Specify the audio codec | ac3, s302m | ac3 |
audio_bitrate | Specify the audio bitrate. | Nk – where N is any non-zero integer. Greater or equals to 192k | 192k |
audio_channels_number | Specify the audio bitrate. | ac3 codec: non-zero integer s302m codec: even integer | none |
audio_sample_rate | Specify the audio sampling frequency (Hz). | ac3 codec: non-zero integer s302m codec: 48000 | 48000 |
layout | Specify the output channels layout. | ac3 codec: mono, stereo, 2.1, 3.0, 3.0-back, 4.0, quad, quad-side, 3.1, 5.0, 5.0-side, 4.1, 5.1, 5.1-side, 6.0, 6.0-front, hexagonal, 6.1, 6.1, 6.1-front, 7.0, 7.0-front, 7.1, 7.1-wide, 7.1-wide-side, octagonal, downmix s302m codec: stereo | none |
patvsn | PAT version number | Integer number between 0 and 31 | 0 |
profile | This defines various sets of capabilities which are referred to as profiles, that target specific classes of applications. | high, main, baseline | high |
keyframe | Defines the keyframe interval, in number of frames. | Positive integer | 23.976 fps, 24 fps: 12 29.97 fps, 30 fps: 15 59.94 fps: 30 |
psipat_rep | PAT repetition rate per second | Float number between 0.001 and 1000 | 8 |
psipmt_rep | PMT repetition rate per second | Float number between 0.001 and 1000 | 8 |
veryfast | Apply veryfast encoding profile | yes, no | no |
noemptyaf | Prevent empty Adaptation Fields | yes, no | yes |
pktsize | Output packet size | Integer number between 188 and 512 | 188 |
forceduration | Force the output stream to be of minimum duration | yes, no | no |
color_primaries | Color primaries | 2 – auto 1 – ITU-R BT.709 5 – ITU-R BT.601 625-line 6 – ITU-R BT.601 525-line 9 – ITU-R BT.2020 copy | 2 |
transfer_characteristics | Transfer Characteristics | 2 – auto 1 – ITU-R BT.709 / BT.601 / BT.2020 16 – SMPTE ST 2084 (PQ) 18 – BT.2100 Hybrid Log Gamma * copy | 2 |
matrix_coefficients | Matrix coefficients | 2 – auto 1 – ITU-R BT.709 6 – ITU-R BT.601 9 – ITU-R BT.2020 * copy | 2 |
Video Codec Options
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
b_strategy | B-Frames Strategy | 0, 1, 2 | 0 |
sc_threshold | Scene Cut Threshold | Non-negative integer number | 0 |
bf | B-Frame number | Positive integer number | 2 |
keyint_min | Minimum GOP Size | Positive integer number | 1 |
level | Video Level | Positive integer number | 41 |
b-pyramid | Apply B-pyramid method | 0, 1 | 0 |
open-gop | Produce Open GOP | 0, 1 | libx264: 1 mpeg2video: 0 |
refs | Reference number | Positive integer number | 9 |
flags2 | Flags | Valid flags string | libx264: -bpyramid+wpred+mixed_refs+dct8x8-fastpskip mpeg2video: +local_header |
### mpeg2video options | |||
seq_disp_ext | Write sequence display extension blocks | -1 – auto 0 – never * 1 – always | 1 |
video_format | Video Format | 5 – unspecified 0 – component 1 – pal 2 – ntsc 3 – secam 4 – mac | 0 |
force-open-gop | Don't add closed GOP flag | 0, 1 | 0 |
force-seq-header | Add Sequence Header to each frame | 0, 1 | 1 |
force-seq-extension | Add Sequence Extension to each frame | 0, 1 | 1 |
mpv_flags | Flags | Valid flags string | +strict_gop |
Program Parameters
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
pmt_pid | Program PID | Hex number between 0x10 - and 0x1ffe | 0x01e0 |
pcr_per | Time between PCRs | Positive integer number between 1 and 65535 | 40 |
pcr_pes | Insert PCRs on all PES packets | yes, no | yes |
Video Stream Parameters
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
pid | Stream PID | Hex number between 0x10 - and 0x1ffe | 0x01e1 |
auinfo | Insert access unit information data into the adaptation field | yes, no | yes |
quadbyte | Quad Byte | yes, no | yes |
insertsec | Video Ends with Sequence End Code | yes, no | yes |
notlowdelay | Stream should be multiplexed allowing for B-frame reordering | yes, no | yes |
rai | RAI on appropriate access units | yes, no | yes |
pes_align | Align access units to PES packets | yes, no | yes |
Audio Stream Parameters
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
pid | Stream PID | Hex number between 0x10 - and 0x1ffe | 0x01e2 Each next audio stream will have by default PID: 0x01e2 + n |
atscbuf | Use ATSC buffer model for AC-3 | yes, no | yes |
rai | RAI on appropriate access units | yes, no | none |
pes_align | Align access units to PES packets | yes, no | none |
Closed Captions Parameters
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
mux_type | Closed Captions Mux Type | cea-608, cea-708 | none |