Skip to main content

stream

The stream command is used to create and manage streams to map the decoder inputs to output interfaces.

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. The IP Address (addr field) is only required for multicast, but not for unicast streams. Most commands will accept the stream ID or name in order select the proper stream to manage.

Once a stream is connected to the decoder (using the dec command), you can start/stop the decoder by way of the stream ID (e.g., stream 1 start). 

Synopsis

stream create [port=udpport] [addr=ipaddr] [id=number] [name=text]
[encapsulation=ts-udp/ts-rtp/ts-srt] [decoderId=number (0 to 3)]
[sourceaddr=mcastsenderaddr] [interface=auto,eth0,eth1]
stream id/name start
stream id/name stop
stream id/name delete
stream id/name/all get [config/stats/all]
stream all get table
stream id/name clear

Possible Encapsulation Formats

Possible encapsulation formats and their specific options:

ts-rtp: MPEG2 transport stream over RTP [fec=yes,no] 
ts-udp: MPEG2 transport stream over UDP (no RTP header)
ts-srt: MPEG2 transport stream over SRT (Secure Reliable Transport)
                 [latency=number] [passphrase=text] [authentication=none, auto, aes-gcm]
                 [mode=listener, caller, rendezvous] [sourceport=udpport]
                 [flipaddr=ipaddr] [flipport=udpport] [flipttl=ipttl]
                 [fliptos=iptos]
                 [resource="resid"] [user="username"]
                 [publishid="string"] (only if resource and user are not spec'd)

If encapsulation is ts-srt, you can specify a passphrase (10-79 characters) 
and the maximum latency (how long the decoder will buffer received packets, 
from 20-8000 ms).

Actions

ActionDescription

create

Creates a decoder streaming session.

A series of one or more parameter=value pairs can be specified at once.

delete

Removes the specified stream (entirely).

start

Starts the stream and its associated decoder.

stop

Stops the stream and its associated decoder.

get

Displays stream information. See Parameters below.

You can specify to display the stream configuration, statistics, or all.

stream all get table displays a summary of all the streams in a table format.

clear

Clears the stream’s statistics.

help

Displays usage information for the stream command.

Parameters 

ParameterDefaultDescription/Values
port

n/a

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

n/a

(Optional, only required for multicast) Enter a Multicast 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).

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 to 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 32 characters

encapsulation

ts-rtp

(Optional) The Encapsulation Type for the 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 (Secure Reliable Transport)

decoderId

n/a

The decoder SDI output port selected for the stream. 0 to 3

Important

Decoder 0 has highest priority, and and the video decoding resources are prioritized with the lower decoder numbers (i.e., 0, then 1, 2, and 3) having higher priority. For more information, see Oversubscription of Decoder Channels.

sourceaddr

n/a

(Multicast streams only) Enter the multicast sender IP address in dotted-decimal format (i.e., what address is broadcasting).

See “Source Address” under Stream Settings.

interfaceauto(Dual NICs must be available) Assigns the stream to either eth0 or eth1, or auto. (When set to "auto", eth0 takes precedence as long as the address is resolvable; otherwise the output switches to eth1.) 
ts-rtp only
FECNone

(Optional) To enable Forward Error Correction (FEC), specify fec=yes.

FEC varies with the protocol (encapsulation):

  • TS over UDP = VF FEC
  • TS over RTP = Pro-MPEG FEC

NOTE: VF FEC is a proprietary FEC and is not interoperable with devices outside of the Haivision family.

The FEC level is read from the encoded stream.

ts-srt only

latency

125

Specifies how long the decoder will buffer received packets, from 20-8000 ms.

See “Latency” under SRT Stream Settings.

mode

listener

Specifies the SRT Connection Mode (to simplify firewall traversal):

  • caller: The SRT stream acts like a client and connects to a server listening and waiting for an incoming call.
  • listener: The SRT stream acts like a server and listens and waits for clients to connect to it.
  • rendezvous: Allows calling and listening at the same time. Also, to simplify firewall traversal, Rendezvous Mode allows the encoder and decoder to traverse a firewall without the need for IT to open a port.

passphrase

n/a

(Optional) A sequence of words or other text used to control access to the stream. Similar to a password in usage, but is generally longer for added security. This parameter is required if the stream is encrypted and is used to retrieve the cryptographic key protecting the stream. From 10-79 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.  

resource

(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.

sourceport


(Caller and Rendezvous Connection modes) Specifies the UDP source port for the SRT stream. If not filled in, a (default) source port will be assigned.

Note

This simplifies firewall configuration as the firewall/NAT rules can be precisely tailored to the SRT stream.
SRT to UDP Stream Conversion (ts-srt only)
flipaddrn/a

Specifies the destination IP address for the stream.

See “SRT to UDP Stream Conversion (TS over SRT only)” under SRT Stream Settings.

flipportn/a

Specifies the UDP source port for the stream.

flipttl64(Time-to Live for stream packets) Specifies the number of router hops the stream packet is allowed to travel/pass before it must be discarded. 1..255
fliptos184 or 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)

SRT Access Control

publishid

n/a

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

resource

n/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.

user

n/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.


stream Examples

# stream create addr=10.6.230.106 port=2000 name=infodev

Creates a streaming session from IP Address 10.6.230.106 at port 2000. Returns a confirmation such as:

Stream created successfully - ID: 1.
# stream 1 start

Starts the the stream and its associated decoder. Returns a confirmation such as:

Stream started successfully. 
# stream 1 get all

Returns configuration information for decoder stream #1, such as:

Stream ID            : 1
Name : (None)
Configuration
Interface : Auto
Address : 10.65.135.55
UDP Port : 3436
Decoder : 0
Encapsulation : TS-SRT
Mode : Rendezvous
AES Encryption : On
Latency : 250 ms
Stream Flipping : Off
Statistics:
State : ACTIVE
Up Time : 8m21s
Source Address : 10.65.135.55 port 3436
Bit Rate : 5.87Mbps
Received Packets : 53,460 (Last One: 0s ago)
Received Bytes : 382,894,959
Connections : 1 (Last One: 8m20s ago)
New Stream Flags : 1 (Last One: 8m59s ago)
Resumed Stream Flags : 1 (Last One: 8m59s ago)
Program Number : 1
PCR PID : 34
Streams : 2 (1 video, 1 audio, 0 KLV, 0 filtered)
SRT Stats
Local Version : 1.3.2
Peer Version : 1.3.2
Connections : 1
Local Port : 3436
Remote Port : 3436
AES Encryption : On
Key Length : 128 bits
Decryption : Active
Sent ACKs : 32,573
Link Bandwidth : 161,005 kbps
RTT : < 1 ms
Local Buffer Level : 222 ms
Latency : 250 ms
VIDEO STREAM
Compression : H.265
Bit Rate : 7.9 Mbps
Program ID : 33
Received Packets : 16,139 (Last One: 0s ago)
Received Bytes : 511,288,937
PTS : 55652090
DTS : 55652090
AUDIO STREAM 1
Compression : AAC-ADTS
Bit Rate : 80.6 kbps
Program ID : 36
Received Packets : 25,243 (Last One: 0s ago)
Received Bytes : 5,385,173
PTS : 55654479
DTS : 55654479

# stream 1 get stats

Returns status information for decoder stream #1, such as:

Stream ID         : 1
Name : (None)
Statistics:
State : Streaming
Output : DECODER-1
Up Time : 2d4h42m4s
Bitrate : 6,149 kbps
Received Packets : 20,260,289
Received Bytes : 1,479,361,480
Received Errors : 0
Last Received : 0s ago
Stream PCR : 0x1f9c7ab31
MPEG2TS Lost Packets : 4
Corrupted Frames : 2
Pauses : 0
Source Address : fd00:10:65:132:5e77:57ff:fe00:ae6a
# stream 1 delete

Deletes Stream #1.


JavaScript errors detected

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

If this problem persists, please contact our support.