How do I capture MPEG-TS video, write it on disk, and stream it via HLS?
How do I capture an MPEG-TS stream, write it to an archive on disk, and then deliver via the HLS or any other protocol?
How do I obtain MPEG-TS
MPEG-TS can be captured via UDP from satellite headend or from a DVB capture card.
Learn more about receiving MPEG-TS via HTTP or UDP in Data Source Types. And the following section tells about how to capture video from DVB cards directly to Flussonic.
In any case, you should enter an appropiate URL as a stream source when you add a stream to Flussonic. To do so, open the Flussonic UI and click Add next to Streams, and then enter the stream name and its URL.
In the example, we create a stream having a UDP source, name it
ort, and add a source URL
For detailed explanations about multicast ingest and related issues, see Multicast Receiving.
How to configure the DVR
With Flussonic Media Server, you can record video streams to the archive on disk and then play the recorded video. We call this functionality DVR (digital video recording).
Flussonic stores recorded video streams in its internal representaion, independent of any specific video protocol. You can access a recorded stream via various protocols. The only thing you need is to enable DVR by adding a special option to the stream settings, and then use a special URL to play it back.
To start recording an archive, click a stream in the list in Media, go to the DVR section, and in the Path box specify the path to the directory on the server to store the recordings. You can also enable the archive manually through the configuration file. For details, see the guide on how to configure DVR (Digital Video Recording).
How to check that the archive is recorded all right
You can check the operation of the archive in the Flussonic UI on the DVR tab in stream settings. This tab opens the DVR player. The same player is opened by the URL
How to play a stream's archive via HLS
To choose the output protocol, you should know which codec is supported by the majority of devices that your audience will use to watch the stream. See the list of supported formats for live streams
The guide on how to access the archive via various protocols gives you the examples of URLs for playing the recorded video stream.
There are a number of ways and protocols to access the archive. Let's look at some of them.
To access the archive via HLS, add the following URL to the player or Middleware that you use:
Here, TIME is the beginning of the extract, in Unix Timestamp in the UTC time zone, and DURATION is the duration of the extract in seconds.
Use the Flussonic's player embed.html.
ago option, the player will play live and allow rewinding back for the specified number of seconds:
dvr=true option, the player will play archive and offer navigation tools:
Save as a .ts file
Request the specified part of the archive and save it as a .ts or .mp4 file. Learn more
Traditionally, the MPEG-TS protocol provides a standardized mechanism for selecting the language tracks and subtitles in the same video bitrate.
The HLS protocol that is based on MPEG-TS rejects packing multiple audio tracks into the same stream and proposes to place alternative audio tracks in separate segments, which then should be mixed in the player. This is how the iOS player works, but it is not how most players in STB work.
To make the user see several languages, in streaming videos via HLS to such STB, such as Mag, Dune, Eltex, use the URL (note that
video prefix is used instead of
http://FLUSSONIC-IP/STREAM_NAME/timeshift_abs_video-1429829884.m3u8 should be used.
When you request such URLs, Flussonic packs tracks in a different way, and makes it possible for players that do not support the HLS standard completely to reach various audio options.