Flussonic Media Server documentation

Data Source Types

Source is where Flussonic receives a stream of video data. Source can be an IP camera, a satellite headend, an HTTP server, and so on. To specify the source of a stream, you need to know its address and the video protocol, in other words, you need to know a stream's URL.

To send video data between Flussonic Media Servers we recommend using Flussonic's internal protocol M4F. This protocol is ideal for setting up replication of a DVR archive or for re-streaming individual streams in a cluster.

Important. Flussonic Media Server does not support the http data source type, and specifying an URL as http://host/path will result in an error. You should an URL that explicitly specifies a video protocol — HTTP MPEG-TS, HLS, or any other protocol supported by the system. This page has examples of URLs for various protocols.

Important. Do not specify a file on the server as a source. Broadcasting of files is configured differently from live sources. Learn more in VOD file broadcasting.

M4F

We recommend using M4F to send video between Flussonic servers.

  • m4f://hostname:port/stream — syntax
  • m4f://flussonic.example.com/channel_01 — example

About the M4F protocol

MPEG-TS over HTTP

  • tshttp://hostname:port/stream — syntax (ingest over HTTP)
  • tshttps://hostname:port/stream — syntax (ingest over HTTPS)
  • tshttp://192.168.100.1/worldnews.ts — example of a URL

An HTTP MPEG-TS data source is, for example, VLC.

MPEG-TS over UDP

  • udp://239.255.1.1:5500 — multicast URL
  • udp://239.255.1.1:5500/192.168.10.1 — ingest of a multicast stream through the specified interface
  • udp://192.168.0.1:12345 — unicast URL

MPEG-TS over TCP

A TCP MPEG-TS data source.

  • tstcp://192.168.0.1:54321

HLS

  • hls://HOSTNAME/PATH/TO/MANIFEST.m3u8 — syntax
  • hls://10.0.0.1/news.m3u8 — example of an HLS URL
  • hls://example.com/news/index.m3u8 — example of an HLS URL.
  • hlss://HOSTNAME/PATH/TO/MANIFEST.m3u8 — syntax of ingest over HTTPS
  • hls2://example.com/news/index.m3u8 — ingest of a multi-bitrate HLS source.
  • hlss2://example.com/news/index.m3u8 — ingest of a multi-bitrate HLS source over HTTPS.

A generic HTTP server could serve a pre-packaged HLS manifest and chunks with video data. In the case where the manifest file is static Flussonic would not be able to ingest HLS stream. Flussonic Media Server will wait for new segments to appear until till timeout, then it will restart this source and try to fetch again the existing segments.

It is possible to validate a playlist by its modification time, but this method is not very reliable. By default, Flussonic Media Server has enabled feature calld "stalled check". Here, the server downloads only the new segments after the first fetch, making sure that no segments from first fetch will be used.

Sometimes you would want to make sure that your source is not a generic HTTP server, but a streaming server that will not serve outdated segments and you want to enable HLS source in ondemand configuration.

To make sure that your streaming server would not serve outdates segments in ondemand you should use this option.

Stale protection option affects stream startup time, when this option is enabled Flussonic Media Server will wait for at least 2-3 new segments before making stream available.

You can disable stale protection with this directive: skip_stalled_check=true;

You should use this featureon your own risk because you can get into situation when the old content will be repeated again and again.

stream ort {
  url hls://source:8080/stream/index.m3u8 skip_stalled_check=true;
}

For HLS sources you can declare user_agent option:

hls://source:8080/stream/index.m3u8 user_agent="Custom Agent v1.2"

RTSP

When receiving a stream from an RTSP camera, you should include in the URL the camera's IP address and the path to the RTSP stream. The path is not always published in cameras' manuals. You might need to contact the camera's seller or manufacturer for this information.

  • rtsp://hostname/path — syntax
  • rtsp://user:password@ip/path — URL with authorization
  • rtsp2://hostname/pathrtsp2 protocol enables audio transcoding into AAC. Learn more
  • rtsp://192.168.0.100/h264 — example of an RTSP URL

RTMP

  • rtmp://hostname/application/stream
  • rtmp://10.0.0.1/live/news

RTMP protocol requires that an RTMP URL has at least two segments. The first segment (application) is by default used as the name of the RTMP application.

If the name of the RTMP application on the server consists of more than one segments, add two slashes to the URL in order to explicitly divide the RTMP application and stream name.

MPEG-TS options

For tshttp://, udp://, tstcp:// sources you can use additional options:

Ingest of a specific MPEG-TS program and PIDs:

stream ort {
  url tshttp://source:8080/stream program=21 pids=45,46,47;
}

Reject subtitles

By default, Flussonic Media Server ingests subtitles in published streams. This is true for streams with either static or dynamic names. There is no need to explicitly set the option allow_subtitles=true.

If you do not need subtitles in a stream, set this option to false:

stream ort {
  url tshttp://source/stream allow_subtitles=false;
}

Note. For live published streams (streams with dynamic names), subtitles are always ingested and cannot be disabled. The option allow_subtitles=false will not work.

Enable NIT table bypass:

stream ort {
  url tshttp://source:8080/stream bypass_eit=true;
}

Enable this option if you want to get EPG data on Flussonic output.

HTTP options

When connecting to a stream over HTTP, you can set the User-Agent HTTP header with the user_agent option:

tshttp://hostname:port/stream user_agent="VLC"

Custom HTTP header, for example 'Referer':

stream example {
  url tshttp://source:8080/stream header.Referer=https://flussonic.com;
}

Timeshift

  • timeshift://stream/3600

Timeshift is a protocol that allows to create a new stream identical to the stream but with predefined a delay. In this example the delay is 3600 seconds (one hour).

SHOUTcast

  • shout://source:8080

SHOUTcast data source.

Mixer

  • mixer://stream1,stream2

This configuration allows to add the audio track from the second stream to the video track form the first stream. Learn more

Mosaic

  • mosaic://cam1,cam2,cam3,cam4?fps=20&preset=ultrafast&bitrate=1024k&size=340x240&mosaic_size=4

This configuration allows to display a number of streams on one screen. This is called a mosaic. Learn more