These examples show how to produce MPEG Transport Stream media through our exclusive Manzanita-based muxer that conforms to the CableLabs standard and passes the toughest QC checks of professional solutions like Baton.
<?xml version="1.0"?>
<query>
<userid>[UserID]</userid> <!-- required-->
<userkey>[UserKey]</userkey> <!-- required-->
<action>AddMedia</action>
<source>[SourceFile]</source> <!-- required-->
<format> <!-- required -->
<output>cablelabs_mpegts</output> <!-- required-->
<framerate>[FrameRate]</framerate>
<video_codec>[VideoCodec]</video_codec>
<audio_codec>[AudioCodec]</audio_codec>
<audio_bitrate>[AudioBitrate]</audio_bitrate>
<!-- 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>
<muxer>[v1|v2]</muxer>
<!-- format params -->
</format>
</query>
{
"query": {
"userid": "[UserID]", // required
"userkey": "[UserID]", // required
"action": "AddMedia",
"source": "[SourceFile]", // required
"format": { // required
"output": "cablelabs_mpegts", // required
"framerate": "[FrameRate]",
"video_codec": "[VideoCodec]",
"audio_codec": "[AudioCodec]",
"audio_bitrate": "[AudioBitrate]",
// multiple closed_captions may be included
"closed_captions": [
{
"mux_type": "[MuxType]"
// closed captions parameters
}
],
"muxer": "[v1|v2]"
// format params
}
}
}
Request With Default Values
Warning
Changing the default parameters listed below will risk violation of conformance with the CableLabs standard.
There are many interpretations of the CableLabs standard and compliance depending on which device is performing playout or other operations on a transport stream. We invite you to reach out for specific integrations or with any questions on what parameters might need to be modified for your specific use cases.
<?xml version="1.0"?>
<query>
<userid>[UserID]</userid> <!-- required-->
<userkey>[UserKey]</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_parameters>
<!-- common video codec parameters -->
<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_parameters>
<program>
<pmt_pid>[PID]</pmt_pid>
<pcr_per>[PCRPeriod]</pcr_per>
<pcr_pes>[yes|no]</pcr_pes>
<programnumber>[ProgramNumber]</programnumber>
</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>
<muxer>[v1|v2]</muxer>
</format>
</query>
{
"query": {
"userid": "[UserID]", // required
"userkey": "[UserID]", // 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_parameters": {
// common video codec parameters
"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]",
"programnumber": "[ProgramNumber]"
},
"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]"
}
],
"muxer": "[v1|v2]"
}
}
}
Format Parameters
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
framerate | Specifies the frame rate. | 23.976, 24, 25, 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, mp2 | ac3 |
audio_bitrate | Specify the audio bitrate. | Nk – where N is any non-zero integer. | 192k |
audio_channels_number | Specify the number of audio channels. | 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 |
muxer | Muxer version | v1 – Default old muxer v2 – Advanced muxer | none |
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 |
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 |
mpeg2video options | - | - | - |
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 |
programnumber | Program_number field in PMT | Decimal number between 1 - and 65535 | none |
Video Stream Parameters
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
pid | Stream PID | Hex number between 0x10 - and 0x1ffe | 0x01e1 |
rai | RAI on appropriate access units | yes, no | yes |
pes_align | Align access units to PES packets | yes, no | yes |
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 |
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 |
rai | RAI on appropriate access units | yes, no | none |
atscbuf | Use ATSC buffer model for AC-3 | yes, no | yes |
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 |