stream
The stream
command is used to manage audio/video streams. The type
parameter only needs to be specified when creating a stream that will be used solely for recording and not sent on any network. For that specific use, use type=recorder
and simply specify the content sources.
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.
On Makito X HEVC units, to create an HEVC stream, specify 4 or 5 instead of 0 to 3 for the videosrc
id.
When a stream has started, you may either pause or stop it. The main difference between pausing and stopping a stream is that when a stream is paused, the configured still image will be streamed instead of the configured video source. For more information, see Configuring Still Image Streaming.
Synopsis
stream create [type=tx] [name=text] [id=number] |
Possible encapsulation formats and their specific options: ts-rtp: MPEG2 transport stream over RTP |
Parameters available for all ts-based streams: [videopid=pid] [audiopid=pid[,pid,pid]][datapid=pid] |
stream id/name stop |
Actions
Action | Description |
---|---|
create | Creates a streaming session from the encoder. A series of one or more |
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. |
pause | Pauses the specified stream ID or name. Note If configured, a still image will be streamed instead of the configured video source. See “stillimage” in Parameters below. |
resume | Resumes 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
Parameter | Default | Description/Values |
---|---|---|
| tx | The stream type, either transport stream or recorder. Note
|
| n/a | The destination IP address. Enter an IP address in dotted-decimal format. Note The Multicast address range is from |
| 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 | ||
| 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. |
| n/a | (Optional) When creating a stream, you can also specify a name for the stream. |
| on | (Optional) When RTP/RTCP is useful to collect network metrics such as network jitter, packet loss, etc. Note that this requires a remote decoder capable of supporting this feature as well. |
| n/a | (Optional, rtcp must be On) The destination UDP port for the RTCP session. |
| 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. |
| 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. 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. |
| 1496 | (Maximum Transmission Unit) Specifies the maximum allowed size of IP packets for the outgoing RTP data stream. 228..1500 |
encapsulation | ts-udp | (Optional) The Encapsulation Type for the encoded stream.
|
| yes | (Optional) By default, the stream will start immediately. To delay the start of a stream, specify |
| 0 | (Optional) The video source (ID/Name). For H.264, the Note By default, if you don't specify the source, the stream uses video encoder 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 Tip Combined videosrc/audiosrc/datasrc status shown under Contents in return output. |
| 0 | (Optional) The audio source (ID/Name). The Note To configure multi-track audio TS streams (TS over UDP or RTP), you can put more than one Important Audio sources should always be associated with the same video interface for the dual channel SDI encoder. (See Setting Up Streaming.) |
| n/a | (Optional) The metadata source. See metadata to determine the ID mappings. 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.: |
| 33 | (Optional) Video Packet Identifier. 16-8190 |
| 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.:
|
| 40 | (Optional) Data (metadata) Packet Identifier. 16-8190 |
| 34 | (Optional) (Program Clock Reference) Packet Identifier. Timestamp in the TS from which the decoder timing is derived. 16..8190 |
| 32 | (Optional) (Program Map Table) Packet Identifier. 16-8190 |
| 1 | (Optional) Program Identifier used in the Program Map Table (PMT) of the TS stream. 0-65535 |
| 0 | (Optional) Transport Stream ID. Identifies the transport stream in the Program Association table (PAT) of the TS stream. 0-65535 |
| n/a | (Optional) Specifies the filename of a static image that will replace the “real” video stream when streaming is paused. Note The static image file must already have been converted into a file containing an encoded single H.264 GOP sequence. You can either use the mkstill command, or the Web interface's Still Imagespage (see Configuring Still Image Streaming). Still Image insertion when pausing a stream is not supported when a HEVC/H.265 video encoder is selected as a content source. |
| no | (Optional) To enable Traffic Shaping for the stream, specify 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. |
| n/a | (Optional, shaping must be Note To configure the ceiling percentage for CBR streams with metadata, see Bandwidth Overhead for CBR Streams with Metadata. |
| no | (Optional, shaping must be |
| 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 |
| sync | Specifies the method of KLV data carriage:
|
| n/a | (Optional when streaming to a Flash-based Content Delivery Network (CDN) using RTMP encapsulation) Enter a Publish Name (511 characters maximum). Note A single Publish Name may be assigned to multiple streams, configured on separate servers or content distribution services, to provide redundancy and fail-over capability. The encoder will send multiple RTMP streams to different FMS servers using the same published name. If an FMS fails, the players will have the option of fail-over to the redundant FMS server. Important When interoperating with Kaltura using RTMP, add a slash “/” at the end of the URL provided by Kaltura. See CDN Interoperability (RTMP). |
| n/a | (Required when streaming to a CDN using RTMP) Enter the CDN login username. |
| n/a | (Required when streaming to a CDN using RTMP) Enter the CDN login password. |
| no | Enables Forward Error Correction (FEC).
Note VF FEC is a proprietary FEC and is not interoperable with devices outside of the Haivision family. |
SRT (see Configuring Secure Reliable Transport (SRT)) | ||
| caller | Specifies the SRT Connection Mode:
|
| auto | (SRT connection mode must be caller) Specifies the UDP source port for the SRT stream. |
| none | (encapsulation must be ts-srt ) Enables AES encryption and specifies the key length, either: none, AES-128, or AES-256 |
| n/a | (Only required and accepted if Range = 10-79 UTF8 characters |
| 250 | (encapsulation must be 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. |
| 25% | (encapsulation must be Range = 5-50% |
| no | (encapsulation must be ts-srt ) 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. |
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 |
# stream create addr=10.64.1.124 port=1234 encap=ts-udp videosrc=1 audiosrc=1 Creates and starts a multiple metadata streaming session. |
# stream create addr=10.64.1.124 port=1234 encap=ts-udp videosrc=1 Creates a TS stream with multi-track audio using audio encoders 0, 2 and 4. The corresponding |
# 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 Creates two streams, the first using Video and Audio encoder 0, and the 2nd using Video and |
# 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 all encoder streams, for example: Stream : 1 |
# stream 2 show stats Returns status information for Stream #2, such as: Session ID : 2 |
# stream 1 del Deletes Stream #1. |
Related Topics