User Tools

Site Tools


en:tvip_tms_faq_new

TVIP TMS FAQ

How to connect STB to TMS with account credentials

Set account login and password and save changes:

STB without provision, may be configure by this way:

From the Launcher screen go to TV settings

Choose Middleware API protocol (same as jsonapi in provision)

Setup protocol:

As server you must setup address of your server, example has http://tvip.media as server address:

After applying server you must see “Register” button, click button and enter account credentials.

After successful registration you can go to TV interface and check channel availability.

How to connect STB without account credentials?

In same cases yo can use Quick bind feature, used for pre activations boxes:

  1. Eneable option “Allow quick device bind” in provider settings (Settings → Providers)
  2. Add unique id of device in Device Editor (Account editor → devices grid, then click “+” in to left corner)

Limits of this method are disabling unregister feature from the box, all devices will be remove “Derigstration” from UI

How subscriptions plans works ?

Subscriptions plans (Tarif) joined to channels via Tags, example of this relations are pictured below:

In this example:

  • Channel “Channel A” and “Channel B” tagged by tag “public channels”
  • Channel “Channel B” and “Channel C” tagged by “sport channels”
  • Tariff (subscription plan) “All channels” included both tags (“public channels” and “sport channels”), this Tariff (subscription plan) are included all channels: Channel A, Channel B, Channel C
  • Tariff “Sport channels” include only “sport channels”, then that tariff included only Channel B, Channel C.

Same hierarchy allow flexibility tariff setup.

Tariff plans may be mapped to device and account entities, device subscriptions have more priority than account, account tariff plans will be accepted to device if device are not have tariff plans

In the same time device and account may be have anymore subscriptions, system is merging subscriptions to summary playlist.

How to setup DVR ?

TMS are support DVR from Flussonic streaming server.

Flussonic channel setup

Minimal channel setup on flussonic :

stream TEST{
  url udp://225.100.50.10:1234;
  dvr /media/HDD2 6d;
}

In this config we are declare channel TEST with DVR for 6 days, archive will be stored to “media/HDD2”, and archive will be allowed via HLS

More about DVR setup you may read there

Configure TVIP TMS

Common configuration

Declare DVR server via Channels→ DVR Servers In DVR editor will be setup theese parameters:

Base URL (not channel!), in our example that is http://fs.example.net, if your flussonic use non-standard port for streaming you must enter port via colons. For the server specify archive deep (in our example - 86400), that value will be used if channel specifed value is empty.

Channel setup

For the mapping Channel with Flussonic entity used attribute System name, that attribute will be same with Channel declaration in flussonic (in our Example - TEST)

At the line DVR specify server where archive stored: Also in next line you may be override archive deep from default value (defined in DVR server). Value presented in seconds.

nPVR and timeshift on the S-Box

Before 4.0.11 archive indicated by icon “Play” in the EPG screen:

From 4.0.11 version icon changed to cinema film in the EPG screen:

STB used “deep value” from TMS, if archive unavailable STB return to live stream.

After pressing pause button STB stay on timestamp and using DVR for playing from knowing timestamp. Local storage is not used for this case.

How to protect content?

TMS with Flussonic streamer support AES-128 encoding.

  1. flussonic are requesting encryption keys from tvip-cas server and encode content by that key, key rotation every 10 minutes.
  2. HLS playlist has special link to description key, client after detecting that link will be trying to request key via presented link (to tvip-cas)
  3. TVIP TMS and tvip-cas are sync license information, if licenese is allowed to device tvip-cas answer to request with key, else - answer with error.

About tvip-cas you can read in this article.

Authorization in Flussonic via Middleware

You can read this doc at Flussonic web site for explain how Auth via Middleware may help protect your streams.

1. Enable Flussonic auth feature for provider:

2. Enable feature for channel:

3. Setup auth path in Flussonic for each stream http://tms.example.com/api/drm/auth_token

stream test {
  url udp://225.101.15.6:1234;
  auth http://tms.example.com/api/drm/auth_token 12345=12345;
}

4. Update config file /opt/tvip-tms/gateway/gateway-tvip-tms-tvip-api/application-prod.yml

flussonic:
    app:
        secret:
            key: 12345

5. Update config file /opt/tvip-tms/gateway/gateway-tvip-cas-api/application-prod.yml

flussonic:
    app:
        secret:
            ttl: 86400
            key: 12345

6. Restart required services

systemctl restart gateway-tvip-tms-tvip-api
systemctl restart gateway-tvip-cas-api

Authorization of access to the stream by token on the streamer

How it works

  • TMS sends an access token to the device along with a link to the stream
  • the device calls the streamer for the stream and passes the token
  • the streamer checks the token using a known algorithm and allows/denies access to the stream depending on the token

Token Generation Format

<expires><path><key><ip>
  • key - secret row
  • ip - ip address of client

TVIP TMS Settings

  • Enable token settings for provider

Provider section → Your Provider, specify Secure link algoritm WOWZA_TOKEN

  • Secret row settings and Time to live of token.

In config file on TMS add next: /opt/tvip-tms/gateway/gateway-tvip-tms-tvip-api/application-prod.yml

wowza:
    app:
       secret:
          key: yourverysecretkey
          ttl: 87000
  • restart service for applying settings
systemctl restart gateway-tvip-tms-tvip-api

Setting up a token check on the example of a web server Nginx

location / {
  set $secret "yourverysecretkey1";
  secure_link $arg_secure,$arg_expires;
  secure_link_md5 "$arg_expires$uri$secret$remote_addr";

  if ($secure_link = "") {
    return 403;
  }

  if ($secure_link = "0") {
    return 410;
  }
}

Regions in TVIP TMS

Regionality allows you to control the issuance of channels in accordance with the regional affiliation of your account or provider within a single tariff plan.

In this example, two regions are considered: “London” and “Paris”. Challenge: “Channel One” and “Russia 1” channels were available for the London region. The “First Channel HD” and “Russia 1 HD” channels were available for the Paris region. Different channel names are considered for simplicity. Channel names may be the same.

1. Create two regions “London” and “Paris”

2. Create the tag for the new tariff plan “Tariff_tag_ExampleSP”

3. Create the tariff plan “Tariff_ExampleSP_wR”.

4. Create a Channel tag for the “London” and “Paris” regions. Add the necessary channels to them - “Channel One” and “Russia 1” for the “London” region, and Channel One HD and Russia 1 HD for the “Paris” region.

5. Go back to regional settings and add the appropriate “channel tag”.

6. Create accounts for users of the regions “London” and “Paris” and set the corresponding region.

6.1 In the subscription, select “Tariff_ExampleSP_wR”

Enabling option of VOD

1. Enabling option in configuration file /opt/tvip-tms/gateway/gateway-tvip-tms-tvip-api/application-prod.yml
at section application: add:

    features:
        vod: true

2. Restart service of gateway-tvip-tms-tvip-api

systemctl restart gateway-tvip-tms-tvip-api.service

3. You should get TMDB api key v3, for function of automatic import

4. Paste your key to configure file /opt/tvip-tms/manager/manager-tvip-tms-vod/application-prod.yml

tmdb:
    api-key: 'your_key'

5. Restart service of manager-tvip-tms-vod

systemctl restart manager-tvip-tms-vod.service

6. Enable tariff option of VOD in admin panel at section Tariffs–>tariff(Name)–>Tariff Settings.

Channel selection priority

For a specific channel, you can set a priority - this allows you to show a specific channel after the set-top box goes into standby mode or reboots.
This is configurable via TMS: create a new channel and in the “Extra” section in the “Channel Selection Priority” field, set the value.
You could to possible to assign different priorities for channels, the highest priority is selected by default, the use of different priority values ​​allows you to make tariffs with different priority channels.

How to enable logs at TMS

You should enable logging for each micro-service.
All log files located in /var/log/tvip-tms folder

  • application.log - general log file of application
  • framework.log - service log file
  • access.log - information of external operation
  • audit.log - extended information of external operation

Enabling logs to configure file: /opt/tvip-tms/*/manager-tvip-tms-*name/application-prod.yml

logging:
    config: log4j2-example.yml

Then you should restart micro-service .

systemctl restart manager-tvip-*name.service

:!: Where *name - the micro-service name

How to Reset password for Administrator in TVIP-TMS

You could reset password for admin user in TVIP-TMS

  • Connect to your TVIP-TMS server via ssh:
$ ssh login@tms.example.com
  • Connect to TMS database:
# psql -U tvip-tms tvip-tms
  • Replace password for user admin, in example used password is admin
tvip-tms=> UPDATE admin SET md5pw = '21232f297a57a5a743894a0e4a801fc3' WHERE login = 'admin';
  • Leave database console
tvip-tms=> \q;

We recommend using the following parameters to ensure that the icons are displayed correctly on all devices (640×360, 72 ppi, png), examples:

en/tvip_tms_faq_new.txt · Last modified: 2023/01/10 16:03 by Виталий Журавлев