Skip to main content

TS over RIST

Real time streaming of TS data over RIST

Pushing/Recording

The following push targets are matched by this output:
rist://*

TSRIST Optional configurations

OptionDescriptionTypeDefaultAPICommandline
MPEG Data track parserWhich parser to use for data tracks = None / disabled
json = 2b size-prepended JSON
datatrack--datatrack
debugThe debug level at which messages need to be printed.debugInherited from parent processdebug--debug
Default track sortingWhat tracks are selected first when no specific track selector is used for playback. = Default (last added for live, first added for VoD)
bps_lth = Bit rate, low to high
bps_htl = Bit rate, high to low
id_lth = Track ID, low to high
id_htl = Track ID, high to low
res_lth = Resolution, low to high
res_htl = Resolution, high to low
default_track_sorting--default_track_sorting
RIST profileRIST profile to use0 = Simple
1 = Main
1profile--profile
StreamWhat streamname to serve if no streamid is given by the other end of the connectionStringstreamname--stream
UsernameUsername to drop privileges to - default if unprovided means do not drop privilegesStringrootusername--username

TSRIST Push parameters

OptionDescriptionTypeDefaultAPICommandline
****Stringundefined
AES TypeSpecifies the specific encrytion. Specify "128" for AES-128 or "256" for AES-256. Remember that you must also specify the pass phrase, and that encryption is not supported for the simple protocol at all.Number (signed integer)0aes-typeundefined
Append to fileIf set to any value, will (if possible) append to an existing file, rather than overwriting itBooleanUnsetappendundefined
Audio track(s)Override which audio tracks of the stream should be selectedstringUnsetaudioundefined
BandwidthSets the maximum bandwidth in Kbps. It is necessary to configure the bandwidth to be higher than the max bandwidth of your stream(s). This is in order to allow room for messaging headroom, plus the re-requested packets. When tuning a connection for the first time, analyze your stream statistics locally at first, then start at 10% higher for a constant bitrate, 100% higher for variable bitrate. Especially for VBR, provide generous "headroom" in your bandwidth. You can always reduce it when configuring and tuning the connection.Number (signed integer)0bandwidthundefined
Buffer sizeSets the buffer size in milliseconds. The buffer size will work best at four to seven times the ping time.Number (signed integer)0bufferundefined
Cacnonical nameProvides a canonical name for the media. If multi-plexing more than one stream through a tunnel, this provides a convenient way to identify a particular stream within the log. You should make it standard practice to assign a cononical name whenever multi-plexing.Stringcnameundefined
CompressionUtilizes liblz4 to compress all traffic in the GRE tunnel0 = False
1 = True
0compressionundefined
Congestion controlThe three options for this parameter are 0=disabled, 1=normal and 2=aggressive. In general, don't set the parameter to "aggressive" unless you've definitely established that congestion is a problem.Number (signed integer)0congestion-controlundefined
Duration of pushHow much media time to push, in seconds. Internally overrides "recstop"Number (signed integer)Unsetdurationundefined
Keepalive intervalTime in milliseconds between pings. As is standard practice for GRE tunnels, the keep alive helps ensure the tunnel remains connected and open should no media be traversing it at a given time.Number (signed integer)0keepalive-intervalundefined
Key rotation intervalSets the key rotation period in milliseconds when aes and a passphrases are specified.Number (signed integer)0key-rotationundefined
Playlist path (relative to segments)If set, will write a m3u8 playlist file for the segments to the given path (relative from the first segment path). When this parameter is used, at least one of the variables $segmentCounter or $currentMediaTime must be part of the segment path (to keep segments from overwriting each other). The "Split interval" parameter will default to 60 seconds when using this option.stringUnsetm3u8undefined
Maximum retriesSets a maximum number of re-requests for a lost packet.Number (signed integer)0max-retriesundefined
Playlist max entriesWhen writing a playlist, delete oldest segment entries once this entry count has been reached (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete.Number (signed integer)UnsetmaxEntriesundefined
Max buffer duration for GOP count waitWhen waiting for GOPs on the main track, give up when this much data is available in the main track bufferNumber (signed integer)5s, or 120s when using a non-default GOP countmaxwaittrackmsundefined
Minimum retriesSets a minimum number of re-requests for a lost packet. Note that setting this too high can lead to congestion. Regardless of this setting, the size of the buffer and the roundtrip time will render too high a minimum value here irrelevant.Number (signed integer)0min-retriesundefined
RIST profileRIST profile to use0 = Simple
1 = Main
1profileundefined
Push delayEnsures the stream is always delayed by at least this many seconds. Internally overrides the "realtime" and "start" parametersNumber (signed integer)Unsetpushdelayundefined
Playback rateMultiplier for the playback speed rate, or 0 to not limitNumber (signed integer)1rateundefined
Don't speed up outputIf set to any value, removes the rate override to unlimited normally applied to push outputsBooleanUnsetrealtimeundefined
Media timestamp to start fromWhat internal media timestamp to start fromNumber (signed integer)Unsetrecstartundefined
Unix timestamp to start fromWhat unix timestamp to start fromunixtimeUnsetrecstartunixundefined
Media timestamp to stop atWhat internal media timestamp to stop atNumber (signed integer)Unsetrecstopundefined
Unix timestamp to stop atWhat unix timestamp to stop atunixtimeUnsetrecstopunixundefined
Reorder bufferSets the size for a secondary buffer in which after all re=requested packets have been received, the out-of-order packets are released in the correct order. in most cases there should be no need to adjust this setting, but it may be helpful in conjuction with very long distance/large buffer/poor network conditions.Number (signed integer)0reorder-bufferundefined
Return bandwidthSets the maximum bandwidth in Kbps for just the receiver-to-sender direction. This is an option which may sometimes help avoid congestion insofar as it may limit re-request messages in poor network conditions.Number (signed integer)0return-bandwidthundefined
Maximum Round Trip TimeSets the maximum rtt setting in milliseconds. See rtt-min for a more complete description. in most cases, minimum and maximum should be set to be equal to one another.Number (signed integer)0rtt-maxundefined
Minimum Round Trip TimeSets the minimum rtt setting in milliseconds. This can help reduce congestion by reducing the number of repeated re-requests in poor network conditions. More importantly, for very long-distance or connections that traverse under-sea cables, it may be important to adjust this setting.Number (signed integer)0rtt-minundefined
PassphraseSets the specified passphrase for Main or Advanced profile encryption. Note that simple protocol does not support encryption, and that you must in addition to the passphrase specify the "AES Type" parameter. The rotating keys shall be placed inside the rtcp messages, using your passphrase as the pre-shared key. Be sure that the passphrase for sender and receiver match!Stringsecretundefined
Session timeoutTerminates the RIST connection after inactivity/lack of keepalive response for the limit (in milliseconds) which you set with this parameter.Number (signed integer)0session-timeoutundefined
Split intervalPerforms a gapless restart of the recording every this many seconds. Always aligns to the next keyframe after this duration, to ensure each recording is fully playable. When set to zero (the default) will not split at all.Number (signed integer)Unsetsplitundefined
Media timestamp to start fromWhat internal media timestamp to start fromNumber (signed integer)Unsetstartundefined
Unix timestamp to start fromWhat unix timestamp to start fromunixtimeUnsetstartunixundefined
Media timestamp to stop atWhat internal media timestamp to stop atNumber (signed integer)Unsetstopundefined
Unix timestamp to stop atWhat unix timestamp to stop atunixtimeUnsetstopunixundefined
Stream IDSets the encapsulated udp destination port, this must be even.Number (signed integer)0stream-idundefined
Subtitle track(s)Override which subtitle tracks of the stream should be selectedstringUnsetsubtitleundefined
Playlist target ageWhen writing a playlist, delete segment entries that are more than this many seconds old from the playlist (and, if possible, also delete said segments themselves). When set to 0 or left empty, does not delete.Number (signed integer)UnsettargetAgeundefined
Unmask tracksIf set to any value, removes any applied track masking before selecting tracks, acting as if no mask was applied at allBooleanUnsetunmaskundefined
Video track(s)Override which video tracks of the stream should be selectedstringUnsetvideoundefined
Virtual destination portThe port within the GRE tunnel. This has nothing to do with the media port(s). If the GRE is device /dev/tun11, having an address of 1.1.1.2, and the virtual destination port is 10000, and your media is using port 8193/4, the operating system will use 1.1.1.2:10000 as the destination from the sender's point of view, or the inbound on the receiver's point of view. libRIST will make use of that device/IP/port. As far as your media source and media player are concerned, the media is on ports 8193/4 on their respective interfaces. The media knows nothing of the tunnel.Number (signed integer)0virt-dst-portundefined
Wait for GOP countBefore starting, wait until this number of GOPs is available in the main selected trackNumber (signed integer)2waittrackcountundefined
Path weightSets the relative share for load balanced connections. The best way to describe this will be to provide an example. The default is five, so in a setup where two paths are given weights of 5 and 10 respectively, the former would receive 1/3 of packets sent, and the latter would receive 2/3.Number (signed integer)0weightundefined