Video Playback
Protocols for video playback
Flussonic Media Server can play video streams via various protocols.
On this page you will find:
-
the URL addresses that you should use in players in order to play video via different protocols
-
links to sections that provide more information about configuring the playback via each certain protocol
Playback options can be found in the Flussonic's web interface in the Output tab in stream settings.
You can also play a stream in the Preview Player directly in the Flussonic UI.
Additionally, you can manage video playback via the Streaming API.
embed.html
URL: http://FLUSSONIC-IP/STREAMNAME/embed.html
Flussonic Media Server has a special page embed.html which is intended for video insertion to a website or viewing of video via a browser. The page automatically detects a browser version to select a supported protocol. For the majority of devices for today — it's HLS. Read more in the article «Video insertion on the website (embed.html)».
HLS
URL for the player: http://FLUSSONIC-IP/STREAMNAME/index.m3u8
Read more in «HLS playback». Use (embed.html)or any third-party player to insert HLS stream on your website. For example, hls.js or clappr.
HLS for multi-language streams, viewing using an STB or VLC
URL for the player: http://FLUSSONIC-IP/STREAMNAME/video.m3u8
Read more in «Multilanguage HLS».
MSE-LD
URL for the player: ws://FLUSSONIC-IP/STREAMNAME/mse_ld
HTML5 (MSE-LD)
The stream played through HTML5 is available at the URL: http://FLUSSONIC-IP/STREAMNAME/embed.html?realtime=true
Read more in «HTML5 (MSE) low latency playback».
DASH
The stream is available at the URL:
http://FLUSSONIC-IP/STREAMNAME/index.mpd
Also Flussonic Media Server has special playlist "rewind-N.mpd" with a wide sliding window that allows to rewind and pause DASH streams for many hours.
http://flussonic-ip/STREAMNAME/rewind-7200.mpd
Read more in «DASH playback».
MSS
The stream is available at the URL: http://FLUSSONIC-IP/STREAMNAME.isml/manifest
Playing individual tracks, selecting subtitle tracks
If a stream has several audio, video, and subtitles tracks, you can specify which tracks should be delivered. For this, specify track numbers by adding ?filter.tracks=
to the stream's URL.
http://FLUSSONIC-IP/STREAMNAME.isml/manifest?filter.tracks=v1a1
— select the first audio and second video tracks.http://FLUSSONIC-IP/STREAMNAME.isml/manifest?filter.tracks=a1
— select audio only.http://FLUSSONIC-IP/STREAMNAME.isml/manifest?filter.tracks=v1
— select video only.http://FLUSSONIC-IP/STREAMNAME.isml/manifest?filter.tracks=a1t2
— select the first audio and second subtitle tracks.http://FLUSSONIC-IP/STREAMNAME.isml/manifest?filter.tracks=v1t1t2t3
— select the first video track and three tracks with subtitles.
Selecting tracks is useful to play video on client devices that do not support, for example, the multi-language MSS manifest.
MSS DVR catchup playback
You can request a fragment of an archive as a file by using the following URL:
http://FLUSSONIC-IP:PORT/STREAM_NAME(archive=1651829645-120).isml/manifest
See API reference.
MSS event playback
Accessing the archive starting from the present moment (that is, live) and with the possibility to rewind back to the specified time (1651829645 in the example):
http://FLUSSONIC-IP:PORT/STREAM_NAME(archive=1651829645-now).isml/manifest
See API reference.
MSS rewinding
Playlist with a wide sliding window that allows you to rewind MSS streams and pause them for many hours:
http://FLUSSONIC-IP:PORT/STREAM_NAME(rewind=7200).isml/manifest
MSS absolute timeshift
URL for MSS playback with absoulte timeshift:
http://FLUSSONIC-IP:PORT/STREAM_NAME(timeshift_abs=1651829645).isml/manifest
MSS relative timeshift
URL for MSS playback with relative timeshift:
http://FLUSSONIC-IP:PORT/STREAM_NAME(timeshift_rel=600).isml/manifest
HTTP MPEG-TS
The stream is available at the URL: http://FLUSSONIC-IP/STREAMNAME/mpegts
HTTP MPEG-TS relative timeshift
The URL for HTTP MPEG-TS playback with relative timeshift:
http://FLUSSONIC-IP:PORT/STREAM_NAME/timeshift_rel-3600.ts
In this example, the recorded stream will be played with one hour (3600 seconds) delay.
HTTP MPEG-TS absolute timeshift
The URL for HTTP MPEG-TS playback with absolute timeshift:
http://FLUSSONIC-IP:PORT/STREAM_NAME/timeshift_abs-1643257722.ts
.
A fragment of an archive can be retrieved not on the full speed, but in the streaming mode, over a time equal to the length of the fragment.
RTMP
The stream is available at the URL: rtmp://FLUSSONIC-IP/static/STREAMNAME
RTMP DVR playback
To play an archive via RTMP, use the following arguments:
var flashvars = {
streamer:'rtmp://FLUSSONIC-IP/rtmp',
file: 'ort?from=1398267588&to=1398268588',
'rtmp.tunneling':false,
autostart: true
};
swfobject.embedSWF('/flu/jwplayer.swf',element,'640','480','10.3','false', flashvars,
{allowfullscreen:'true',allowscriptaccess:'always'},
{id:'jwplayer',name:'jwplayer'}
);
So you need to put a name of the stream, and add a query string with required from
parameter and optional to
parameter.
Also you can use the parameter speed=2
, speed=4
or speed=8
so that Flussonic will play an archive in the accelerated mode (without a sound).
RTSP
The stream is available at the URL: rtsp://FLUSSONIC-IP/STREAMNAME
If a stream has several audio and video tracks, Flussonic uses the first track by default (a1v1).
You can specfy which tracks Flussonic must deliver. For this, specify track numbers in the tracks
parameter of the stream's URL.
Examples:
-
rtsp://FLUSSONIC-IP/STREAMNAME?tracks=a2v1
-
rtsp://FLUSSONIC-IP/STREAMNAME?tracks=a2v1&from=1
— DVR. -
rtsp://FLUSSONIC-IP/vod/file?tracks=a2v1
— VOD. -
rtsp://FLUSSONIC-IP/STREAMNAME2 = rtsp://FLUSSONIC-IP/STREAMNAME1?tracks=v1a1
Selecting only one track:
-
rtsp://FLUSSONIC-IP/STREAMNAME?tracks=a1
— select an audio track. -
rtsp://FLUSSONIC-IP/STREAMNAME?tracks=v1
— select a video track.
If you specify more than two tracks or make a syntax error, the default tracks will be used (a1v1).
RTSP DVR playback
Flussonic can play an archive via RTSP. You should use URL like this:
rtsp://FLUSSONIC-IP:PORT/STREAM_NAME?from=1398267588&to=1398268588
So you need to put a name of the stream, and add a query string with required from
parameter and optional to
parameter.
WebRTC
The stream is available at the URL:
-
ws://FLUSSONIC-IP/STREAM_NAME/webrtc
-
wss://FLUSSONIC-IP/STREAM_NAME/webrtc?transport=tcp
— using TCP for delivery of a WebRTC stream.
Read more about our WebRTC player and how to organize playback in «WebRTC Playback».
SHOUTcast
The stream is available at the URL: http://FLUSSONIC-IP/STREAMNAME/shoutcast
Flussonic Media Server can deliver SHOUTcast, ICEcast radio stream.
SRT
Flussonic supports playing SRT streams.
SRT protocol offers three modes: Caller, Listener, and Rendezvous. Flussonic acts as a Listener during a playback. It waits for a connection and, as soon as it is established, it starts to communicate with the Caller.
SRT port is usually configured per stream, i.e. one SRT stream per port. Nevertheless, Flussonic provides you with the way to set up a single SRT port for multiple streams. For example, if you use SRT for restreaming only, it may come in handy. We will introduce you to both ways further.
One SRT stream per port
To configure an SRT port to play a single SRT stream, use srt_play
configuration in the stream settings like so:
stream example_stream {
input fake://fake;
srt_play {
port 9998;
}
}
To play the stream, use the following URL:
- srt://FLUSSONIC-IP:SRT_PORT
where:
-
FLUSSONIC-IP is an IP address of your Flussonic server.
-
SRT_PORT is an SRT port, specified for playback.
Thus, for our example_stream
the link will look as follows: srt://localhost:9998
.
Using the srt_play
you allow to play the SRT stream over a specified port.
You can also define an SRT port for a particular stream not only for a playback, but also for publishing.
To learn more about publishing SRT streams to Flussonic, see Publishing SRT stream.
To configure a single SRT port to publish and play a stream, use srt PORT_NUMBER
option in the stream settings:
stream example_stream {
input publish://;
srt 9998;
}
In the example above we publish some SRT stream to example_stream
over port 9998
and we can also play this stream over the same port, using the following URL format:
- srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::m=request
where:
- m=request is a playback mode.
streamid
is used here to specify the mode m=
to play the stream example_stream
as it is not obvious now whether we are going to publish the stream or to play it.
So the URL for our stream is srt://localhost:9998?streamid=#!::m=request
.
Besides using one SRT port for one stream, thus, allowing playback for a particular stream, Flussonic provides you with the way to use one port for multiple SRT streams.
One SRT port to play multiple streams
To enable one SRT port for playback only for any number of streams, use srt_play
as a global setting:
srt_play {
port 9998;
}
stream example_stream {
input fake://fake;
}
To play example_stream
over the 9998
SRT port, use the following URL:
- srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::r=STREAM_NAME
where:
- r=STREAM_NAME is a stream name.
So in our case the URL looks as follows: srt://localhost:9998?streamid=#!::r=example_stream
.
Let us consider one more example. Say you publish an SRT stream to Flussonic over a specified publishing port, and then you need to play it along with other streams. So the example configuration looks as follows:
srt_play {
port 9998;
}
stream example_stream {
input fake://fake;
}
stream another_stream {
input publish://;
srt_publish {
port 8888;
}
}
The URL for another_stream
is different from the URL for the example_stream
stream, and looks as follows:
- srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::r=STREAM_NAME,m=request
where:
-
m=request is a playback mode.
-
r=STREAM_NAME is a stream name.
So the resulting URL for our example: srt://localhost:9988?streamid=#!::r=another_stream,m=request
.
The summary is tabulated in the table below for your convenience:
Playback URL | Configuration | Description | URL example |
---|---|---|---|
srt://FLUSSONIC-IP:SRT_PORT |
stream example_stream { input fake://fake; srt_play { port 9988; } } |
Allows playing only one stream per port. Supported by most players. |
srt://localhost:9988 |
srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::m=request |
stream example_stream { input publish://; srt 8888; } |
Allows publishing and playing a stream over the same SRT port. | srt://localhost:8888?streamid=#!::m=request |
srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::r=STREAM_NAME |
srt_play { port 9999; } stream example_stream { input fake://fake; } |
Allows playing several streams over the same SRT port. | srt://localhost:9999?streamid=#!::r=example_stream |
srt://FLUSSONIC-IP:SRT_PORT?streamid=#!::r=STREAM_NAME,m=request |
srt_play { port 9988; } stream example_stream { input fake://fake; } stream another_stream { input publish://; srt_publish { port 8888; } } |
Having a specified publishing port for the stream allows playing the stream over a globally defined SRT port. | srt://localhost:9988?streamid=#!::r=another_stream,m=request |
Flussonic allows you to manage the playback by setting the parameters.
Parameters for an SRT playback
Here is a list of parameters to manage SRT playback:
Parameters | Description | Example |
---|---|---|
minversion x.y.z |
The minimum SRT version that is required from the peer. | minversion 1.3.0. |
version x.y.z |
Required SRT version. | version 1.3.0 |
connect_timeout milliseconds |
Connection timeout (in milliseconds). | connect_timeout 1500 |
enforcedencryption 1/0 |
If set to 1, both connection parties must have the same password set (including empty, in other words, with no encryption). If the password doesn’t match or only one side is unencrypted, the connection is rejected. Default is set to 1. | enforcedencryption 0 |
passphrase string |
Password for the encrypted transmission. Its length can vary from 10 to 79 characters. | passphrase 9876543210 |
linger seconds |
The time (in seconds) that the socket waits for the unsent data when closing. Default is set to -1 (auto). | linger 2 |
latency microseconds |
Packet delivery delay (in microseconds). Used to absorb bursts of missed packet retransmissions. | latency 1000000 (latency equals to 1 second) |
Example with passphrase
:
stream example_stream {
input fake://fake;
srt_play {
passphrase 0987654321;
port 9998;
}
}
The URL will look like this:
- srt://FLUSSONIC-IP:9998?passphrase=0987654321&streamid=#!::m=request
Getting data about played stream
You can make API requests to receive the information about the played stream. You can integrate the received data into any external system like site, monitoring, player, or mobile application.
The URL for getting technical information about the output media content:
http://FLUSSONIC-IP/STREAM_NAME/media_info.json
The URL for getting the information about DVR recording status of a stream:
http://FLUSSONIC-IP/STREAM_NAME/recording_status.json
Preview Player in Flussonic UI
You can play a stream directly in Flussonic UI using the Preview Player. This player allows to play a stream via HLS, MSE-LD, or DASH protocol. Additionally, DVR playback is available for streams with DVR enabled. The Preview Player uses the special embed.html page (for details, see Adding Video to Websites) with corresponding parameters.
To open the Preview Player, go to Media > Streams and click the Play button next to the corresponding stream.
In the opened window choose one of the tabs and start playing. The following tabs are available:
- HLS — for HLS playback. The player will use
embed.html
page. - MSE — for HTML (MSE-LD) low latency playback. The player will use
embed.html?realtime=true
page. - DASH — for DASH playback. The player will use
embed.html?proto=dash
page. - DVR — for DVR archive playback (if DVR is enabled). The player will use
embed.html?dvr=true
page. You can read more about the settings of DVR player in the Viewing the DVR recordings from the web interface chapter.
In the bottom of the Preview Player window you can see HTML code for inserting the corresponding player into a web page.
To close the Preview Player window, press Esc.
Setting up output protocols for a stream
The URLs described earlier on this page can be found in the Flussonic UI on the Output tab of stream settings.
By default, playback via all protocols is allowed, but you can prohibit playback via the protocols that you specify.
Starting from version 20.02, you can use a shorter notation for specifying output protocols for a stream. In the coniguration file, you can list all the protocols by using the protocols
option. You can also allow or prohibit API requests by using the api
parameter in this option.
The previously used notation is still supported.
Example
For example, you want to allow all protocols except MPEG-TS and HLS for the stream channel_01
.
In the configuration file, the settings look as follows:
stream channel_01 {
protocols -mpegts -hls;
}
If you want to allow only DASH playback and API requests for the stream channel_02
and disable other protocols:
In the configuration file, the settings look as follows:
stream channel_02 {
protocols dash api;
}