Installation of IPTV / OTT platform. From original streams to the first client.
Schematic presentation of platform
Work plan
Original streams
In this article, we use test streams from various rightholders.
TVIP Mira transcoder is used to provide the service on all possible platforms as well as an adaptive bitrate. This article does not contain its configuration.
Streams segmentation and publishing, DVR
Flussonic acts as a streamer, its settings will be described below. Output streams from transcoders are configured for the flussonic input.
Streams protection
TVIP CAS configuring for the work with TVIP TMS and flussonic
Setting up channels in TMS
Channel design (logos, names, EPG linking),
using fake epg
Creation of tariff plans.
Basic user data, assignment of tariff plans
Connecting devices to the account
Demonstration of connecting various devices to the account
  • Using login and password
  • Using QR code
  • Using quick binding option
API for TVIP TMS interaction
Examples of enabling / disabling account, the appointment of tariff plans. Examples on Curl
Stream segmentation and publishing
In this article, we don't describe setting up transcoder for TV broadcasting purposes, the following streams will be available at the output of the transcoder:

HD media:
Живая природа: udp://
RT HD: udp://
RTД HD: udp://
Мир 24 HD: udp://
Мир Премиум HD: udp://
DW: udp://
France 24: udp://
Bridge Русский Хит: udp://
Bridge TV Classic: udp://
Глазами Туриста: HD:udp://

All streams have several videotracks with different bitrates. HLS output stream from Flussonic will support adaptive bitrate.

When configuring flussonic, you need to take a responsible approach to the name of the stream, in the future, in TMS it will be used to organize timeshift and catch-up services.
How does adaptive bitrate work?
Let's consider, output stream from Flussonic, using playlist content as in the example, with which the player will work. Focusing on the BANDWIDTH, AVERAGE-BANDWIDTH tags, the player starts broadcasting from one of the bitrates specified by the broadcaster (the first in the playlist). In the future, the player constantly measures the download speed of media segments and switches to the best quality that the bandwidth of the connection provides.
$ curl
Timeshift, Catch-up, DVR
Timeshift - pause
Catch-Up, DVR - access to the archive, both through rewinding and selection of a specific program for viewing is possible.

All services are provided by flussonic DVR, real timeshift will be available only within the archive.

Selecting a hardware platform for DVR is a rather laborious task, in addition to the total volume of the archive, its distribution among disks, one must take into account the read speed (access to the archive) of a particular disk. During operation, popular channels are distributed to different disks to provide quick access to specific records.
Example of setting up one channel in Flussonic streamer
The flussonic configuration file is located in /etc/flussonic/flussonic.conf

In this config, all streaming protocols are disabled, except for HLS, the archive is configured for 5 days, but it cannot occupy more than 95% of the section, DRM is also configured - receiving encryption keys from TVIP CAS (
TVIP CAS is based on AES-128 is implemented on all possible players and provides more coverage than alternative DRM systems.

Detailed description of setting up streaming.
stream hdmedia {
  url udp://;
  dvr /data 5d 95%;
  hds off;
  rtmp off;
  rtsp off;
  dash off;
  mpegts off;
  m4s off;
  m4f off;
  drm aes128 keyserver=;
CAS server configuration
The server CAS configuration file is located at /opt/tvip-cas/application-prod.yml

In this example, it is behind the NGINX proxy installed on the same server that provides SSL and balancing, in this example balancing is not considered, the general recommendation is to always place the service behind NGINX.

Of the essential settings, you should specify all TMS addresses working with the CAS server and the addresses of all streamers (in our case, flussonic), you also need to specify the private-key and secret-key.
    host: localhost
    port: 6379
    password: c8f1ee9a7c5fd4b3c66d7559e99807d0
  port: 8081

# Address list of TMS servers. This CAS server may subscribe on these servers to get any appropriate notify requests and
# may get content access information. This feature is allowed for master CAS servers only.
# Address list of streaming servers that are allowed to send requests to this CAS server
# Alias that will be specified as the URL root, when the link is being generated for the client to get the encryption key
# to decrypt the content segment
# Address list of proxy servers. They are allowed to mask the actual server remote address and deliver it to check
# in "white" list of servers (TMS or streaming) depending on the request context.
# If non-empty value specified, it means that this CAS server works as slave
# and may not write any content access information or generate content encryption keys, but only
# deliver any existing keys if allowed by content access info. Master server URL must have no prefix, but port,
# like

# Application settings
# Used as the application identifier, when interacting with TMS servers
  name: ''
# Application-specific prefix for keys in Redis
  namespace: 'cas-server'
# Private key that is used to sign requests from CAS server application
  key: 'f698f997c68f2db029e612e95566badbf'
# Secret that may be used to generate key in case of fail back scenario.
# If no specified or empty, fail back key generation is not used.
  secret: 'real-secret-key'
From TMS side, you should provide the CAS server address and the key specified in the CAS server settings.
CAS Server connecting to TMS
Flussonic setup summary
At this stage, we have a set of streams, an archive of each channel for 5 days, streams are protected from unauthorized access

HD media:
Живая природа:
Мир 24 HD:
Мир Премиум HD:
France 24:
Bridge Русский Хит:
Bridge TV Classic:
Глазами Туриста HD:

To organize DVR we used in our example, we advise you to split live and dvr broadcasting at the logic level, in more complex examples this allows you to simplify further configuration.

TVIP TMS supports two protocols:
The example shows XML-TV protocol from
EPG setup
TMS supports creating multiple DVR sources, in our example presented one DVR server.
In its options, you should specify the address of the DVR server (flussonic) and the default archive depth in seconds. In example below - 5 days.
DVR setup
When creating a channel, pay attention to the System-name, it should exactly repeat the name of the stream in flussonic. Based on this name, the URL for the archive is formed.
To configure the DVR - you need to select the DVR server created in the previous step.
To configure EPG - you need to select the channel name in the EPG source.
Channel setup
Service tariffication
Tariffs are implemented through tagging systems for channels and tariff plans, for more information follow the link .
Subscription management is available both through the admin panel and the API. To check the result, after adding channels and setting up tariff plans, we will check how it works through the web portal.
Create demo user with the password 12345678 and add Base subscription to it.
Adding a subscription
Портал доступен по адресу
Devices connection and API