Skip to content

Data Source Types

A source is from where Flussonic receives a stream of video data. A 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 over which Flussonic receives video data, in other words, you need to know the URL. Make sure your input stream meets the requirements.

The input parameter in the stream settings specifies the source of a video stream. For example:


stream demo {
  input udp://239.255.0.1:5500;
}

This page includes examples of URLs for various protocols and other types of sources.

What not to specify as a source via the input parameter

  • 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 use a URL that explicitly specifies a video protocol — HTTP MPEG-TS, HLS or any other protocol supported by the system.

  • Broadcasting of files is configured differently from live sources. Learn more in VOD file broadcasting.

Important. To send video data between two or more Flussonic Media Servers we recommend using Flussonic's internal protocol M4F.

On this page:

M4F/M4FS and M4S

We recommend using M4F or M4S for sending video between Flussonic servers. They are both Flussonic-to-Flussonic protocols.

M4F is a segmented protocol recommended for any TV purposes, for mass video broadcasting. M4F is ideal for setting up replication of a DVR archive or for re-streaming individual streams in a cluster of Flussonic servers.

  • m4f://FLUSSONIC_HOST:PORT/STREAM_NAME — syntax
  • m4f://flussonic.example.com/channel_01 — example

About the M4F protocol

M4FS is similar to M4F with one difference: it works over HTTPS (uses SSL/TLS encryption). This protocol is recommended in the cases when encryption is necessary or required by content provider.

  • m4fs://FLUSSONIC_HOST:PORT/STREAM_NAME — syntax
  • m4fs://flussonic.example.com/channel_01 — example

M4S is a real-time streaming protocol, ideal to restream live video, such as video calls, and to stream games with a low delay between Flussonic servers.

  • m4s://FLUSSONIC_HOST:PORT/STREAM_NAME — syntax
  • m4s://flussonic.example.com/channel_01 — example

M4S allows ingest of only certain tracks from a source:

  • m4s://FLUSSONIC_HOST/STREAM_NAME/tracks-v2a1 — getting the 2nd video track and the 1st audio track.

If you have difficulty choosing between M4F and M4S, use m4f:// — it is a universal solution.

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

SPTS (Single-Program Transport Stream)

  • udp://MULTICAST-IP:PORT program=N — syntax (ingest over UDP), where parameter program specifies the program number N
  • 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, where 192.168.0.1 is the source IP. Flussonic is filtering input UDP unicast by specified IP
  • udp://224.0.0.251:1234?sources=192.168.0.12 — SSM ingest (Source Specific Multicast)

MPTS (Multiprogram Transport Stream)

  • mpts-udp://MULTICAST-IP:PORT program=N — syntax (ingest over UDP), where parameter program specifies the program number N
  • mpts-udp://224.0.0.251:1234 program=2001 — ingest of a specified program of a multicast stream.

Learn more about MPTS.

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

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 called "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 outdated 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;

Use this feature at your own risk — with it enabled, old content might be repeated over and over.


stream origin {
  input fake://fake;
}
stream input_hls {
  input hls://localhost:80/origin/index.m3u8 skip_stalled_check=true;
}

For HLS sources you can set the user_agent option:

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

RTSP

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

  • rtsp://hostname/path — syntax
  • rtsp://user:password@ip/path — URL with authorization
  • rtsp2://hostname/path — the rtsp2 protocol instructs Flussonic to transcode the audio stream into AAC. Learn more
  • rtsp://192.168.0.100/h264 — example of an RTSP URL

You can use the tracks=1 option to receive only video track.


stream cam1 {
  input rtsp://localhost:554/origin tracks=1;
}

RTMP

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

stream clock {
 input fake://fake;
}
stream input_rtmp {
 input rtmp://localhost:1935/static/clock;
}

Learn more at Ingesting RTMP streams

RTP

  • rtp://hostname:port
  • rtp://239.0.0.1:5600

Flussonic can ingest raw RTP multicast (i.e. video without MPEG-TS container) and detect the codec in use: H.264 or H.265 (HEVC). When the codec changes, the stream must be restarted manually.

Audio ingest via RTP is not supported for now.

File

  • file://vod-location/file.mp4 syntax
  • file://vod/bunny.mp4 a real configuration, more details about VOD path read here

Flussonic can create a loop-stream from any .mp4 or .ts file. Specify a stream source using the file:// schema.

DVB, ATSC, ISDB cards

  • input mpts-dvb://a0?program=1234

The scheme mpts-dvb:// allows capturing video from DVB, ATSC, and ISDB cards of various standards directly into Flussonic. Learn more

Timeshift

  • timeshift://STREAM/3600

The timeshift:// is a scheme that allows you to create a new stream identical to the stream but with a predefined delay. In this example the delay is 3600 seconds (one hour). It is delivered from the recorded archive.

SHOUTcast

  • shoutcast://source.example.com/radio.aac
  • shoutcasts://source.example.com/radio.aac

SHOUTcast is a protocol for streaming audio over an HTTP connection. Use shoutcast:// scheme to ingest SHOUTcast and ICEcast internet radio streams (shoutcasts:// for HTTPS sources).

SRT

Flussonic supports capturing SRT streams.

The general URL for ingesting an SRT source is:

srt://SRT-SOURCE:SRT_PORT?streamid=#!::m=request,r=STREAM_NAME

Learn more about SRT, streamid and other supported parameters at Using SRT protocol.

Possible URL options are listed at Ingesting SRT streams.

H323

  • h323://192.168.100.150

The scheme h323:// is used to ingest video via the VoIP protocol H323. Learn more

Mixer

  • mixer://stream1,stream2

Use the scheme mixer:// to mux video from the first specified stream with audio from the second one. Learn more

Mosaic

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

Use the scheme mosaic:// to create a mosaic — a combination of multiple video streams in one. Learn more

Copied stream

  • copy://stream_name

This source type allows you to copy any stream that you already have in the configuration. This is useful when you cannot capture the stream more than once, for example when ingesting from SDI cards or RTSP sources. Learn more.

MPEG-TS options

When working with tshttp://, udp://, and tstcp:// sources, you can use MPEG2-TS specific options.

Ingesting specific MPEG-TS programs and PIDs


stream clock {
  input fake://fake;
}
stream example {
  input tshttp://localhost:80/clock/mpegts program=1 pids=211;
}

Subtitles options

You can manage DVB subtitles in an output stream with the option subtitles, which has the following values:

  • drop — an output stream will have no subtitles track. See the example in Disabling subtitles below.
  • accept — an output stream will have a subtitles track in DVB, without conversion to text.
  • ocr_replace — an output stream will have a track containing subtitles converted to a text format (WebVTT).
  • ocr_add — an output stream will have two tracks containing subtitles: the original track with subtitles in DVB and a new track with text subtitles.

Accepting subtitles

By default, Flussonic Media Server always ingests subtitles from published streams. This is true for streams with either static or dynamic names. You generally don't need to explicitly set the option subtitles=accept.

Disabling subtitles

If you do not need subtitles in a stream, set the option subtitles to drop:


stream origin {
  input file://vod/subs.ts;
}
stream example {
  input tshttp://localhost:80/origin/mpegts subtitles=drop;
}

Note

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

The option allow_subtitles is now deprecated and supported only for backward compatibility.

Converting subtitles

Learn more about recognition and conversion of DVB subtitles in Converting DVB Subtitles to WebVTT

Editing the Language descriptor in the Program Map Table (PMT)

If an incoming MPEG-TS stream does not have the Language descriptor in audio PIDs, there might be problems playing on set-top-boxes, for example, if a certain language was set as preferred.

Flussonic 20.05 allows setting or editing the language for audio tracks in output MPEG-TS. For this the option lang in an input stream settings is used. It sets the ISO 639 language codes:


stream example {
  input tshttp://localhost:8080/example1/mpegts lang.default=eng lang.a1=eng lang.a2=rus;
}
stream example1 {
  input file://vod/multilang2.ts;
}

This coniguration adds the Language descriptors to the PMT of an output stream.

HTTP options

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


stream example {
  input tshttp://source:80/stream user_agent="VLC"
}

To specify a custom HTTP header, for example, Referer:


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

These options are found on the Input > Options page in the web interface.