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.

Starting with v2.3, once a stream is connected to the decoder (using viddec), you can start/stop the decoder by way of the stream ID (e.g., "stream 1 start"). Previously you could only start/stop the decoder using viddec.

Synopsis

stream create port=udpport [addr=ipaddr] [id=number] [name=text] 
[encapsulation=ts-udp | ts-rtp | ts-srt | ts-rtsp]
[sourceaddr=mcastsenderaddr]
stream id/name delete
stream id/name start
stream id/name stop
stream id/name/all get [config | stats | all]
stream all get table
stream id/name clear 

Possible Encapsulation Formats

ts-rtp: MPEG2 transport stream over RTP 
[fec=yes,no]
ts-udp: MPEG2 transport stream over UDP (no RTP header)
[fec=yes,no]
ts-srt: MPEG2 transport stream over SRT (Secure Reliable Transport)
[latency=number] [passphrase=text] [rejectunencrypted=yes,no]
[mode=listener | caller | rendezvous] [sourceport=udpport]
[flipaddr=ipaddr] [flipport=udpport] [flipttl=ipttl] [fliptos=iptos]
rtsp: Real-time Transport Protocol (RFC3984) with control through RTSP (RFC2326).
For rtsp streams, you can specify the address as
addr=rtsp://user:password@ip.add.re.ss/path?var=value&var2=value2...

Actions

ActionDescription
create

Creates a decoder streaming session.

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

deleteDeletes the specified stream.
start

Starts the stream and its associated decoder.

Note

If the stream is already active, start will stop and then restart the stream.

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

Note

If sap is enabled, stream get all displays the list of advertised sessions. See sap.

clearClears the stream’s statistics.
helpDisplays 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).

Optional stream Parameters

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)
  • rtsp - Real-time Transport Protocol (RFC3984) with control through RTSP (RFC2326).

    Note

    RTSP stream ingest is supported to provide interoperability with Makito Classic Encoders and Axis Cameras/Encoders.

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.

ts-rtp and ts-udp only

FEC

None

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

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.

rejectunencryptedyes

(Listener Connection mode only) For security reasons, when encryption is enabled in the decoder's SRT Listener stream configuration, this option causes the decoder to reject all unencrypted SRT Caller streams.

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.
SRT to UDP Stream Conversion (ts-srt only)

flipaddr

n/a

Specifies the destination IP address for the stream.

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

flipport

n/a

Specifies the UDP source port for the stream.

flipttl

64

(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

fliptos

184 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)

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 create encap=rtsp addr="rtsp://10.66.131.64/high"

Creates an RTSP stream.

# stream 1 start

Starts the decoder by way of the stream ID. Returns a confirmation such as:

Stream started successfully.

Note

The stream must already be created and configured with a decoder (e.g., viddec 1 set stream=1).

# stream 1 get all

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

Stream ID         : 1
Name : (None)
Configuration:
Address : 236.65.140.44
UDP Port : 4440
Encapsulation : TS-UDP

Statistics:
State : STREAMING
Output : DECODER-2
Up Time : 2d4h38m22s
Bitrate : 6,195 kbps
Received Packets : 20,236,609
Received Bytes : 1,313,514,014
Received Errors : 0
Last Received : 0s ago
Stream PCR : 0x1f89765ca
MPEG2TS Lost Packets : 4
Corrupted Frames : 2
Pauses : 0
Source Address : fd00:10:65:132:5e77:57ff:fe00:ae6a
# stream 10 get all

Returns configuration information for decoder stream #10, where it is an SAP Discovered stream:

Stream ID         : 10
Name : "DVI42"
Configuration:
Address : 239.146.42.101 (SAP Discovered)
UDP Port : 4900
Encapsulation : TS-UDP

Statistics:
State : STOPPED
Output : Not Configured
Bitrate : 0 kbps
Received Packets : 0
Received Bytes : 0
Received Errors : 0
# 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.