Skip to content

MPTS push

Flussonic can compile MPTS streams (also called multiplexers) that can be fed to a modulator and sent to a cable network, broadcast, or satellite. Please find more info about what the multiplexer is and where it is applied on the Multiplexer page.

Note

Flussonic can also receive MPTS to split it to STPS.

Creating an output MPTS stream

For sending streams to MPTS the transponder directive is used:

stream channel1 {
  input udp://239.0.0.1:1234;
}
stream channel2 {
  input udp://239.0.0.2:1234;
}
transponder tp1 {
  bitrate 6400k;
  ts_stream_id 2;
  provider Flussonic;
  push udp://239.172.0.1:1234 multicast_loop;
  push file://dumpts.ts;
  program 1010 {
    source channel1;
    title Channel1;
    pid 1010 pmt;
    pid 1011 v1 pcr;
    pid 1012 a1 bitrate=150;
    pid 1013 l1;
  }
  program 1020 {
    source channel2;
    title Channel2;
    pid 1020 pmt;
    pid 1021 v1 pcr;
    pid 1022 a1 bitrate=128;
    pid 1023 l1;
  }
}

The result is represented as follows on the graphs of the DVB analyzer:

CBR MPTS

CBR MPTS

CBR MPTS

This stream can be safely fed to the modulator and sent to the cable network, broadcast or satellite.

Choosing output tracks

An input stream might contain a lot of tracks with subtitles, audio, video and so on, and you will probably not need all of them in an output MPTS stream. You can specify which track to include into output MPTS by assigning it to a PID as follows:

transponder tp1 {
  bitrate 6400k;
  push udp://239.172.0.1:1234 multicast_loop;
  program 1020 {
    source channel1;
    title Channel1;
    pid 1020 pmt;
    pid 1021 v1 pcr;
    pid 1022 a1;
    pid 1023 l1;
  }
}

Note

You can use video tracks (v1, v2, ...), audio tracks (a1, a2, ...) and teletext tracks (l1, l2, ...) in MPTS streams. Tracks with WebVTT text subtitles will not work in the resulting MPTS.

Only tracks with an assigned PID will be sent to multiplexer or pushed to UDP. If no tracks were specified, all of them will go to output MPTS with automatically assigned PIDs. But if at least one track was specified, then other tracks will not be included in the output.

This eliminates the need to create an additional stream to ingest only the tracks you want and then push this stream to MPTS.

Setting bitrates of tracks

We recommend specifying bitrates in transponder as follows:

transponder tp1 {
  bitrate 6400k;
  push udp://239.172.0.1:1234 multicast_loop;
  program 1020 {
    source channel2;
    title Channel2;
    pid 1010 pmt;
    pid 1021 v1 pcr;
    pid 1022 a1 bitrate=150;
  }
}

This allows you to adjust bitrates to better utilize bandwidth, by changing bitrates right during MPTS broadcast.

Buffer for uneven sources

If the source you're generating MPTS from sends data with significant gaps between packets, for example due to network jitter, the MPTS push may fail. To avoid problems with the pusher at an uneven source, increase the prebuffer parameter. It is a value in milliseconds that sets the maximum time to wait for the next packet from the source; default is 300ms. Note that this may increase the input-to-output latency.

transponder tp1 {
  bitrate 7000k;
  prebuffer 800;
  push udp://239.172.0.1:1234 multicast_loop;
  program 1 {
    source channel2;
    title Channel2;
    pid 1010 pmt;
    pid 1021 v1 pcr;
    pid 1022 a1 bitrate=150;
  }
}

Advanced settings of MPTS

SI table options

Flussonic 20.09 allows you to generate more complicated NIT containing LCN (logical channel number), T2 delivery system descriptor, and more options. Some of the options are included also in SDT.

Flussonic implements the configuration options in accordance with NorDig Unified Requirements for Integrated Receiver Decoders version 3.1.1 of NorDig.

You can add the following advanced options to the multiplexer:

  • network 13582 original=8833 name="Example network"; — delivery network. The same original (original network) is used for NIT and SDT.
  • ts_descriptor 0x04 04012283; — the tag and the HEX data of a descriptor. Any descriptor can be specified using this option. ts_descriptor for NIT ts_loop. In the example, the T2 delivery system descriptor is specified. Added to NIT and SDT.
  • ts_stream_id 2; — Added to NIT and SDT.
  • service_type — used like program 19 { service_type 0x16;} If the program has source specified, but service_type is not specified, then Flussonic tries to guess service_type by the received media_info.
  • timeout service_type 10; — if the source has not recovered during 10 seconds, then Flussonic excludes this program from broadcast. The default timeout is 15 seconds.
  • program P { lcn 7; } — logical channel number.

Versions of PSI tables

PSI tables have a version_number field. When you make a change to a table, the current version_number value in it should be incremented. This will signal the receiving devices (TV sets) to re-read the TS content. Flussonic supports specifying the version number in the multiplexer settings. This way, devices can apply or prepare for changes in the stream.

  • version psi VERSION_NUMBER — global version for all PSI tables.
  • version sdt VERSION_NUMBER — the version of a specific SI table, for example, SDT.

TOT (time offset table)

Flussonic generates the PSI table TOT (time offset table). It makes sense to specify TOT settings only in the main multiplexer, and not in other multiplexers (other).

Add the following options to the main MPTS stream configuration:

time_offset FRA:1 time_of_change=2018-03-23T03:00:00Z local_time_offset=+0100 next_time_offset=+0100;

Option meaning can be found in the specification

Example

The example of multiplexer configuration with advanced options:

transponder ts_tp {
  push udp://239.1.2.4:1234 multicast_loop;
  push file://tmp/ts-tp.ts pkt_limit=300000;
  bitrate 27000k;
  provider Flussonic;
  network 123123 original=12345 name="Example network 1";
  ts_stream_id 2;
  ts_descriptor 0x7f 040012340325;
  version psi 4;
  version sdt 9;
  time_offset RUS:7 time_of_change=2018-03-23T03:00:00Z local_time_offset=+0600 next_time_offset=+0600;
  timeout service_type 10;
  program 1020 {
    source clock;
    title Channel1;
    lcn 2;
    pid 1120 pmt;
    pid 1121 v1 pcr bitrate=500;
    pid 1122 a1 bitrate=150;
  }
  program 1030 {
    title Channel2;
    lcn 3;
    service_type digital_tv_mpeg2_hd;
  }
  program 1040 {
    title Channel4;
    lcn 4;
  }
  other @02;
}
transponder 02 {
  bitrate 0;
  network 123123 original=12345 name="Another network";
  ts_stream_id 1;
  ts_descriptor 0x7f 040033123325;
  program 1010 {
    lcn 1;
    service_type digital_tv_mpeg2_hd;
  }
  program 1070 {
    lcn 7;
    service_type 0x20;
  }
}

Adding links to other multiplexers

For the TV service, it is necessary that all channels included in the service are known to be displayed on client devices. Each transmitted multiplexer (MPTS stream), which contains only a part of the channels, must contain information about all the other channels transmitted from the satellite at other frequencies.

For example, 10 channels are transmitted on one frequency (MPTS stream, or in a multiplexer), and there are 40 frequencies in total, therefore, there are 400 channels, and information about them must be transmitted in each MPTS stream. To achieve this, add to each MPTS stream links to the configurations of other MPTS streams that are part of your service.

To add one such link, specify the name of another MPTS stream in the other option.

transponder ts_tp {
  push udp://239.1.2.4:1234 multicast_loop;
  push file://tmp/ts-tp.ts pkt_limit=300000;
  bitrate 27000k;
  provider Flussonic;
  network 13582 original=8833 name="Example network 1";
  program 1020 {
    source clock;
    title Channel1;
    lcn 2;
    pid 1120 pmt;
    pid 1121 v1 pcr bitrate=500;
    pid 1122 a1 bitrate=150;
  }
  other @02;
}
transponder 02 {
  bitrate 0;
  network 13582 original=8839 name="Another network";
  ts_stream_id 1;
  ts_descriptor 0x7f 040022830325;
  program 1010 {
    lcn 1;
    service_type digital_tv_mpeg2_hd;
  }
}

The multiplexer specified in other is carried in NIT and SDT.

Multiplexer failover

You can configure multiplexer redundancy so that when the main server stops broadcasting, the backup one starts broadcasting instead. To do this, add the standby=true option in the backup multiplexer push directive; the rest of the settings should be exactly the same as the main one.

The failover process is as follows:

  1. Both servers provide identical set of programs. The main server (without the standby option) broadcasts to the multicast group. The backup server routinely checks if the broadcast is ongoing but does not broadcast.
  2. When the main server stops broadcasting for some reason, the backup server detects that and starts broadcasting.
  3. As soon as the main server resumes the broadcast, the backup server stops broadcasting.

Examples of configuration for the main and the backup server:

transponder main {
  bitrate 6400k;
  push udp://239.172.0.1:1234 multicast_loop;
  program 1020 {
    source channel2;
    title Channel2;
    pid 1010 pmt;
    pid 1021 v1 pcr;
    pid 1022 a1 bitrate=150;
  }
}
transponder backup {
  bitrate 6400k;
  push udp://239.172.0.1:1234 multicast_loop standby=true;
  program 1020 {
    source channel2;
    title Channel2;
    pid 1010 pmt;
    pid 1021 v1 pcr;
    pid 1022 a1 bitrate=150;
  }
}

Configuring multiplexers in the UI

To add a multiplexer, go to Media - Multiplexers tab and click +. After you specify the name and bitrate for your new multiplexer, the settings become available. Click arrows to expand or collapse general and advanced settings.

multiplexer options

Then add programs to the multiplexer:

multiplexer options