Skip to main content

stream

The stream command is used to create and manage Makito X1 audio/video streams.

When creating a stream you can specify a unique id to assign to it or let the system assign one for you. You can also specify a name for the stream if needed. Most commands will accept the stream id or name in order select the proper stream to manage.

Synopsis

stream create addr=ipaddr port=udpport [id=number] [name=text] 
 [encapsulation=ts-rtp | ts-udp | ts-srt]
[start=yes,no] [ttl=64] [tos=0xB8] [mtu=1496] [videosrc=id/name]
[audiosrc=id/name[,id/name,id/name]][datasrc=id/name[,id/name,id/name]][adinsertionsrc=id/name]
[shaping=yes,no [ceiling=percentage] [idlecells=yes,no]
[delayaudio=yes,no]][databitrate-auto,valueinkbps]
[datacarriage=sync | async | async-syncau]

Possible encapsulation formats and their specific options:

 ts-rtp: MPEG2 transport stream over RTP 
[rtcp=on [rtcpport=udpport]][fec=yes,no] [rows=10] [columns=10]
[level=A,B] [alignment =yes,no]
ts-udp: MPEG2 transport stream over UDP (no RTP header)
direct-rtp: RFC3984 [rtcp=on,off]
ts-srt: MPEG2 transport stream over SRT
[mode=caller, listener, rendezvous] [sourceport=udpport]
[encryption=none, AES128, AES256] [passphrase="My PassPhrase"][authentication=none, auto, aes-gcm]
[latency=250] [overhead=percentage] [adaptive=yes,no]
[resource="resid"] [user="username"] [publishid="string"]
[redundancy=none, active-active, active-backup] [secaddr=ip addr] [secport=udpport]
[secsourceport=udpport]

Parameters available for all ts-based streams:

 [videopid=pid] [audiopid=pid[,pid,pid]][datapid=pid] [adpid=pid]
[pcrpid=pid] [pmtpid=pid]
[program=num] [tsid=id]
Possible methods of KLV data carriage:
sync: synchronous metadata AU (ISO/IEC 13818-1)
async: asynchronous private data (SMPTE RP 217)
async-syncau: asynchronous private data carrying sync metadata AU
stream id/name start
stream id/name stop
stream id/name delete
stream id/name/all get
stream id/name clear

Actions

ActionDescription

create

Creates a streaming session from the encoder. A series of one or more parameter=value pairs can be specified at once.

start

Starts the specified stream ID or name.

Note

By default, a stream will start immediately since start=yes by default. To delay the start of a stream, include the parameter start=no.

stop

Stops the specified stream ID or name.

delete

Deletes the specified stream ID or name.

get

Gets stream status information. See Parameters below. You can specify a stream or all streams.

Tip

To display a summary of all the streams in a table format, you can use stream all get table.

clear

Clears all active sessions on the encoder.

help

Displays usage information for the stream command.

Parameters

ParameterDefaultDescription/Values

addr

n/a 

The destination IP address. Enter an IP address in dotted-decimal format.

Note

The Multicast address range is from 224.0.0.0 to 239.255.255.255. Multicast addresses from 224.0.0.0 to 224.0.0.255 are reserved for multicast maintenance protocols and should not be used by streaming sessions. We recommend that you use a multicast address from the Organization-Local scope (239.192.0.0/14).

port

n/a

The destination UDP port. Enter a number in the range 1025..65,535. Note that RTP streams use even numbers only within this range.
Optional

id

n/a

A unique number assigned to the stream.

Note

When creating a stream, you can specify a unique id to assign to it or let the system assign one (a sequential number) for you.

Most commands will accept the stream id or name (see below) in order select the proper stream to manage.

name

n/a

(Optional) When creating a stream, you can also specify a name for the stream. 1 to 63 characters

encapsulationts-udp

(Optional) The Encapsulation Type for the encoded stream.

  • ts-rtp: MPEG2 transport stream over RTP
  • ts-udp: MPEG2 transport stream over UDP (no RTP header)
  • ts-srt: MPEG2 transport stream over SRT

start

yes

(Optional) By default, the stream will start immediately. To delay the start of a stream, specify start=no. You can enter a stream start command later.

ttl

64

(Time-to Live for stream packets) Specifies the number of router hops that IP packets from this stream are allowed to traverse before being discarded.
Range = 1..255

tos

0xB8

(Type of Service) Specifies the desired quality of service (QoS). This value will be assigned to the Type of Service field of the IP Header for the outgoing streams.
Range = 0..255 (decimal) or 0x00..0xFF (hex)

Important

A DiffServ or DSCP (Differentiated Services Code Point) value must be converted to a ToS precedence value. For example, AF41 or DSCP 34 becomes ToS 136. For more information, see RFC2474.

Note

The ToS setting must be chosen so as to not interfere with Voice over IP systems and other equipment that may reside on your network. For example, when the ToS value for a stream is set to 0xB8, it can interfere with some third party Voice / IP Telephony systems.

mtu

1496

(Maximum Transmission Unit) Specifies the maximum allowed size of IP packets for the outgoing RTP data stream. 228..1500 

videosrc

0

(Optional) The video source (ID/Name). For H.264, the id is either 0, 1, 2, or 3 (corresponding to the encoder instance number in the Web interface). For HEVC encoders, two additional ids of 4 and 5 are available and should be used to stream HEVC-encoded video.

Note

By default, if you don't specify the source, the stream uses video encoder 0 and audio encoder 0 for a TS stream (UDP or RTP), and video encoder 0 for other encapsulations.

Once you specify an audio or video source, you have to enter all of them explicitly. For example, even though a TS stream with no sources specified automatically uses video 0 and audio 0, if you specify that video 0 is your source, then you must enter the audio source or else the stream will not have any audio in it.

Tip

Combined videosrc/audiosrc/datasrc status shown under Contents in return output.

audiosrc

0

(Optional) The audio source (ID/Name). The id is either 0, 1, 2, 3, 4, 5, 6, or 7. See Note and Tip above in the videosrc description.

Note

To configure multi-track audio TS streams (TS over UDP or RTP), you can put more than one audiosrc (audio encoder) in the stream. See “Examples” below.

Important

Audio sources should always be associated with the same video interface for the dual channel SDI encoder.

datasrc

n/a

(Optional) The metadata source. id/name (0=serial, 1=SDI; all others are UDP)

Note

To stream metadata from multiple sources into the same KLV Elementary Stream, use multiple comma separated metadata source id/names to indicate the metadata source ES IDs to be multiplexed in the stream. e.g.: stream create ….. data=1,2

adinsertionsrc

none

(Optional) The ad insertion source. id/name(1)

shaping

no

(Optional) To enable Traffic Shaping for the stream, specify shaping=yes. For some limited networks such as satellites or some dedicated network pipes, it may be necessary to enable Traffic Shaping to smooth the traffic and respect the absolute upper limit configured.

Note

Using Traffic Shaping on streams above 7Mbps will create audio/video artifacts.

ceiling

n/a

(Optional, shaping must be yes) The percentage of network bandwidth beyond the average rate that the encoder is allowed to use if needed. This is used to set the ceiling bandwidth range. 5..100%, default = 15

idlecells

no

(Optional, shaping must be yes) When enabled, Idle TS cells will be inserted into a TS stream when necessary. yes,no 

delayaudio

no

(shaping and idlecells must be yes) When enabled, delays the transmission of audio information to prevent MPEG-2 TS HRD main buffer overflows. Per reference decoder main audio buffer defined in IEC/ISO 13818- 1/H.222.0. yes,no
databitrateauto

(CBR or CVBR streams with Metadata sources) Enables you to set the Metadata value used in the calculation that compares the output stream bitrate to the Total TX Bandwidth value. 

  • auto: The system tries to measure the bitrate of metadata sources and adjust the stream bitrate accordingly (especially useful for traffic shaped streams)
  • Enter a value in kbps between 0 and 10,000.

datacarriage

sync

Specifies the method of KLV data carriage:

  • sync: synchronous metadata AU (ISO/IEC 13818-1)
  • async: asynchronous private data (SMPTE RP 217)
  • async-syncau: asynchronous private data carrying sync metadata AU
ts-rtp and ts-udp streams

videopid

33

(Optional) Video Packet Identifier. 16-8190

audiopid

36

(Optional) Audio Packet Identifier. 16-8190. For MPEG-2 TS streams, the audio PIDs for each audio source can be assigned explicitly. The order of PID assignment is the same as the audiosrc parameters. e.g.:

audiosrc=0,1,3 audiopid=64,65,66 will result in the audio elementary stream from audio source 0 being assigned an elementary PID of 64, etc.

datapid

40

(Optional) Data (metadata) Packet Identifier. 16-8190

adpid=pid

64(Optional) Adinsertion (SCTE-35) Packet Identifier. 16-8190

 prcpid

34

(Optional) (Program Clock Reference) Packet Identifier. Timestamp in the TS from which the decoder timing is derived. 16..8190

pmtpid

32

(Optional) (Program Map Table) Packet Identifier. 16-8190

program

1

(Optional) Program Identifier used in the Program Map Table (PMT) of the TS stream. 0-65535

tsid

0

(Optional) Transport Stream ID. Identifies the transport stream in the Program Association table (PAT) of the TS stream. 0-65535

fec

no

Enables Forward Error Correction (FEC). yes,no

FEC settings include:  [rows=10] [columns=10] [level=A,B] [alignment=yes,no] 

SRT (see Configuring Secure Reliable Transport (SRT))
     *encapsulation must be ts-srt

mode

caller

Specifies the SRT Connection Mode:

  • caller
  • listener
  • rendezvous

sourceport

auto

(SRT connection mode must be caller) Specifies the UDP source port for the SRT stream.

encryption

none

Enables AES encryption and specifies the key length, either: none, AES-128, or AES-256

passphrase

n/a

(Only required and accepted if encryption is enabled; encapsulation must be ts-srt) Specifies a string used to generate the encryption keys to protect the stream.

Range = 10-79 UTF8 characters

authentication

none

(Only available when encryption is enabled; encapsulation must be ts-srt) Configures Authenticated-Encryption with Associated-Data (AEAD). Options are:

None - Default for Caller and Rendez-vous modes.  Not available for Listener mode.

Auto - Default for Listener mode. Not available for Caller or Rendez-vous modes.

AES-GCM - Available for CallerListener, and Rendez-vous modes. 

Note

Setting the authentication to Auto allows the Listener to accept Callers with authentication set to either None or AES-GCM. Listeners with the authentication set to AES-GCM will only accept Callers which are also set to AES-GCM.  

latency

250

Specifies the SRT receiver buffer that permits lost packet recovery. The size of this buffer adds up to the total latency. A minimum value must be 3 times the round-trip-time (RTT).

Range = 20 - 8000 ms

Note

Latency is for the SRT protocol only and does not include the capture, encoding, decoding and display processes of the endpoint devices.

overhead

25%

Specifies the maximum stream bandwidth overhead that can be used for lost packets recovery.

Range = 5-50%

adaptive

no

When set to yes enables Network Adaptive Encoding. NAE directs the video encoder to adapt to changing network throughput used by the SRT stream during operational use with the goal of maximizing video quality for a given network. NAE may adjust video bitrate depending on measured link throughput without stream tear-down and re-build.
resourcen/a

(Stream Publishing ID) Identifies the name of the resource and facilitates selection should the listener party be able to serve multiple resources. See Configuring SRT Access Control.

usern/a

(Stream Publishing ID) Identifies the User Name, or authorization name, that is expected to control which password should be used for the connection. The application should interpret it to distinguish which user should be used by the listener party to set up the password.

publishidn/a

(Stream Publishing ID) Enter using custom format. For more information, see Configuring SRT Access Control.

redundancynone

Configures the stream to use redundant transport paths:

  • none
  • active-active: Stream packets are sent on both defined network paths, and both links continually transmit. The listener uses the first received stream packets and ignores the duplicate packets received from the other network paths. This mode maintains low latency at the expense of network bandwidth. See Using Path Redundancy with SRT Streaming.
  • active-backup: The interfaces are bonded for redundancy (or fault tolerance mode). Only one interface works at a time and the other one works only if the first one fails.
secaddrn/a

The destination IP address for the redundant stream.

secportn/a

The destination UDP port for the redundant stream.

secsourceportn/a

The UDP source port for the redundant stream.

Examples

# stream create addr=192.0.2.106 port=2000 start=yes

Creates a streaming session to IP Address 192.0.2.106 at port 2000; starts streaming immediately.

Returns the following confirmation and stream ID:

Stream created successfully - ID : 3
# stream create addr=192.0.2.235 port=1234 stillimage=haivision.mp4

Creates and starts a streaming session. Specifies a static image to replace the "real" video stream
when streaming is paused.

# stream create addr=10.64.1.124 port=1234 encap=ts-udp videosrc=1 audiosrc=1 
datasrc=1,3

Creates and starts a multiple metadata streaming session.

# stream create addr=10.64.1.124 port=1234 encap=ts-udp videosrc=1 
audiosrc=0,2,4 audiopid=36,37,38

Creates a TS stream with multi-track audio using audio encoders 0, 2 and 4. The corresponding
audio PIDs are 36, 37 and 38.

# stream 3 pause

Pauses the stream created above (stream ID 3), which activates the still image.

# stream 3 resume

Resumes the stream created above.

# stream create addr=192.0.2.235 port=1234 vid=0 aud=0
# videnc 1 start
# audenc 1 start
# stream create addr=198.51.100.106 port=1234 vid=1 aud=1

Creates two streams, the first using Video and Audio encoder 0, and the 2nd using Video and
Audio encoder 1.

# stream create addr=192.0.2.235 port=1234 videosrc=4 audiosrc=0

Creates an HEVC stream using video encoder 4.

# stream 1 get all

Returns configuration information and statistics for encoder stream #1, for example:

Stream                      : 1
Name : "SRT1"
Configuration:
Encapsulation : TS-SRT
Mode : Caller
Redundancy : (None)
Interface : Auto
Address : 192.0.2.235
UDP Port : 1234
Contents : Video ("Video Encoder 0":0),
Audio ("Audio Encoder 0":0)
Video PID : 33 (0x21)
Audio PID : 36 (0x24)
PCR PID : 33 (0x21)
PMT PID : 32 (0x20)
Transport Stream ID : 1
Program Number : 1
MTU : 1500
TOS : 0xB8
TTL : 18
Bandwidth : 6,510 kbps
Traffic Shaping : Off
AES Encryption : Off
Network Adaptive : No
Max Traffic Overhead : 25% (10,923 kbps)
Added Latency : 250 ms
Persistent : Yes
Statistics :
State : STREAMING
Up Time : 3d1h16m8s
Source Port : 43825
Sent Packets : 1,040,512
Sent Bytes : 1,252,450,560
Bitrate : 198 kbps
SRT v1.4.2:
Peer Version : 1.3.2
Reconnections : 1
AES Encryption : Off
Resent Packets : 6
Resent Bytes : 8,160
Dropped Packets : 0
Dropped Bytes : 0
Received ACKs : 41,084,318
Received NAKs : 6
Max Bandwidth : 12,659 kbps
Path Max Bandwidth : 345,085 kbps
RTT : < 1 ms
Local Buffer Level : 14 ms
Latency : 250 ms
# stream 2 get stats

Returns status information for Stream #2, such as:

Stream ID               : 2
Name : (None)
Statistics:
State : STREAMING
Up Time : 5d16h33m26s
Source Port : 39419
Sent Packets : 317,298,860
Sent Bytes : 402,565,886,576
Bitrate : 6,006 kbps
SRT v1.4.2:
Peer Version : 1.3.2
Reconnections : 1
AES Encryption : Off
Resent Packets : 2
Resent Bytes : 2,720
Dropped Packets : 0
Dropped Bytes : 0
Received ACKs : 40,252,057
Received NAKs : 2
Max Bandwidth : 11,234 kbps
Path Max Bandwidth : 346,473 kbps
RTT : < 1 ms
Local Buffer Level : 12 ms
Latency : 250 ms
# stream 1 del

Deletes Stream #1.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.