Flussonic Media Server documentation

Multicast receiving

Flussonic able to capture the video sent via multicast over UDP MPEG-TS and UDP RTP.

To capture multicast Flussonic has to send an IGMP request to join the multicast group at the right network interface.

In the simplest case it is necessary to make a stream, give it a name and add the source: udp://

stream ort {
    url udp://;

Select network interface Anchor Anchor x2

A server receiving multicast usually has more than one network interface. For example one network card connected to LAN and used to receive video, and other connected to Internet, used to serve clients.

WAN interface often goes first and Flussonic by default will send to this interface its IGMP requests and will not get video.

To explicitly specify which interface must be used to receive multicast, you have to add to url IP address of this interface. For example, if eth2 have IP, then url will look like this:

stream ort {
    url udp://;

Capture MPTS Anchor Anchor x2

To capture multiprogram transport stream (MPTS) make a streams and add the source and specify program ID:

stream 1 {
  url udp:// program=2001;

stream 2 {
  url udp:// program=2002;

stream 3 {
  url udp:// program=2003;

OS tuning Anchor Anchor x2

Linux default settings do not allow to capture video via UDP without loss, so you have to significantly increase network buffers size.

There is detailed instructions on tuning linux network subsystem in performance article. It is important to note that to capture HD video recommended buffers size is about 16MB.

Capture issues Anchor Anchor x2

If you have any problems with quality of captured video, you should check what the problem is.

Remove all iptables rules. iptables -F.

Disable rp filter: sysctl -w 'net.ipv4.conf.eth0.rp_filter=0' and sysctl -w 'net.ipv4.conf.all.rp_filter=0'. Change eth0 to real interface if it differs.

If you run:

/opt/flussonic/contrib/multicast_capture.erl udp:// output.ts

will record 30 seconds video, copy it to your computer and watch that video in VLC, then you will get an undistorted picture of multicast enters the server. This script does not extract the MPEG-TS but writes raw multicast to disk.

If at this stage you got a nice smooth video, you can go ahead and run on the server itself:

curl -o output.ts

You will receive the video, which was captured by Flussonic, unpacked and packed back in MPEG-TS. Download this file to your computer and watch it locally to verify that quality of network connection does not affect the experiments.

If at this stage the video is also good, but when viewing from Flussonic freezes, the problem most likely is, that network connection is not enough to transfer video from Flussonic to you.

Switch issues Anchor Anchor x2

Sometimes problems arise with the settings of the switches. For example, one client had a problem with the limit on the number received channels. It turned out that there is a limit on the number of subscriptions on one port. It is possible to find out with the command:

#debug igmp snooping all

If you will see:

%Jun 25 15:12:18 2015 SrcIP is, DstIP is
%Jun 25 15:12:18 2015 Groups joined have reached the limit, failed to add more groups

it can be fixed with rasing up the limit:

#ip igmp snooping vlan XX limit group <1-65535>

Headend problems Anchor Anchor x2

We have met issues with group addresses on some headends (without names, sorry =)

Use group numbers from and upper. Sometimes numbers below may be not workable.