Admin Guides

Admin Guides

If you are a SmartLabs customer you can download the administrator guides below using your SmartLabs Tech Support Center login credentials.

If you are interested in more technical details about SmartLabs products, please contact our sales team at sales@smartlabs.tv.

  • SmartTUBE 9.2:
    • Administration Guide — PDF
    • OSS/BSS Integration API — PDF
    • EPG Import Format — PDF
    • VoD Metadata Import Format — PDF
  • SmartMEDIA 9.2. Administration Guide — PDF
  • SmartCARE 9.1. Administration Guide — Web Help
  • UDRM. Administration Guide — PDF
  • How-to Articles — Web Help

Note: The administrator guides provided in the Web Help archives must be extracted, and the index.html file should be opened.

Admin Guides

If you are a SmartLabs customer you can download the administrator guides below using your SmartLabs Tech Support Center login credentials.

If you are interested in more technical details about SmartLabs products, please contact our sales team at sales@smartlabs.tv.

  • SmartTUBE 9.2:
    • Administration Guide — PDF
    • OSS/BSS Integration API — PDF
    • EPG Import Format — PDF
    • VoD Metadata Import Format — PDF
  • SmartMEDIA 9.2. Administration Guide — PDF
  • SmartCARE 9.1. Administration Guide — Web Help
  • UDRM. Administration Guide — PDF
  • How-to Articles — Web Help

Note: The administrator guides provided in the Web Help archives must be extracted, and the index.html file should be opened.

SmartTUBE Overview

SmartTUBE Introduction

Download PDF

SmartTUBE is a complex solution that enables operators to deliver both OTT and IPTV services to subscribers. Its primary objective is to offer a range of subscriber-level services, including:

  • Live TV, Catch-up, nPVR and other related services
  • VoD content watching and purchase directly in the app
  • High quality content playback on end-user devices of various types 
  • Access services and watch content on multiple devices at the same time 
  • Fast and convenient search for TV channels, programs and VoD content

The SmartTUBE comprises the SmartTUBE Service Delivery Platform (SDP) and SmartTUBE Applications tailored for different end-user devices such as STB, mobile, tablet, Smart TV, media players, and PC.

SmartTUBE SDP is the core component of the SmartTUBE, responsible for managing services, users, content, pricing, metadata, end-user device provisioning, and dynamic ad insertion. It provides seamless interaction with billing systems, payment gateways, and third-party information systems installed on the operator’s side. All features and capabilities of the SmartTUBE SDP can be managed through a single web-based SmartTUBE Admin Console

SmartTUBE architecture

The SmartTUBE SDP architecture integrates 5 functional modules:

  • Subscriber Management: Enables operators to oversee service accounts, end-user devices, profiles, service bundling, tariff plans, and multiple tenant configurations. A comprehensive and time-tested API provides seamless integration and interaction with OSS/BSS systems and payment gateways. Learn more…
  • Content Management: Offers comprehensive support for both TV-related services and xVoD services:
    • Enables operator to manage TV services, including control over channel streaming and encryption settings, channel bundling and regional availability, EPG import from external providers, support for nPVR and Catch-up service assurance subsystems, and other functionalities. Learn more…
    • SmartTUBE SDP supports all models of Video on Demand (VoD) content, enabling operators to manage the movie and series library from both local operator’s sources and external content providers. The SmartTUBE SDP empowers operators to oversee content metadata, regional accessibility, pricing policies, and other key features of the VoD service. Learn more…
  • Marketing: Offers operators various tools and opportunities to promote content and services to subscribers, such as banners, custom content rails, automatic content recommendations, marketing notifications, and dynamic ad insertion management with an option to integrate with external ad management system. Learn more…
  • Reporting & Analytics: Provides operator with current statistics on content consumption, subscriber demand for specific services, and customer base analytics, enabling timely business decisions. Learn more…
  • System Management: Ensures the operation of the platform as a whole, allowing operators to manage system settings, automate system processes, control access for platform users, alert for failures, provision end-user devices, localize and customize the SmartTUBE Apps, and more…

SmartTUBE Apps are a range of user-friendly and highly customizable applications compliant with the most current streaming industry standards. Tailored for popular device platforms, these applications seamlessly integrate established user interaction patterns to offer a superior viewing and application experience. Users have access to a diverse content selection, including live TV, video-on-demand, catch-up TV, nPVR, and shared TV recordings, all enriched with advanced features of cutting-edge streaming applications. Learn more…

SmartTUBE Applications

Subscriber Management

Subscriber Management Entities

SmartTUBE SDP offers the Sales Department of an operator with all the capabilities for managing customer base. Its efficiency and simplicity lies in the management of the following entities:

The diagram below demonstrates the relationship of these entities:


Diagram 1. Relationship of SmartTUBE SDP subscriber management entities

Service Account

Service Account contains information about a subscriber and uniquely identifies it on the platform. It is characterized by a unique identifier, status (active, blocked, etc.), and login/password common for all subscriber’s devices (used for device authenticating).

The following operations can be performed on Service Accounts:

  • Multiple Devices can be linked to a Service Account for using them in parallel by a subscriber.
  • The set of services available to the subscriber is determined by the Pricing plan assigned to the Service Account. Only one Pricing Plan can be assigned to a Service Account.
  • Multiple User Profiles containing personalized content consumption restrictions and settings can be assigned to the Service Account.
  • Operator can specify the trial period for the account and manage its duration, along with setting the account status after the trial period expires.
  • Management and synchronization of the linked SmartTUBE SDP and OSS/BSS accounts are performed via SmartTUBE API. Subscriber’s personal data is stored on the OSS/BSS side only.

Device

Device uniquely identifies subscriber’s device on the platform. Each Device can only be linked to a single Service Account and characterizes by

  • Unique identifier (UID)
  • Device Type: Determines the device functionality when interacting with the platform. For example, use different TV streams on devices of different type, use different banners or channel logos, etc.
  • Individual login/password used for authenticating device on the platform.

Operator can perform the following actions with Devices:

  • Limit the number of Devices that can be linked to the same Service Account (with differentiation by device type) and/or simultaneously consuming services. Subscribers can exceed the set limits by purchasing a corresponding Service Bundle.
  • Link Devices to a specific region, allowing for the management of regional streaming.
  • Enable/disable DVB-T input, unprotected analog outputs, and HDCP protection of HDMI outputs on STBs that support this functionality.
  • Factory reset and reboot on STBs
  • Create an SSH tunnel to Devices (if it is technically possible)
  • Manage firmware and installed apps on Linux and Android-based STBs, as well as configuration parameters on all types of IPTV/OTT devices including mobile and Smart TV platforms. These actions are performed with SmartTUBE Device Manager.

User Profile

User Profile contains individual age restrictions for viewing/purchasing content and TV channel sorting settings. Each User Profile also stores individual viewing history, lists of favorite channels, movies, reminders, recordings, and purchased movies.
Multiple User Profiles can be linked to the Service Account, meaning they can be shared across all Devices linked to the Service Account.

Profiles have the following set of parameters:

  • Nickname
  • Collection of Profile Icons to choose from
  • PIN code: Used to secure the profile from unauthorized access and editing, and to prevent unauthorized purchases of content and subscriptions to services.
  • Default Access Level: The highest age rating of content that a user can view without entering a PIN. Content with a higher age rating is considered adult content.
  • Maximum access level: The highest age rating of content to be displayed in the TV channel list and VoD library. Content rated above this level is hidden from the app’s UI.

Pricing Plan

Pricing Plan is a collection of multiple Service Bundles and Discounts that enable operator to manage the service provisioning rules for subscribers. For this purpose, the Pricing Plan is assigned to the subscribers’ Service Accounts. Only one Pricing Plan can be assigned to the same Service Account. Each Pricing Plan can be shared across multiple Service Accounts.

Pricing Plan allows to control the following provisioning conditions of each Service Bundle and Discount:

  • Validity period of the bundle/discount within the Pricing Plan
  • Type of devices to which the bundle/discount to be applied
  • Bundle/discount status at the time the Pricing Plan is applied. Can be Active, Not active or Invisible (the bundle/discount is disabled and hidden for subscribers).
  • Duration following the Pricing Plan activation, after which the bundle/discount becomes inactive.
The Pricing Plan also enables to conduct the following operations on Service Bundles and Discounts:
  • Allow subscribers to enable/disable the bundle/discount in the app
  • Hide the bundle/discount from subscribers within the app. This way, the bundle/discount can only be activated by the operator or through subscription to other dependent bundles/discounts.
  • Hide the bundle/discount after unsubscribing and set the corresponding Service Account state accordingly

Service Bundle

Service Bundle is a collection of content or services offered to subscribers for a fee or at no cost. For the Service Bundle to be available to subscribers, it must be included into the Pricing Plan. Multiple Service Bundles can be included into multiple Pricing Plans.

The cost of a Service Bundle for a subscriber is determined by the Price Lists.

SmartTUBE supports the following types of Service Bundles:

  • TV Channel Bundle: A collection of channels provided to subscribers within the bundle.
  • DVR Bundle: A set of TV channel with Catch-up services enabled. It offers control over archive storage depth, as well as the provision of TSTV and/or Pause Live services for each channel individually.
  • VoD Bundle: Outlines the pricing model (TVoD, SVoD, AVoD, FVoD) for the movies/series within the bundle, their linkage to the operator’s local movie/series library or external content providers, offline movie viewing capabilities, and connection to a VAST server for AVoD content.
  • nPVR Bundle: A collection of channels eligible for nPVR services. It allows to manage the following bundle attributes:
    • Recording Time Quota: Maximum duration of all subscriber recordings.
    • Recording Storage Quota: Storage duration of subscriber recordings.
    • Notification Quota Level: Threshold at which the subscriber is notified about approaching to the Recording Time Quota.
    • Quota Overspending Limit: Maximum amount a user can go over their Recording Time Quota. If the quota is exceeded, the user must delete the extra recordings before scheduling more.
    • Restriction to record the ongoing or finished TV programs
    • nPVR Duration: Period within which the recording of finished TV programs is allowed.
  • PPV Bundle: Sets the pricing rules for pay-per-view TV programs. The operator can choose to charge a fixed price for the whole program or charge based on the minutes watched.
  • Device / Session Limit as a Bundle: Allows subscribers to increase the number of devices linked to the Service Account and/or Devices simultaneously consuming services beyond the limit set by the operator.

Price List

Price List determines the cost and provision conditions of the Service Bundle. Price Lists can be of two provision types:

  • One-time Purchase: Involves a single payment for the Service Bundle for a specific rental period (such as a day, month, year, or lifetime). Payment is handled by OSS/BSS through an integration API.
  • Subscription: The Service Bundle is provided for a certain period of time and involves periodic payment. The subscription charges and payment frequency are handled by OSS/BSS through an integration API.

Multiple Price Lists of the same provision type but with different prices and non-overlapping validity periods can be assigned to the same Service Bundle. That is, at any given time, a Service Bundle can have only one active Price List of a certain provision type.

For the TVoD content, it is also possible to set different prices and rental periods for each type of movie assets (e.g. SD and HD). Additionally, the asset price may vary depending on the Service Bundle or content provider.

Discounts

Price List can be optionally adjusted with Discount of the following types:

  • Overriding discount: Overwrites the cost of the Price List with its own.
  • Percentage discount: Specifies the percentage of discount applied to the cost of Price List.

The Discount is applied to the Pricing Plan. Thus it overlaps all Price Lists of all Service Bundles included in the Pricing Plan.

The provision conditions of Discount (validity period, device type dependence, etc.) are managed by the Pricing Plan.

The Price List and Pricing Plan can only have one active Discount at any given time, but one Discount can be applied to multiple Price Lists and Pricing Plans.

Subscriber Registration and Sign-In Options

SmartTUBE SDP offers various options for registering and signing in subscribers on the platform:

  • Sign-in by Login and Password: These credentials can be set for the entire Service Account or a specific Device.
  • Passwordless Sign-in: Operators can register devices on the platform without requiring login credentials if they manage the customer’s home network and know their IP address.
  • Trial Sign-in: Operators can set a trial period for subscribers and specify what types of devices they can use during this period.

Multiple Tenancy Configurations

Multitenancy allows the creation of several virtual operators sharing a single SmartTUBE SDP platform. For example, one global IPTV/OTT operator may have several regional divisions. The audience of these divisions may differ geographically, culturally, socially, etc. So may the content.

The multitenant configuration allows the following resources and features to be individualized for each tenant:

  • Service Accounts and Devices
  • Service Bundles and pricing rules
  • Access rights to SmartTUBE Admin Console for tenant employees
  • Statistical reports
  • Limited apps’ UI customization:– Tenant logo on the splash screen when starting the app

    – Tenant logo on the status bar

    – Selector color

    – Limited styling features on the Home screen

    Please note that the app remains the same for all tenants. The operator cannot change the app icon and name individually for each tenant!

  • Subscriber notifications
  • Licensing calculations

At the same time, each tenant may utilize shared content (TV channels, EPG, VOD library) and metadata sets.

Platform administrators have full access to all platform resources.

Content Management

SmartTUBE SDP provides a suite of tools designed for Content Management Departments to control TV-related content and VoD movie/series library. The platform also supports the import and management of multilingual Electronic Program Guide (EPG) and VoD-related metadata.

TV-related Content

SmartTUBE SDP capabilities enable operators to manage TV content distributed over IPTV, OTT, and DVB-T/T2/C networks and provided with the following TV services:

  • Live TV: Real-time television streaming.
  • Catch-up: Services allowing subscribers to watch TV programs for a period after they have aired. Recording of the source streams is done on the operator’s equipment using hardware or software (e.g. SmartMEDIA Content Delivery Subsystem). Services include:
    • Pause Live (Restart TV): Allows to pause, rewind, and fast-forward within the ongoing TV program.
    • Start Over: Allows to start watching the ongoing TV program from the beginning.
    • Time Shift (TSTV): Allows to play, pause, rewind, and fast-forward completed TV programs within a time frame determined by the operator.
    • Catch-up Content Library  Enables access to selected TV programs recorded by operator and provided to subscribers via content rails on the SmartTUBE Apps’ Home screen.
  • nPVR: Cloud recording of completed, ongoing, and upcoming TV programs initiated by a subscriber.

Management of TV-related content

  • Channel Management
    • Channel Metadata: Provides control over the channel title, description, number in the channel list, and topics. The channel can have a single logo for display on all device types or multiple logos optimized for each one.
    • Streaming Settings: Allow to configure channel streaming sources, URLs for multicast or unicast outgoing streams, URLs of DVR and nPVR servers, define encryption types for different device types, set regional restrictions or block the channel broadcast immediately.
    • Age Restrictions: Each channel is assigned an age access level, dictating its visibility in apps and user access with or without a PIN code. For more details, check User Profile.
    • Channel Sorting: Operator can control channel sorting in apps by combining sorting by channel number and fixed channel position.
  • Program Management
    • Program Metadata:  Provides control over original and custom program titles, serialized TV show attributes, release country and year, poster, age rating, genre, personalities, awards, and so on.
    • Automatic EPG Import: Supports XMLTV, a widely used standard for describing TV listings, and SmartLabs EPG XML, a simplified XML format developed by SmartLabs and detailing all EPG metadata processed by the SmartTUBE SDP.
    • Catch-up Options: Allows to manage the availability of the program for catch-up services and the duration of availability.
    • Blackout: Operator is able to block broadcasting of certain programs by replacing the video stream with a predetermined image.
    • Restriction for nPVR Recording for Certain Device Types
    • Additional Program Logo Overlay: Overlaying additional logo on top of the video stream of a specific TV program. Implemented in conjunction with the SmartMEDIA Content Delivery System.
  • Closed Caption (CC) Management: Allows to manage the selection of CC tracks present in the original channel stream and available to subscribers.

Video on Demand (xVoD)

SmartTUBE SDP supports all models of the Video on Demand (VoD) content providing, allowing operators to manage the movie and series library from both local storage and external content providers:

  • TVoD (Transactional Video on Demand): Allows a user to access a movie/series by making a one-time payment. After the purchase, the user has a limited time to watch the movie.
  • SVoD (Subscription Video on Demand): Provides a user with long term access to a range of movies/series by subscribing either through a single payment or periodic charges.
  • AVoD (Advertising Video on Demand): Offers a user free content access supported by ads that are displayed before (pre-roll), after (post-roll), or during (mid-roll) video playback.

Management of xVoD Library

  • Content Metadata: Operator can manage a wide range of content metadata including original and custom titles, release country and year, posters and screenshots, distribution period, age rating, genre, personalities, awards, and so on.
  • Content Assets: Enables operator to manage assets for movies, series episodes and their trailers. Each movie and episode can have several asset versions (e.g. SD, HD, UHD) for different device types, encryption options, content providers, pricing and bundling rules. Assets can be individually enabled for offline viewing by subscribers within the SmartTUBE Apps.
  • Regional Restrictions: Regional restrictions can be applied at the movie and series level.
  • Integration with VoD Content Providers: SmartTUBE offers streamlined integration schemes with a number of content providers.

Radio Stations

SmartTUBE SDP provides features for managing radio station broadcasting with configuration options similar to those available for TV-related content.

Content Protection

SmartTUBE supports content protection for IPTV/OTT services on various levels:

  • DRM Protection: Offers support for the Google Widevine and Apple FairPlay DRM systems. SmartTUBE SDP can also be integrated with SmartLabs Universal DRM (UDRM), allowing these DRM systems to be used in parallel.
  • Token-based Stream Access Restriction: This security feature, integrated with the SmartMEDIA Content Delivery System, utilizes JWT tokens to prevent unauthorized access to the OTT TV channel streams.
  • Copy Protection on Physical Outputs: Allows to control recording on analog and digital outputs of set-top boxes that support such functionality. HDCP and CGMS-A / WSS technologies are supported.
  • Watermark messaging: Operators can prevent or complicate unauthorized copying of content on devices by sending messages that overlay text with identifying subscriber data on top of the TV channel stream. The feature allows to set the text transparency, position on the screen, display duration, and TV channel.

Marketing

The SmartTUBE solution provides Marketing Departments with a variety of tools to promote content and services within the SmartTUBE Apps:

  • Banners
  • Content Rails
  • Content Recommendation Engine
  • Ad Insertion Management
  • Marketing Messaging

Operators have the option to display a static, non-clickable banner when users pause content in the full-screen player. This banner disappears on resume, and operators can configure a rotating list of such banners to display with each pause.

  • Display Options of Banner Carousel:
    • Regular Banners: Regular opaque banners with a clear bottom edge, not overlapped by any other UI elements.
    • Faded Banners: Banners with a faded bottom edge typically overlapped by the Main menu and first Content rail.
    • Banners with Auto-play Trailers: Faded banners of the movie or series that starts playing the trailer automatically when it’s in focus after a set time. It is available for Large-screen Apps only.
  • Display Options for the Banners in the Full Screen Player when Paused:
    • Regular Banners: Only regular opaque banners are accepted.
    • Image Scaling: Banners are stretched to fill the screen without breaking the image proportions.
  • Display frequency in the carousel: Allows to set each banner to high, medium and low priority for display in the carousel.
  • Time frame and duration to display
  • Display only for certain Device types and Pricing plans

Content Rails

Operators have the ability to populate the content pages (Home, Movies, TV Series, and My Profile) with an unlimited number of predefined and custom Content rails:

  • Manually recommended content: Curated xVoD content or TV programs manually selected by the operator.
  • Auto recommended content: Automatically generated xVoD content based on user viewing history, leveraging the SmartTUBE Recommender module.
  • TV Channels: Display of TV channels presented as posters of currently streaming programs. User-favorited channels are prioritized, followed by operator-sorted channels.
  • Top 10 TV programs: Compilation of the most popular TV programs viewed by all subscribers.
  • Applications: List of integrated applications defined by the operator. Available only for the Android TV / STB devices, if the SmartTUBE App is a launcher.
  • Continue watching: List of xVoD content and TV programs that the user has not finished watching.
  • Watch history: Chronological listing of xVoD content and TV programs watched by the user.
  • Favorite channels: Channels and movies marked as favorites by the user.
  • Favorite movies: Movies marked as favorites by the user.
  • Personal recordings: Recordings of TV programs initiated by the user within the nPVR service.
  • Reminders: Alerts for upcoming TV programs set by the user.
  • Purchased movies: List of xVoD content purchased by the subscriber.
  • Custom rails: Operator-filtered xVoD content or TV programs based on various content and subscriber’s account attributes (for example, French comedies of 80-th, Modern Bollywood movies, Jackie Chan action movies, etc.). The filtered TV programs and xVoD content can be sorted by various attributes.

Content Recommendation Engine

SmartTUBE SDP features an integrated module for the automatic generation of xVoD content recommendations called SmartTUBE Recommender. This module periodically analyzes subscriber views of content, content characteristics (such as genres, countries, descriptions, etc.), and optionally, user characteristics (such as gender, age, geolocation). It then generates ordered sets of xVoD content recommendations for each user and sets of similar movies/series for each user.

SmartTUBE Recommender provides two types of recommendations:

  • User-based: Calculated based on the user profile settings, the user’s viewing preferences and their similarity to other subscribers, and so on. This type of recommendation is only available in conjunction with the SmartCARE (SmartLabs analytics software for IPTV/OTT networks).
  • Context-aware: Calculated based on the similarity of movie metadata (description, genres, cast, etc.)

The generated recommendations can be displayed in SmartTUBE Apps on content rails, in movie detail cards, and in the player.

Ad Insertion Management

SmartTUBE is an integral component of SmartLabs Dynamic Ad Insertion (DAI) solution that enables operators to dynamically insert or replace ad blocks in live video streams, pre-recorded, and xVoD content. Thanks to VAST protocol support, operator can partner with third-parties or create its own campaigns within SmartTUBE SDP without relying on external ad services.

The SmartLabs DAI solution is made up of three key modules:

  • SmartTUBE Advertising Decision System (ADS): Carries information about advertisers, ad campaigns, ad creatives, placement dates and duration, types, target devices, target content, and other parameters. Using this data, ADS can make a decision which ad fits a specific insertion opportunity. The ADS also provides campaign performance reports highlighting key metrics. Implemented as a component of SmartTUBE SDP.
  • Server-side Ad Insertion Module: Implemented as a component of SmartMEDIA Content Delivery System
  • Client-side Ad Insertion Module: Implemented as a component of SmartTUBE Apps
    The Server-side and Client-side ad insertion modules request an ad decision from the ADS via the VAST protocol. The ADS finds a matching set of ads based on the request targeting criteria and responds with a VAST response carrying the data about the ad to be inserted.

There are 2 use cases for using the SmartTUBE DAI:

  • Ad insertion into HLS / DASH streams for OTT subscribers: Involves inserting ad blocks on the SmartTUBE App side and getting data on them within the stream playlists/manifests. The preparation of playlists/manifests and ad creatives to be sent to the device is performed on the SmartMEDIA side.
  • Ad insertion into linear TS streams: Involves inserting ad blocks directly into the source TS streams using SmartMEDIA components. The resulting TS output can be distributed over IPTV networks, or pushed to satellite or DVB-C head-ends:

Marketing Messaging

SmartTUBE allows to send messages to the end-user devices via SmartTUBE Admin Console or OSS/BSS API. It can be used for notification about new services, promotions, technical works, etc. The messaging can be performed either individually to a specific subscriber or massively using filters on the subscriber base.

Message sending can be scheduled with filtering recipients by user identifier, pricing plan, and tenant. Additionally, messages can be sent automatically for events like first authorization, account creation, service subscription/unsubscription, and pricing plan changes.

Operator can manage the following message attributes:

  • Message text: Allows to insert such user-identifying variables as user ID, device ID, and service account number.
  • Expiration period
  • Display duration
  • Number of message reminders and their display duration
  • Tenant relation
  • Appearing animation: Slide-down or pop-up
  • Image, icon, and URL of a video to be attached to the message
  • Message opacity
  • Link to the service bundle, xVoD content, TV channel
  • Delivery type:
    • Long Polling: Messages are sent using Long Polling mechanism and displayed as a modal window in the SmartTUBE App only after it is launched.
    • Push: Messages are sent using the Apple APN and Google GCM services and displayed additionally in the notification shade regardless of whether the SmartTUBE App is running or not.

Message recipients can be specified by a list of device IDs or selected based on the following criteria:

  • Account login, number, name, status
  • Account creation date
  • Pricing plan
  • Service bundle presence in the Pricing plan
  • Status of the service bundle
  • Device type
  • App version
  • STB UID
  • IP address
  • Date of linking the device to the account
  • Last stored device location
  • Last device authorization date

Reporting & Analytics

The SmartTUBE reporting system offers Marketing, Sales, and Content Management Departments with real-time and historical statistics of content consumption and specific resource/service demand among subscribers.

SmartTUBE SDP offers a range of historical reports that are generated for a user-defined timeframe:
  • Service accounts and devices:
    • Created/deleted accounts report: Number of accounts added/deleted for the period.
    • Service accounts not authorized till now: List of accounts without authorizations for the period until today.
    • Service accounts without new connections: List of accounts without new device connections for the period until today.
    • Individual service account reports: History of service bundle subscriptions, status changes, nPVR usage stats and errors, accepted text offers, and pricing plan changes.
    • Number of pricing plan changes:  Number of pricing plan shifts for the period with specifying the previous/new plan.
    • Percentage of accounts by state: Number and percentage of accounts by status on the day specified.
    • Percentage of users by pricing plan: Number and percentage of accounts by pricing plan on the day specified.
    • Devices: Detailed info on the devices authorized during the period with filtering by the service account, as well as device name, UID, and type.
    • Device UID changes:  Change history of the unique identifier of each registered device.
  • Service and content consumption:
    • Service consumption:  Number of service accounts subscribed to specific service bundles during the period.
    • Service consumption in detail: Details on subscriptions to service bundles during the period with details on accounts and pricing plans.
    • Purchased TVoD movies: Brief report on TVoD content purchases during the period.
    • Purchased TVoD movies in detail: Detailed report on TVoD content purchases during the period.
    • SVoD metacontent view count: Report on SVoD content views during the period with filtering by service bundles and content providers.
    • Detailed report by SVoD: Detailed report on SVoD content subscriptions during the period with filtering by service bundles and content providers.
    • VoD view statistics: General report on the number and duration of xVoD content views with grouping of results by periods (hour, day, etc.) and filtering by viewing duration of each movie/episode.
    • Channel coverage: Details on TV channel audience and viewing duration in live and catch-up modes with grouping of results by periods (day, month) and filtering by channel, device type, pricing plan and viewing duration.
    • Channel viewing statistics: Number and duration of the channel views in live and catch-up modes with grouping of results by periods (5 min, hour, day, etc.) and filtering by channel, device type, and viewing duration.
    • TOP 10 most viewed TV programs: Number of viewers of the 10 most popular TV programs for the period with filtering by channel.

The following reports provide a real-time view of the devices and apps used by subscribers:

  • Service account w/o devices:  List of accounts with no devices connected or devices with no UID.
  • Device combinations on service accounts: All unique combinations of devices linked to accounts, itemized by state and number of accounts, as well as by number of devices. 
  • Statistics by device types: Number of devices of different types currently registered on the platform.
  • Statistics by app versions: Number of devices of different SmartTUBE app versions with filtering by device type, device model, and app version.

System Management

The majority of SmartTUBE system functions are accessed and controlled through the web-based SmartTUBE Admin Console. Fine-tuning of platform functionality is carried out through configuration files of SmartTUBE SDP components. Together, these management tools provides System Administration Departments with complete control over platform aspects and features described below:

  • End-user Device Provisioning: SmartTUBE SDP includes SmartTUBE Device Manager, a service with the web console for managing firmware, apps and configurations on all types of IPTV/OTT devices including Linux and Android STBs, mobile and Smart TV platforms.  This console enables software artefacts management (STB Linux and Android firmware, private app repository for AOSP, configuration files), device grouping (production, staging, etc.), HTTP and Multicast firmware distribution, software version tracking, update strategies management (soft update, force update, minimal allowed version), etc.​
  • Process Automation: Various service tasks (e.g. EPG import, cache data reload, etc.) can be performed automatically at set schedule.
  • Admin Console Access: Operators can manage users with specific access roles like Administrator, Content Manager, Business Manager, Technical Support Specialist, and Analyst. Multiple roles can be assigned to a user, defining access to different features within the console.
  • Failure Alerts: Provides email alerts for failures related to OSS integration, EPG and VoD metadata import, database connection limits, and SmartMEDIA warnings.
  • Device Geolocation:  To manage access to content based on IP address range, operators can assign IPTV devices to specific subnets or utilize data from third-party services like Maxmind (under a separate contract) to determine the geo or network location of OTT devices. Operators can also restrict access to services for mobile devices when transitioning between network connections (e.g., from home network to cellular one). 
  • License usage statistics: Provides detailed information about installed licenses, including their types, number of service accounts and active devices used.  
  • License features: Operators can manage the availability of features that depend on the license type. 
  • Rebooting STBs: Enables remote reboot of STBs  by a list of UIDs or by matching conditions.
  • Cache Server Data Reload: Allows to manually update metadata and system settings on cache servers to quickly pass changes to devices. 
  • Data Export: SmartTUBE Admin Console allows to export any data stored in the SmartTUBE SDP database to CSV format.

Apps Localization and Customization

SmartTUBE provides a comprehensive toolkit for localizing and customizing SmartTUBE Apps’ UI and UX. This process occurs in two stages:

  • Initial: Performed by SmartLabs specialists at the stage of system commissioning.
  • Operational: Performed by the operator during the system operation.

Initial customization allows to adjust the UI within the existing structure (layout of the main components, animation logic, etc.) and includes the following possibilities:

  • Interface Localization: SmartTUBE provides the ability to localize the interface to the operator’s language by the operator. English is supported by default. Localization in languages using fonts containing hieroglyphs, arabic script and other specific alphabets, is discussed separately.
  • Operator Logo: Can be placed in the various parts of UI (upper left corner, placeholders, splash screen, etc.);
  • Color of Selected Elements
  • Animation of Waiting States

Operational customization allows the operator to change the representation of the Home screen and Movies/Series sections by uploading the corresponding configuration files to devices via SmartTUBE Device Manager, a service for managing firmware and apps on all types of IPTV/OTT devices.

Security Mechanisms 

SmartTUBE system protects IPTV / OTT services and confidential information from unauthorized access at different levels utilizing the following mechanisms:

  • Device activation and user authorization: Each time a device attempts to connect to the SmartTUBE SDP, the system compares its device ID and serial number with the values stored in the DB when the device was activated. If the device ID and serial number do not match, the device is not allowed to access services.
  • Connection sessions management: SmartTUBE SDP uses special identifiers to manage each connection session with devices. Each connection session lives for a limited period, after which the session closes and SmartTUBE SDP stops the information delivery to the device. This also avoids the memory shortage and related security issues on STB devices.​
  • Token-based authorization: SmartTUBE SDP issues a unique token to each device upon authorization on the platform. This token is then passed by the device in all requests to the platform and SmartMEDIA streaming servers for the OTT TV channel streams. This process ensures that only authorized devices can access the SmartTUBE platform and view content securely.
  • Secure access to SmartTUBE Admin Console: Provided by the authorization mechanism with the login and password issued by the system administrator.
  • OSS/BSS API Access: Interaction with SmartTUBE SDP from the OSS/BSS side via API can be protected with login and password. 
  • Network-level security: The HTTPS protocol with SSL certificate management is used for interactions between devices, external systems, and SmartTUBE SDP. Session control is used for interactions between platform nodes and the database.
  • Protection against STB duplication: STB has built-in protection against duplication, which prevents the possible device counterfeiting.

Licensing 

The SmartTUBE licensing policy offers two license types, SmartTUBE Basic and SmartTUBE Ultra, providing operators with different levels of features and functionality to choose from.

SmartTUBE BasicSmartTUBE UltraNotes
SmartTUBE SDP
Multitenancy supportMultitenancy is a software architecture in which a single instance of software runs on a server and serves multiple tenants. Systems designed in such a manner are “shared”. A tenant is a group of users who share a common access with specific privileges to the software instance.
For example, one global IPTV/OTT operator may have several regional divisions. The audience of these divisions may differ geographically, culturally, socially, etc. So may the content. For this case, SmartTUBE Service Delivery Platform (SDP) provides 2 options for multitenant architecture implementation.
Widevine Security Policies supportGoogle’s Widevine DRM technology offers three distinct security levels — L1, L2, and L3 — each designed to cater to different requirements of content protection. These levels are critical in determining the quality of content that can be securely streamed and accessed on various devices.
– L1 represents the highest level of security provided by Widevine. It mandates that devices meet specific L1 security criteria to stream High Definition (HD) content.
– L2 involves content decoding and rendering through a secure hardware component or a protected co-processor.
– L3 is a software-only security solution, providing the lowest tier of Widevine’s DRM security.
Discounts and promo codes supportSmartTUBE provides two types of discounts that can be applied to service packages:
– Overriding discounts — rewrites the price lists of the service packages with its own
– Percentage discounts — allows to specify the percentage of discount applied to the service packages
System health monitor 
SmartTUBE Apps for all supported platforms
Catch-up Content LibraryCatch-up Content Library is a SmartTUBE feature that allows operator to record selected TV programs and provide them to subscribers as a separate VoD-like catalog (to be implemented in version 10.x) or content rails (available).
Kids profileKids profile allows the operator and subscribers to set:
– The maximum age level for showing only children’s TV channels and VOD content
– The viewing period (for example, from 8:00 to 21:00)
– The viewing time limit (for example, no more than 2 hours per day)
– The child-styled UI design
Open movies/series by actors/directorAn option to open a movie catalog by the actor or director, when the user selects a person in the VoD detail card.
SmartTUBE Apps for Android TV, LG & Samsung Smart TV, Web Browser
AVoD supportAVoD (Advertising Video on Demand) — a service to provide access to movies/series is provided with an advertising which is periodically shown in video
Vertical main menu (configurable) 
Horizontal main menu as text instead of icons (configurable) 
‘TV Channels’ rail with program posters instead of channel logos 
Faded top banner with trailer playback 
Easy access to profile selection on Home Screen 
QR code loginThis feature streamlines the authentication process for large-screen applications, eliminating the need for users to manually input login credentials using a virtual keyboard. Instead, a user will be able to add the new device using SmartTUBE mobile app.
Auto-play of program/movie on poster rails
when they are focused on Home Screen
SmartTUBE App for iOS
Push notifications support 
Totally redesigned app (version 8+) 
Legacy app (version 5.x) 
Download content for watching in offline modeThis feature allows subscribers to download movies and series to mobile devices for later viewing in the SmartTUBE application in offline mode. In this case, time limits apply to protected content. For example, offline viewing will be possible for a week, after which a user will need to connect to the Internet to update the DRM keys (the user will not need to download the movie again).
‘HLS + FairPlay’ streams support 
Chromecast supportThis feature enables Screen Sharing from SmartTUBE Mobile Apps to Chromecast devices and TVs with built-in Chromecast using Google Chromecast technology.
SmartTUBE App for Android Mobile
Push notifications support
Totally redesigned app (version 8+)
Legacy app (version 5.x) 
Download content for watching in offline modeTo be implemented in version 10.x
This feature allows subscribers to download movies and series to mobile devices for later viewing in the SmartTUBE application in offline mode. In this case, time limits apply to protected content. For example, offline viewing will be possible for a week, after which a user will need to connect to the Internet to update the DRM keys (the user will not need to download the movie again).
Chromecast supportThis feature enables Screen Sharing from SmartTUBE Mobile Apps to Chromecast devices and TVs with built-in Chromecast using Google Chromecast technology.
Hisense Smart TV support 
Amazon Fire TV support 
Legacy Linux STBs (Albis/SML/MAG/Motorola) support 

How many licenses do I need? 

SmartTUBE is licensed according to the number of service accounts and active devices. You can purchase one or more simultaneously active licenses of the following subtypes:

  • License by accounts: This method considers only active service accounts — accounts with the status other then SuspendedTrial closedClosedDeleted, regardless of whether the subscriber uses the services or not.
  • License by devices: This method considers only active devices — devices with a non-empty UID and linked to the active account, which were authorized at least once and (optional) with the date of the last authorization is no more than N days ago. Operator can specify which device types will be considered by this license.
  • License by service account with devices: This method considers only active service accounts to which only the specified types of devices can be linked. The operator should specify the number of active devices licensed under one license.

SmartTUBE Apps

SmartTUBE Apps are a range of user-friendly and highly customizable applications compliant with the most current streaming industry standards. Tailored for popular device platforms, these applications seamlessly integrate established user interaction patterns to offer a superior viewing and application experience. Users have access to a diverse content selection, including live TV, video-on-demand, catch-up TV, nPVR, and shared TV recordings.

Note:  As we continually enhance the UI and UX of SmartTUBE Apps, please note that the screenshots below might not reflect the latest versions.

Home Screen

The Home screen is the first screen the user sees after loading the app or hitting the ‘Home’ button. Operators can customize it’s layout by managing Top banner, Main menu, and a set of Content rails.

Top Banner

Operator can choose one of the following options to display the Top banner:

  • Regular banner: A regular opaque banner with a clear bottom edge, not overlapped by any other UI elements.
  • Faded banner: An opaque banner with a faded bottom edge typically overlapped by the main menu and first content rail. Optionally, the faded banner can automatically play the movie trailer after a set amount of time when it is in focus.

Main Menu

The Main menu on large-screen devices can be displayed in either a vertical or horizontal arrangement. For horizontal layouts, menu items can be enhanced with icons or presented as plain text. The Main menu may include the following items:

  • TV: Displays channels and programs as a vertical scrollable list for easy navigation. Includes detailed information about current broadcasts, channel guides, and completed/upcoming programs with description and screenshot.
  • EPG: Displays a classic EPG grid showcasing TV programs’ durations on a horizontal timeline. Users can to select a program for additional information and functions, with a window displaying the current broadcast.
  • Search: Allows to search through all types of content, displaying TV programs and VoD content on one screen.
  • Movies: Displays the movie library with posters and titles in a mosaic view or as a list of content rails.
  • TV Series: Displays the series library featuring posters and titles presented in either a mosaic view or themed rails list. Each poster serves as a visual representation of a series, enabling users to delve into a series card. From there, subscribers can choose the desired season and episode for viewing.
  • Radio: Opens the list of IP radio stations available for listening.
  • My [operator name]: Allows a subscriber to access personalized content such as watch history, favorite channels and movies, personal recordings, reminders, and purchased movies.
  • Applications: Provides access to the library of Android apps available on Android TV / Android STB devices, if the SmartTUBE App acts as a launcher.
  • Settings: Provides access to the user profile settings and system settings (time zone, network settings, video output modes, etc.).

The main menu on mobile devices typically includes the following items: Home, My, Search, and Downloads. The Downloads section allows users to access content that has been downloaded for offline viewing. Additionally, users can navigate to the TV, Movies, and Series pages using the top menu located on the Home screen.

Content Rails

Operators have the ability to populate the content pages (Home, Movies, Series, and My Profile) with an unlimited number of predefined and custom Content rails:

  • TV Channels: Display of TV channels presented as posters of currently streaming programs. User-favorited channels are prioritized, followed by operator-sorted channels.
  • Manually recommended content: Curated xVoD content or TV programs manually selected by the operator.
  • Auto recommended content: Automatically generated xVoD content based on user viewing history, leveraging the SmartTUBE Recommender module.
  • Top 10 TV programs: Compilation of the most popular TV programs viewed by all subscribers.
  • Applications: List of integrated applications defined by the operator. Available only for the Android TV / STB devices, if the SmartTUBE App is a launcher.
  • Continue watching: List of xVoD content and TV programs that the user has not finished watching.
  • Watch history: Chronological listing of xVoD content and TV programs watched by the user.
  • Favorite channels: Channels marked as favorites by the user.
  • Favorite movies: Movies marked as favorites by the user.
  • Personal recordings: Recordings of TV programs initiated by the user within the nPVR service.
  • Reminders: Alerts for upcoming TV programs set by the user.
  • Purchased movies: List of xVoD content purchased by the subscriber.
  • Custom rails: Operator-filtered xVoD content or TV programs based on various content and subscriber’s account attributes (for example, French comedies of 80-th, Modern Bollywood movies, Jackie Chan action movies, etc.). The filtered TV programs and xVoD content can be sorted by various attributes.

TV-related Content

SmartTUBE Apps provide users with access to the comprehensive functionalities offered by the SmartTUBE solution for TV-related services:

Channel List with Program Guide: Displays channels and programs in a vertical scrollable list for easy navigation. Includes detailed information about current broadcasts, channel guides, and completed/upcoming programs with description and screenshot.
EPG Grid: A classic Electronic Program Guide available for large-screen devices. TV programs are displayed horizontally with durations on a timeline. User can select a program for more info and functions, with a window showing the current broadcast.
Theme-Based Channel Filtering: User can filter channels by themes (such as sports, news, entertainment) or genres of currently airing programs (if the genres are provided by the EPG provider) by opening a filtering panel.
Detailed TV Program Information: Provides in-depth details about TV programs in full-screen view, including extended description, cast, recording quota used, availability period of recorded programs, and other relevant data.
Reminders: Set alerts for upcoming TV programs with a pop-up before the show starts. All reminders are displayed in a dedicated menu.
Upcoming Broadcasts Recording: Allows users to schedule recordings of individual programs or entire series episodes for viewing at a later time. The list of all recordings can be found in a dedicated menu.

Favorite Channels: 
User can mark preferred channels for quick access. The favorite channels appear first on the Home screen and in the channel filtering section.
Watch History: The list of recently viewed programs, with the option to resume from where the user left off. Users can also choose to clear their entire watch history or remove individual items.

The full-screen player in SmartTUBE Apps for large-screen devices supports the following features:

Playing live streams and rewinding, fast forwarding, and pausing catch-up content.
Revealing the program guide rail for the current channel, enabling setting reminders or recordings for upcoming programs. Available for the large-screen apps only.
Adjusting the stream’s aspect ratio, selecting the audio/video/subtitle track, viewing the program details, and checking the stream technical information.
Quick channel selection panel allowing to switch channels visually without leaving full screen mode.

The full-screen player in SmartTUBE Apps for mobile iOS / Android devices supports the following features:

Playing live streams and rewinding, fast forwarding, pausing catch-up content, as well as selecting audio/video/subtitle tracks.

Adjusting the stream’s aspect ratio, sharing the stream across other subscribers’ devices, and exploring additional functions.

The full-screen player in SmartTUBE Apps for mobile iOS / Android devices can be controlled by tapping, swiping, and sliding:

  • Short tap: Opens playback controls and settings menu, which disappear after 3 seconds of no user activity.
  • Double tap in the center: Switches between full-screen and portrait mode.
  • Double tap on the left/right area: Rewinds backward/forward for 10 seconds.
  • Swipe left/right: Switches channels.
  • Slide by the left/right area: Controls the brightness and volume, respectively:

VoD Content

SmartTUBE Apps offer fast navigation and search within the VoD content library, payment options, a recommendation tool that suggests relevant content based on subscriber preferences, and other helpful features:

VoD Content Catalog: Displays available content with posters and titles in a mosaic view or as a list of themed rails.
Content Filtering: Users can filter content by type (movies, series, for kids), genre (adventure, comedy, detectives, etc.), production year, country, and other criteria.
Detailed Content Description: Provides information on the movie description, directors, actors, ratings, age restrictions, release year, screenshots, etc. for selected content.

Detailed Series Description: In addition to the information described above, this feature offers a convenient way to select from the various seasons and episodes of a series.
Trailer Viewing: Users can watch trailers within the movie card if available.
List of Favorites: Allows users to save their preferred movies for convenient access and later viewing.

Full-Screen Player: Content is played in full-screen mode with playback controls, video quality and aspect ratio options, audio track and subtitle selection, content recommendations (in the large-screen apps), adding to favorites, and technical information about the stream (in the large-screen apps).

Skip Opening and Credits: The full-screen player allows users to skip the movie’s opening credits and jump straight into the action. At the end of a series episode, users can bypass the final credits and start the next episode immediately. This feature includes a timer for auto-skipping the opening and automatically starting the next episode, with progress displayed on the button.
Content Bookmarks: Users can add bookmarks to specific movie moments. A single movie can have multiple bookmarks.

.

.

Radio Stations

SmartTUBE Apps for STB and Smart TV support the radio station broadcasting:

Media Player

The Media player integrated into SmartTUBE Apps offers all the essential features for a seamless and enjoyable content-watching experience. It may support different audio/video codecs and streaming protocols, such as MPEG-DASH and/or HLS, depending on the device.

Adaptive Streaming Support: Automatically switches between bitrates within the media stream based on network bandwidth. This prevents playback from stopping when bandwidth decreases; instead, it shifts to a lower quality stream. When bandwidth improves, video quality is restored.
Stream Quality Options: In addition to automatic adaptive switching between stream bitrates, users can also manually select their preferred stream quality.
Playback Control: Lets users rewind, fast forward, and pause catch-up and xVoD content. When a video is rewound or paused, thumbnails appear above the progress bar.
Audio Track Selection: Users can choose from multiple audio tracks available within the stream.
Content Bookmarks: Users can add bookmarks to specific movie moments. A single movie can have multiple bookmarks.
Subtitles and Teletext Display: Apps can display subtitles and teletext in various formats, including DVD, DVB, SSA/ASS, SRT, WebVTT, CEA-608/708 Closed Captions, SMPTE-TT, and Teletext. Supported formats may vary by device.
Aspect Ratio Options: Enables users to align the content frame’s aspect ratio with their device’s screen.
Stream Details: Depending on the stream type, users can view information such as the current bitrate, the number of decoding errors, and other relevant details that may be helpful for troubleshooting and contacting technical support. Available for the large-screen apps only.
Playback from a Saved Position: Apps remember where a user stopped watching a movie or program and provide the option to resume from that point or start over.
Processing of Ad Inserts: The app for large-screen devices can detect the start/end marks of ad inserts within the stream. It can handle these ads in different ways, such as preventing users from rewinding during catch-up playback. Additionally, the media player can work with VAST servers within the AVoD service.

Content Purchase and Subscriptions

SmartTUBE Apps offers users a range of features to manage service subscriptions, purchase content, and stay updated on options that enhance their service experience:

  • Service Management Menu: Users can view and manage available services, including adding or canceling subscriptions, along with detailed information about offered content and terms.
  • Subscription Recommendations: The app highlights both current and additional subscription options, with non-subscribed channels clearly marked and easily accessible for purchase.
  • Content Purchase Options: Movie/series costs and purchasing options are displayed on detailed information cards.
  • Purchase History: Subscribers can track their transactions in the ‘Settings’ menu.

Screen Sharing

The Screen Sharing feature allows users to effortlessly transfer their streaming session between devices, such as from a mobile device to a Smart TV or STB, and vice versa. The SmartTUBE platform supports the following technologies to implement the Screen Sharing feature:

  • Apple AirPlay: Enables screen sharing from SmartTUBE iOS Mobile App to other devices that support AirPlay 2 technology.
  • Google Chromecast: Enables screen sharing from SmartTUBE iOS/Android Mobile App to the Google Chromecast devices and TVs with built-in Chromecast support.
  • SmartLabs Screen Sharing: A proprietary technology enabling user to transfer streaming between devices using SmartTUBE Apps. Users can continue watching a movie or TV channel on a mobile device or move content from a mobile device to a large screen while maintaining the current position. After transferring, playback can be controlled remotely from the mobile device.

Content Search Screen

SmartTUBE Apps allow users to search through all content types, including TV programs, movies, and external services like YouTube. The search is performed by title (in the current app’s UI language and original title) and description, with suggestions appearing as user type. The Apps support multilingual keyboards and shows structured results for various content types on the same screen.

Displaying Operator Messages

The operator can send subscribers messages that they may open immediately or later in the message history. The message can contain both text and images. Urgent messages are displayed as a full screen window. Watermark messages are overlaid on top of the video stream.

Logging In

Depending on the operator’s settings, subscribers can access services by logging in with or without username and password entry. New users may also be offered a trial period to explore the services and app features.

User Profiles

If multiple users share an account, they can create personal Profiles to customize settings like parental controls, channel sorting, and content restrictions. Profiles are shared across all devices and can be PIN protected. The master Profile can manage other profiles. This helps prevent unauthorized access to paid or adult content by minors and provides personalized content recommendations.

Profile general settings

Kids profile gives parents control over their children’s viewing experience. In addition to the maximum age level for TV channels and VOD content, the Kids profile allows to manage the downtime interval and the daily viewing limit.


Kids profile settings

System Settings

Users can access various system settings, including time-zone correction, UI language, audio/subtitle language prioritization, timer to stop playback when idle, video aspect ratio, and player menu auto-hide timeout. Support page provides information for contacting operator and sending reports for technical analysis.

STB users have additional options:

  • Reset to factory settings
  • Firmware update
  • Standby timer
  • Video/audio output format
  • Network settings

Supported Devices

SmartTUBE solution supports a wide range of devices, allowing IPTV / OTT operators to reach a larger audience. The list of supported devices can be expanded through integration work. Below are the device requirements. These requirements do not include restrictions related to the use of various protocols and formats of video delivery (HLS, DASH, etc.), CAS/DRM systems, and other restrictions related to the hardware and software implementation of the listed devices by their manufacturers.

Linux based STB

To run SmartTUBE App on STB using a Linux kernel OS, you need to have SmartSDK. At the moment SmartSDK is supported on hardware platforms HiSilicon, STMicroelectronics, Amlogic, Broadcom, Sigma Designs from STB manufacturers such as SmartLabs, Albis, Arris, and others. To clarify the list of supported hardware platforms and integration options, please contact SmartLabs representatives.

iOS

  • iPad with iOS 11 or later
  • iPhone with iOS 11 or later

Android

The devices must comply with the Android Compatibility Definition Document (CDD) requirements.

  • Tablet PC with Android 5.0 Lollipop (API Level 21) or later
  • Smartphones with Android 5.0 Lollipop (API Level 21) or later

Web Browsers

Web Browser OS Minimal version supported by the app Minimal version supported by the app with Widevine DRM playback
Google Chrome Windows / Linux / MacOS ⩾ 69 ⩾ 128
Mozilla Firefox Windows / Linux / MacOS ⩾ 100 ⩾ 100
Microsoft Edge Windows all ⩾ 88
Apple Safari MacOS ⩾ 11 Safari does not support Widevine DRM

We strongly recommend using installations with Widevine DRM enabled. Support for other web browsers is on request.

Smart TV

  • LG with WebOS 4.0 and later Support for Netcast and earlier versions of WebOS could be provided by additional request and subject to technical feasibility (depends on used DRM, streaming protocol, and etc.).
  • Samsung with Tizen OS SmartTUBE App support all model years available for publishing at the Samsung app store portal
  • Hisense (VIDAA OS)
  • Whale OS — an operating system for Smart TV, which is now integrated into the products of many world-famous brands, including Philips, TCL, Haier, AOC, Sharp, BenQ, Konka, Changhong, NovaTek, Amazon, Google, Alibaba, Huawei, DSP Group, and etc.

Android based STB and Android TV

  • Supported OS Android Open Source Project (AOSP) and Android TV v9.0 or later. See also the requirements for AOSP STBs.
  • The devices must comply with the Android Compatibility Definition Document (CDD) requirements.
  • SmartTUBE App on AOSP devices can be installed as a Launcher.

Amazon Fire TV

  • Amazon Fire TV Stick Lite
  • Amazon Fire TV Stick
  • Amazon Fire TV Stick 4K
  • Amazon Fire TV Stick 4K Max
  • Amazon Fire TV Cube

Support for Device Features

Linux STB Android STB iOS Android 5.0
and later
Samsung
SmartTV (Tizen)
LG
Smart TV (WebOS)
Multicast Yes Yes No No No No
Voice search/input Yes
(using BT RCU)
Yes
(using BT RCU)
Yes
(Native)
Yes
(Native)
Yes
(Native)
Yes
(Native)
External applications Yes Yes No No No No
AirPlay No No Yes No No No
Chromecast Sender No No
Yes
Yes No No
Android/iOS native PiP No No Yes* Yes No No
Offline content No No
Yes
Roadmap No No

* The PiP feature is available on iOS devices for HLS streams only. 

Support for Content Delivery Protocols and DRM Systems

Device model / Technology Widevine / DASH PlayReady / DASH FairPlay / HLS
Samsung Legacy (2012–2015 models) No No No
Samsung Tizen (2015 and 2016 models without software updates installed) No Yes No
Samsung Tizen (2016 models with software updates installed) Yes Yes No
Samsung Tizen (2017 models and later) Yes Yes No
LG NetCast (models until 2014) No No No
LG WebOS 2.x (models until 2016) No No No
LG WebOS 3.5 and later (2017 models and later) Yes Yes No
SmartLabs STB, Android 5.0 and later Yes No No
iOS 11 and later Not recommended No Yes

SmartTUBE Introduction

Download PDF

SmartTUBE is a complex solution that enables operators to deliver both OTT and IPTV services to subscribers. Its primary objective is to offer a range of subscriber-level services, including:

  • Live TV, Catch-up, nPVR and other related services
  • VoD content watching and purchase directly in the app
  • High quality content playback on end-user devices of various types 
  • Access services and watch content on multiple devices at the same time 
  • Fast and convenient search for TV channels, programs and VoD content

The SmartTUBE comprises the SmartTUBE Service Delivery Platform (SDP) and SmartTUBE Applications tailored for different end-user devices such as STB, mobile, tablet, Smart TV, media players, and PC.

SmartTUBE SDP is the core component of the SmartTUBE, responsible for managing services, users, content, pricing, metadata, end-user device provisioning, and dynamic ad insertion. It provides seamless interaction with billing systems, payment gateways, and third-party information systems installed on the operator’s side. All features and capabilities of the SmartTUBE SDP can be managed through a single web-based SmartTUBE Admin Console

SmartTUBE architecture

The SmartTUBE SDP architecture integrates 5 functional modules:

  • Subscriber Management: Enables operators to oversee service accounts, end-user devices, profiles, service bundling, tariff plans, and multiple tenant configurations. A comprehensive and time-tested API provides seamless integration and interaction with OSS/BSS systems and payment gateways. Learn more…
  • Content Management: Offers comprehensive support for both TV-related services and xVoD services:
    • Enables operator to manage TV services, including control over channel streaming and encryption settings, channel bundling and regional availability, EPG import from external providers, support for nPVR and Catch-up service assurance subsystems, and other functionalities. Learn more…
    • SmartTUBE SDP supports all models of Video on Demand (VoD) content, enabling operators to manage the movie and series library from both local operator’s sources and external content providers. The SmartTUBE SDP empowers operators to oversee content metadata, regional accessibility, pricing policies, and other key features of the VoD service. Learn more…
  • Marketing: Offers operators various tools and opportunities to promote content and services to subscribers, such as banners, custom content rails, automatic content recommendations, marketing notifications, and dynamic ad insertion management with an option to integrate with external ad management system. Learn more…
  • Reporting & Analytics: Provides operator with current statistics on content consumption, subscriber demand for specific services, and customer base analytics, enabling timely business decisions. Learn more…
  • System Management: Ensures the operation of the platform as a whole, allowing operators to manage system settings, automate system processes, control access for platform users, alert for failures, provision end-user devices, localize and customize the SmartTUBE Apps, and more…

SmartTUBE Apps are a range of user-friendly and highly customizable applications compliant with the most current streaming industry standards. Tailored for popular device platforms, these applications seamlessly integrate established user interaction patterns to offer a superior viewing and application experience. Users have access to a diverse content selection, including live TV, video-on-demand, catch-up TV, nPVR, and shared TV recordings, all enriched with advanced features of cutting-edge streaming applications. Learn more…

SmartTUBE Applications

SmartTUBE Admin Guide

This section provides instructions on how to deploy SmartTUBE Service Delivery Platform and SmartTUBE Apps, configure IPTV/OTT services, integrate with external systems, and other related information.

You can download the entire section as a PDF here.

About SmartTUBE

SmartTUBE is a comprehensive software solution designed for building OTT, IPTV and Hybrid TV services. At its core is a robust platform comprised of server-side components, offering extensive APIs and a flexible architecture, enabling operators to provide end-users with a complete set of video streaming services. Complementing the platform, our solution includes a suite of client apps tailored for various devices, ensuring a seamless user experience and end-to-end functionality. Below is a description of the main solution components.

SmartTUBE Apps are a range of applications for the supported end-user devices. Depending on the device platform, the functionality of SmartTUBE apps may vary slightly.

Image1

SmartTUBE Applications

SmartTUBE Service Delivery Platform (SDP) is the core of the solution responsible for managing services, subscribers, content, pricing, metadata, end-user device provisioning, advertising, etc. Provides interaction with billing systems, payment gateways and 3rd-party information systems installed on the operator’s side.

Management of TV services, subscribers, tariff plans, meta content, etc., as well as system administration is performed via SmartTUBE Admin Console.

Image2

SmartTUBE Admin Console

SmartTUBE SDP interaction with external systems, such as VoD content libraries, EPG providers, OSS/BSS, recording servers, etc. is performed through the corresponding APIs.

Installation

This section provides a detailed guide on how to install the SmartTUBE Server, as well as recommendations on the characteristics
of the equipment used.

SmartTUBE Server Installation

The initial deployment of the SmartTUBE server is usually carried out by SmartLabs specialists during the project commissioning phase. This document serves as a reference guide for advanced users who intend to set up a distributed component structure, where each component is installed on a separate machine. It also provides information on integrating with your existing databases and configurations.

SmartTUBE installation requires manual configuration from a repository. Please follow the steps outlined below to successfully install SmartTUBE.

  1. Connect the repository (for the repository details contact the SmartLabs official representative).
  2. Install Java JDK from the repository:

# yum -y install smartlabs-java8-stub


Alternatively, you can download the rpm-package from the official source http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and install it:

# rpm -ivh <package_name>

  1. Install and run Elasticsearch (reference guide: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/rpm.html):
  2. Import the Elasticsearch PGP Key:

# rpm –import https://artifacts.elastic.co/GPG-KEY-elasticsearch

  1. Create a file called elasticsearch.repo in the /etc/yum.repos.d/ directory:

[elasticsearch]

name=Elasticsearch repository for 7.8 packages
baseurl=https://artifacts.elastic.co/packages/7.8/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md

  1. Install Elasticsearch:

sudo yum install –enablerepo=elasticsearch elasticsearch-7.8.1

  1. The RPM for Elasticsearch v7.8.1 can be downloaded from the website and installed as follows:

# yum -y install wget
# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.1-x86_64.rpm
# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.1-x86_64.rpm.sha512
# sha512sum -c elasticsearch-7.8.1-x86_64.rpm.sha512


This command compares the SHA of the downloaded RPM and the published checksum, which should output elasticsearch-7.8.1-x86_64.rpm: OK.

#  yum localinstall elasticsearch-7.8.1-x86_64.rpm

  1. Start the Elasticsearch service:

# systemctl start elasticsearch.service

  1. Add these settings in the configuration file /etc/elasticsearch/elasticsearch.yml:

cluster.name: smartlabs_cache_client
cluster.initial_master_nodes:
 – 127.0.0.1
network.host: _local_,_site_
node.data: true
node.master: true
node.name: node01
reindex.remote.whitelist: ‘*:9200’
xpack.license.self_generated.type: basic
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

  1. Restart the Elasticsearch service:

# systemctl restart elasticsearch.service

  1. Set the password for built-in users:

# /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto

  1. Follow the on-screen instructions.
  2. Remember the password for the elastic user. It will be needed in the SmartTUBE Cache client configuration.
  3. After you install Elasticsearch, enable the service autorun

    RHEL7: # systemctl enable elasticsearch.service

    and run the service:

    RHEL7: # systemctl start elasticsearch.service

  4. Install PostgreSQL (reference guide: https://wiki.postgresql.org/wiki/YUM_Installation)
  5. Install the ps-rpm file corresponding to your OS version and the required version of the package (https://yum.postgresql.org/repopackages.php), for example:

# yum localinstall https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-2.noarch.rpm

  1. Check the packages available for installation: # yum list postgres*
  2. Install PostgreSQL (the command depends on the package version you are installing):

# yum -y install postgresql96-server

  1. Initialize the database

    RHEL7:

# su – postgres
$ /usr/pgsql-9.6/bin/initdb (the path to initdb)
$
exit

  1. Enable the service autorun

    RHEL7: # systemctl enable postgresql-9.6.service

  2. Run the service

    RHEL7: # systemctl start postgresql-9.6.service

  3. Download the database dump: # yum -y install postgresql-initial
  4. Install SmartTUBE from the repository

# yum -y install smarttube5-mod-dataserver smarttube5-mod-cacheserver smarttube5-mod-datacore smarttube5-aui5 smartlabs-nginx smarttube5-mod-reports

  1. Make the following changes to the configuration file /opt/smartlabs/smarttube5/conf/modules/cache-server.conf:

     elasticsearch {

         auth.password = “elastic_user_password”

         auth.username = elastic

         connectTimeoutMillisec = 1000

         nodes = [

               “127.0.0.1:9200”

         ]

         socketTimeoutMillisec = 30000

       }

Where elastic_user_password — password for elastic user generated in Step 3.

  1. Make the following changes to the configuration file /opt/smartlabs/smarttube5/conf/modules/data-server.conf:
  2. Find the database section;
  3. Change the IP and PORT and DB reference in the connection-string parameter;
  4. Add the password for DB access;

Example of the correct section configuration:

database {

   connection-string = “jdbc:postgresql://192.168.10.25:5432/master?tcpKeepAlive=true&ApplicationName=sdp5_application”

   login = master

   max-connections = 38

   password = Jmmsd3k09sSQj54

   server = postgresql

}

  1. Open the configuration file /opt/smartlabs/nginx/conf/nginx.conf. It should contain the following:

user            nginx;
worker_processes    
6;
worker_rlimit_nofile    
40960;
worker_priority    
-5;

error_log   /var/log/smartlabs/nginx/error.log;

pid     /var/run/nginx.pid;

events {
   worker_connections 20480;
   epoll_events 8192;
   use epoll;
   accept_mutex off;
}

timer_resolution    1ms;

http {
   include ./mime.types;
   default_type application/octet-stream;

log_format main ‘$remote_addr [$http_x_forwarded_for] – $http_x_smartlabs_mac_address [$time_local] $upstream_cache_status $request “$status” $body_bytes_sent “$http_referer” “$http_user_agent” “$upstream_addr” $server_port “$http_host” $request_time $req uest_send_time “$upstream_response_time” $gzip_ratio’;
log_format mgmt ‘$remote_addr [$http_x_forwarded_for] – $http_x_smartlabs_mac_address [$time_local] MGMT $upstream_cache_status $request “$status” $body_bytes_sent “$http_referer” “$http_user_agent” “$upstream_addr” $server_port “$http_host” $request_time $request_send_time “$upstream_response_time” $gzip_ratio’;

access_log      /var/log/smartlabs/nginx/access.log main;

sendfile            on;
sendfile_max_chunk  131072;
keepalive_timeout   60;
underscores_in_headers  on;
server_tokens       off;
output_buffers      256 1024k;
tcp_nodelay     on;
tcp_nopush      on;

proxy_next_upstream error timeout http_500 http_502 http_503 http_504 ;
proxy_cache_path    /opt/smartlabs/nginx/cache levels=l:2 keys_zone=one:100m inactive=60m max_size=1500m;

push_stream_shared_memory_size 128M;

include     “http.d/*.conf”;
include    
“upstreams.d/*.conf”;
include    
“servers.d/*.conf”;

server {
   listen 127.0.0.1:7999;

   location /sla_status {
       sla_status;
       sla_pass off;
       allow 127.0.0.1;
       deny all;
   }

   location /sla_purge {
       sla_purge;
       sla_pass off;
       allow 127.0.0.1;
       deny all;
   }

   location / {
       access_log off;
       deny all;
   }

   location = /nginx_status {
       stub_status on;
       access_log off;
       allow 127.0.0.1;
       deny all;
   }

   location /push_stream_admin {
       push_stream_publisher admin;
       push_stream_channels_path $arg_topic;
       access_log off;
       allow 127.0.0.1;
       deny all;
   }
 }
}

  1. Configure the /opt/smartlabs/smarttube5/conf/modules/report.conf file with the IP, port and DB name. It should look like this:

component = {

  description = “SmartTUBE5 Report”

  jar = “sdp-report.jar”

  class = “smartsdp.report.main.SmartSDPReport”

  singleton = true

  load-on-startup = 14

  servlet-context-path = “/report/*”

  install-path = “/opt/smartlabs/smarttube5/modules/reports”

  number-of-http-get-handlers = 100

  properties = {

      akka-local = {

      host = “127.0.0.1”

      port = 5054

      }

  datasources = [

      {

          ds-name = “jdbc/sdp”

          server = “postgresql”

          connection-string = “jdbc:postgresql://185.5.42.72:5432/master?tcpKeepAlive=true&ApplicationName=sdpreport_application” login = “master”

          password = “MfXXDeQ6WC”

          max-connections = 5

          }

      ]

  }

}

  1. If you need to apply other changes to configuration files, see their description in the Configuration files part. Normally, you can work with default settings.
  2. Add the rule to iptables (# vi /etc/sysconfig/iptables)

-A INPUT -p tcp -m tcp –dport 8084 -j ACCEPT


Restart the service

RHEL7: # systemctl restart iptables.service

If the service is not set for the RHEL 7 iptables (you can see it by the empty file /etc/sysconfig/iptables), do the following:

  1. Disable firewalld

# systemctl stop firewalld

  1. Delete it from autorun

# systemctl disable firewalld

  1. Install the package with utilities

# yum -y install iptables-services

  1. Add iptables to autorun

# systemctl enable iptables.service

  1. Run the service

# systemctl start iptables.service

  1. Add the rule from above and restart the service
  2. Run the smarttube5 service:

    RHEL7: # systemctl start smarttube5.service
  3. Check the operability:

# wget –header “Content-Type:application/json” -O – ” http://localhost:8084/sdpapi?metacontentingenre=list “


The response must be 200 OK.

Managing Services

Here you can find detailed instructions on managing Live, Catch-up, nPVR and VoD content and services, content promotion, subscribers, pricing plans, messaging and other related functions of the SmartTUBE Service Delivery Platform.

Baselines

The SmartTUBE Service Delivery Platform (SDP) provides access of digital TV subscribers to such services as Live TV, Pause Live, Video on Demand (VoD), Personal Video Recording (nPVR), Pay-per-view (PPV), etc. To implement them, SmartTUBE Server with the web-based SmartTUBE Admin Console is deployed on the operator’s side. This is the core of the platform and is designed to manage the entities below.

Subscriber Management Entities

For how to manage these entities, see subsections Pricing Plans and Service Accounts.

  • Service Account — contains all information about a subscriber and uniquely identifies it in the system. A subscriber can bind several devices — STBs, mobile devices, Smart TVs — to the account and use them in parallel within a device limit set by the operator. Typically, service accounts are created from the Account templates automatically, when a subscriber authorizes in the system for the first time. If an integration between SmartTUBE and operator’s OSS/BSS is configured, the service account corresponds to a subscriber’s account in the OSS/BSS. Subscriber’s personal data is stored on the OSS/BSS side only.
  • Terminal (or Connection) — uniquely identifies the end-user device of a subscriber in the system. Each device should be bound to at least one service account.
  • Device type — an attribute reported by each subscriber’s device to the SmartTUBE Server, through which the server determines the device functionality. Thus, you can, for example, limit the number of mobile devices on one service account, use different TV streams on devices of different types, use different promo banners or channel logos, etc.
  • User profile — contains parameters of age restrictions for content watching and purchase, UI language preferences, personal content sorting, etc. customized by subscriber. Subscriber can create several user profiles. Profiles are bound to the service account, thus they are common for all devices of a subscriber. Profiles can be protected by a PIN code.
  • Pricing plan — a fixed list of service bundles, can include services of different types. Allows to customize the delivering rules for each bundle. For example, you can enable a bundle by default or prevent the subscriber from disabling it.
  • Price list —  contains the cost and usage conditions of each service bundle. There are two types of price lists:
    • One-time purchase — a fee for the service bundle paid once. You can specify additional rules for such bundles to configure differentiated pricing, for example, a rule to charge for the duration of the service (a day, month, year, forever, etc.).
    • Subscription — the service bundle is provided for a certain period of time and involves periodic payment. Subscription payment is handled by OSS/BSS.

Content Management Entities

The management of these entities is disclosed in subsections Setting Up TV Services and Setting Up xVoD Services.

  • TV Channel — contains all information about a particular TV channel: URL of the channel stream, channel logo, description, regional restrictions, etc.
  • EPG (Electronic Program Guide) — TV program guide for a particular TV channel, containing all information about Programs and their air date.  
  • Movie — contains all metadata of a particular movie: title, description, cast, posters, links to assets, age restrictions, etc. One movie can be linked to assets of different content providers.  
  • Series — each series contains metadata for the Seasons and Episodes that make up the series.
  • Content Bundle or Package — a package of TV channels, VoD movies, personal recording limits, etc. The bundles can be delivered to all or specific Device types.

Content Promotion Entities

For how to manage these entities, see the subsection Content Promotion.

  • Banner — contains information about a banner displayed in the SmartTUBE apps’ UI on the top of the Home screen (in the carousel). Banner may contain several images intended for different Device types.
  • Recommendation — movie or series recommendation displayed on the Home screen of the SmartTUBE apps as a poster in the ‘Recommended content’ rail.
  • Showcase — a list of movies or series recommended by the operator and united by a specific theme. Displayed on the Home screen of the SmartTUBE apps as a poster rail.

Content Management

This article provides a comprehensive guide to setting up and managing TV and video-on-demand (VoD) services using the SmartTUBE platform. It covers key steps such as adding TV channels, managing electronic program guides (EPG), bundling channels into pricing plans, and configuring advanced features like Catch-up, nPVR, and Pay-Per-View (PPV) services. Additionally, it explains how to integrate VoD content from internal and external providers, automate metadata imports, and promote content using banners, recommendations, and showcases within the SmartTUBE apps.

 .

Setting up TV Services


Get Started

The SmartTUBE Admin Console allows you to manage a wide variety of TV channel metadata:

  • View the channel list
  • Add channels
  • Manage the Electronic Program Guide (EPG)
  • Set broadcast sources for different devices
  • Set a channel access level
  • Add channels to bundles
  • Configure the stream and record encryption
  • Manage the TV service cost
  • Blackout some channel (stop streaming immediately), and much more

In order to provide TV services to your subscribers with SmartTUBE, you need to complete 4 steps:

Delivering the TV content must be allowed to you by the right holders. So, before providing it, reach an agreement with the owners.

Delivering the TV content must be allowed to you by the right holders. So, before providing it, reach an agreement with the owners.

1. Add channels

  1. On the Channels > Channels page, click Add and enter the channel parameters you have received from the right holders. For some settings explanation, see below.
  2. Set the Published flag for the channel
  3. Click the Save button
  4. If you are editing a single channel, to apply changes on end-user devices click the Refresh button
  5. If you edit multiple channels sequentially, to apply changes on devices click the Refresh button on the Channels > Channels page after you have finished editing all channels. This way you will avoid a negative impact on the service.

2. Create or import EPG

Here you have 2 options: Manual and Automatic.

Manual

This method allows you to add EPG metadata for programs manually via SmartTUBE Admin Console — one by one:

  1. On the Channels > EPG page, select a channel.
  2. On the EPG pane, click the Add button and add program metadata.
Automatic

Manually adding metadata for all programs and channels can seem quite cumbersome. So we recommend you to automatically import and update EPG metadata from any EPG provider for all channels. To configure the automatic EPG import, read the section Importing EPG.

The imported EPG metadata must conform to the one of the formats supported by SmartTUBE.

3. Add channels to bundles

  • In a multi-tenant architecture, you should first create an empty price list(s) on the Pricing plans > Pricing plans page, since the Pricing offer field on bundles will be required in this case.
  • If you remove any bundle from all the tenant’s pricing plans, it will disappear from the list of services available to subscribers.
  1. Contact your Commercial Manager for information about the bundles you need to create for your subscribers.
  2. On the Pricing plans > TV bundles page, click the Add button and create a new bundle. For more info on how to create a bundle, please see here.
  3. On the bundle editing page, in the pane to the right, select the channels you want to add.
  4. If needed, configure the Catch-up and nPVR services by following the instructions.

4. Add bundles to pricing plan

To make the channels from the bundle be available for a subscriber, this subscriber must be subscribed to the pricing plan including this bundle. You may set the bundle active by default, otherwise a subscriber will need to activate a corresponding service in the SmartTUBE App to get access to the channel.

  1. On the Pricing plans > Pricing plans page, click the Add button and create a new pricing plan.
  2. On the pricing plan editing page in the Services area, click the Add button and add the bundle created in Step 3.
  3. Define the pricing rules for the bundle on the pane on the rig

.

Importing EPG


You can manage the TV listings that are displayed in the SmartTUBE apps, and you can do it either manually in the SmartTUBE Admin Console > Channels > EPG, or automatically.

To configure automatic importing and updating of the EPG, follow the steps below:

1. Obtain the link to the EPG file from your EPG provider

The XMLTV and SmartLabs EPG XML formats are supported. Only HTTP is supported as the EPG delivery protocol.

2. Set the automatic EPG import

Set the job in Administration > Scheduled jobs with one of the following method and guiding the field tooltips:

  • EPG import (in xmltv format) with channel identifier in request (xmltvepgimport#doimport) — allows you to import EPG by channel in the XMLTV format.
  • EPG import with channel identifier in request (epgimport#doimport) — allows you to import EPG by channel in the SmartLabs EPG XML format.
  • EPG import: all from xml (epgimport#doheapimport) — allows you to import EPG for all channels at once in the SmartLabs EPG XML format.

Please take into account that the language of the EPG you are importing must be defined in Dictionaries > Languages. Make sure that the Language ID in SmartTUBE corresponds to the language ID specified in the EPG file.

After setting the job, SmartTUBE will send to the EPG provider the following import request at the specified time and day:

  • <job’s field epg-import.url>?channel=<channel’s external ID> — if the epgimport#doimport or xmltvepgimport#doimport methods are used.
  • <job’s field epg-import.url> — if the epgimport#doheapimport method is used.

3. Check the EPG import for correctness

After importing the EPG make sure that the import has been performed correctly:

  • Check that the EPG is displayed in the SmartTUBE Admin Console and in SmartTUBE Apps.
  • Scan the log of the SmartTUBE Server SmartSDPCompContainer.log for errors.

4. Set the automatic deletion of obsolete EPGs

To delete old EPG from database, set the job in Administration > Scheduled jobs with the method Delete expired EPG (garbagecollector#deleteexpiredepg) and guiding the field tooltips.

In the current implementation of SmartTUBE app for large-screen devices, when the next program starts at a channel, the user device checks for how many future programs for EPG are loaded to the device for each channel. If there are less than 3, the device requests for the EPG for 24 hours forward for this channel. If the request fails, the device tries again (not more often than in 30 minutes for a channel).

.

Catch-up and nPVR Services


The SmartTUBE platform allows you to launch Catch-up and nPVR services for your subscribers. Each service has a specific configuration described below.

Catch-up Services

Catch-up services — Pause Live, Start Over, and Time Shift — allow subscribers to watch current or finished TV programs for a certain period after they are aired. This period is determined by the operator.

Pause Live and Start Over

To configure the services Pause Live (pause the broadcast, continue watching, rewind within the current TV program) and Start Over (watch the current TV program from the beginning), follow these steps:

  1. Add the channel into the DVR bundle.
  2. Set the checkbox Use Pause Live on the bundle.
  3. Set the Record duration value > 0.
    Record duration is the period within which Catch-up services are available. For example, if this parameter is set to “1 hour”, the subscriber will not be able to start watching the current TV program from the beginning if it started more than an hour ago.
  4. Configure the DVR URL parameter in the Streams tab on the channel.

For the Catch-up services to work correctly, the channel must be recorded on a video server and the Record duration value should be shorter or equal to the recording window set by video server settings. If you are using SmartMEDIA, see the SmartMEDIA part — chapter “Basic Settings” — parameter Recording window.

Time Shift

In addition to the Pause Live and Start Over services you can set the Use TSTV checkbox to allow subscribers to watch finished TV programs.

When you set the Use TSTV checkbox, the Use Pause Live checkbox is automatically set too, since the TSTV service cannot be used without Pause Live.

SmartTUBE apps allow subscribers to search through finished TV programs. But if the TSTV service is not enabled for the channel, its programs will be hidden for subscribers.

nPVR Service

nPVR service allows recording finished, current, and future TV programs at the subscriber request.

General Configuration

To configure the nPVR service for specific channel, follow these steps:

  1. Add the channel into the NPVR bundle.
  2. Set the Recording time quota — limits the maximum duration of all subscriber recordings.
  3. Set the Records storage time — limits the storage duration of subscriber recordings.
  4. Configure Video server name in the Streams tab on the channel.
  5. Configure DVR channel ID, which must match the channel ID in the video server settings. If you are using SmartMEDIA, see the SmartMEDIA part — chapter “Basic Settings” — parameter ID.

This configuration will allow recording of future TV programs.

You can specify the time added to the beginning and end of the TV program set by the subscriber to record in advance. Thus, in case of discrepancy between the actual start/end time of the program and its schedule in the EPG, the chances of recording the TV program in full are increased. See the chapter “system.conf”, description of the npvr.add.delta.incMin and npvr.add.delta.decMin parameters.

To enable the ability to schedule nPVR recordings in case if subscribers are going to exceed the Recording time quota set the Quota overspending limit parameter. In this case, when the subscriber is going to record a TV program or TV series and thus exceeds the Recording time quota:

  • The SmartTUBE app displays a corresponding warning.
  • The TV program is queued for recording, but is physically recorded by the video server only after the quota is released.
  • Once the recording queue exceeds the Quota overspending limit, programs are no longer added to it.

Also pay attention to the recordseries.job.record.newEpisodesOnly settings in the SmartTUBE SDP configuration file system.conf, which are responsible for the feature of recording only new episodes of TV series.

Current and Past Broadcast Recording

To enable the ability to record the current TV program or finished TV programs, follow these steps:

  1. Set the Allow current NPVR or/and Allow past NPVR checkboxes, respectively.
  2. Set the NPVR Duration value > 0.
    NPVR duration — the period within which the recording of finished TV programs is allowed. If the duration is not set, the default setting in the SmartTUBE Server configuration file system.conf is applied:
channels.list.npvrDuration.default = 7200 # The default period within which nPVR recording of finished TV programs is allowed (in seconds).

For the Current and Past nPVR features to work correctly, the channel must be recorded on a video server and the NPVR duration value should be shorter or equal than the recording window set by video server settings. If you are using SmartMEDIA, see the SmartMEDIA part — chapter “Basic Settings” — parameter Recording window.

  • If the channel is present in several NPVR bundles, the maximum value of the NPVR duration is used.
  • If the channel is present in several NPVR bundles and the Allow current NPVR flag is set on at least one of them, the service is considered active. The same is true for the Allow past NPVR flag.

Instant nPVR Playback

Typically current and past broadcast recordings become available for playback after some time (5–10 minutes). To enable the ability to play the recording immediately after the recorded TV program is finished, configure the DVR URL parameter in the Streams tab on the channel.

 .

Catch-up Content Library


Catch-up Content Library is the SmartTUBE feature that allows you to record selected TV programs and provide them to subscribers as a content rail in the SmartTUBE Apps. Typically, this feature is available in the ULTRA version of SmartTUBE 8.4 and later and works in conjunction with SmartMEDIA recording server only.

In brief, the logic of how this feature works is as follows:

  1. When importing EPG, SmartTUBE SDP selects TV programs with a special tag for the day ahead.
  2. These TV programs are sent to the recording queue of the SmartMEDIA server. Technically, this is similar to recording future nPVR programs on request from subscribers.
  3. Upon completion of recording, the programs become available to users in SmartTUBE Apps via content rails on the Home screen.

To provide this feature to your subscribers, follow the steps below.

Configuring the ‘Catch-up Content Library’ Feature

1. Mark TV programs to be provided as VoD

In the imported EPG file, mark the programs with the tag <details><public_npvr>1</public_npvr></details>. See examples here.

Currently, the SmartLabs EPG XML format is only supported by this feature.

2. Enable processing of tagged programs

If you already have EPG import set up, you need to do the following:

  1. Go to Administration > Scheduled jobs and find the job(s) you are using to import EPG.
  2. Make sure the job(s) uses the Method = EPG import with channel identifier in request (epgimport#doimport) or EPG import: all from xml (epgimport#doheapimport)
  3. Enable the option Record ‘Time Shift as VoD’ programs. In this case, the processing of the tagged programs starts immediately after the EPG import is completed. If you want to separate these processes over time, uncheck this option and create a new job with Method = Record public NPVRs job (npvrpublicjob#record).

If you haven’t set up EPG import yet, you can read about how to do it here.

3. Create a special nPVR bundle

In the Pricing plans > Bundles & Packages > NPVR, create an nPVR bundle taking to account the field tooltips and the following instructions:

  1. Name: Give the bundle an arbitrary, meaningful name.
  2. Recording time quota: Maximum duration of recordings. Typically, an unlimited recording duration is used for the ‘Catch-up Content Library’ feature. Thus leave this field clear.
  3. Recording storage time: Storage duration of recordings. Set a reasonable value depending on your business ideas and the capabilities of your content storage system.
  4. Product offers: List of pricing plans the bundle is included to. Leave it clear at this step.
  5. Notification quota level, Quota overspending level: Leave these fields clear.
  6. Billing mode: Leave the default value — One stage.
  7. Allow current nPVR, Allow past NPVR, NPVR duration: Due to the recording for the ‘Catch-up Content Library’ feature is made for one day ahead from the EPG import date, you can leave these fields clear.
  8. Channels: List of channels for which the ‘Catch-up Content Library’ feature need to be enabled.
  9. Other fields: You can fill in them depending on your requirements or leave them clear.
For the feature to work properly, the channel recording window on a video server must be longer than the possible maximum duration of a single recorded program. If you are using SmartMEDIA, see the SmartMEDIA Admin Console documentation > parameter Recording window.

4. Create a special Pricing plan

In the Pricing plans > Pricing plans, create a pricing plan and add the created NPVR bundle to it — click  in the Services section. When setting up the bundle within the pricing plan, follow the field tooltips and the following instructions:

  1. Service: Select the created NPVR bundle from the list.
  2. Device type, Duration, Default state, A subscriber can manage the service, Hide at unsubscription, Hide, Account state when unsubscribe: Leave it clear.
  3. Start date: It makes sense here to set a start date of testing the ‘Catch-up Content Library’ feature before it is commercially launched.
  4. End date: Set the most distant date here, unless you plan to provide this feature for a limited period of time.
  5. Price lists section: Leave it clear, do not add any price list.
  6. Other fields: You can fill in them depending on your requirements or leave them clear.

Also, make sure the Pricing Plan contains an active TV bundle that includes a channel intended for the ‘Catch-up Content Library’ recordings.

5. Enable the feature on the SmartTUBE SDP side

In the SmartTUBE SDP configuration file system.conf, add the following setting:

epg.list.fetchPublicNpvr.enabled = true

6. Create custom rails on the Home screen in SmartTUBE Apps

Now you need to present the recorded programs to your subscribers. Currently, the ‘Catch-up Content Library’ content can be displayed in SmartTUBE Apps on the Home screen only. To do this follow the guidelines in Article “Configuring Custom Content Rails on Home Screen” (chapter “TV Program Rail”).

7. Check if this feature works correctly in SmartTUBE Apps

.

PPV (Pay-Per-View) Programs


Pay-per-view (PPV) a service allowing your subscribers to pay for watching individual TV shows. Such shows are usually provided by 3rd-party content providers and are marked in the EPG import file.

To enable this service, please follow the steps below.

Currently PPV is only supported by the SmartTUBE app for STBs. It wouldn’t work in the web and mobile apps, including Android APK packages (for Android TV and Android AOSP devices).

1. Create PPV package

  1. Go to SmartTUBE Admin Console > Pricing plans > PPV Packages.
  2. Click the Add button and create a new PPV package guiding the tooltips.

Please pay attention to these fields:

  • External ID — an ID of the PPV package in the EPG import file. Thus it should match to the <ppv_ext_id> tag contents.
  • Billing mode — choose Two-step, if you need online interaction with the billing system of a 3rd-party content provider that provides PPV content of this package.
  • Prices tab >  Price for program checkbox  set this checkbox if you want to charge the set fee for watching the entire program. If you want to charge this fee for every minute of watching, remove it.2

2. Add PPV package to Pricing plan

  1. Go to Pricing plans > Pricing Plans.
  2. Select the pricing plan the PPV package you want to include to or create a new one with the Add button.

Please pay attention to the following:

  • If you want the customers can use the PPV package without additional subscription commands, set the Default state field to Active.
  • If you want to allow subscribers to subscribe to the PPV package for an additional fee, create a Price list for it.

3. Add or check PPV markers in EPG

  1. If you are preparing the EPG import file yourself, add the package External ID to this file (using the <ppv_ext_id>  tag).              
  2. If you are using a 3rd-party EPG provider, please check that the PPV markers in the import file match the External IDs of the corresponding PPV packages.

4. Schedule the EPG import

Create a schedule for the regular EPG import.

5. Check PPV labels in the SmartTUBE app

Now you should see PPV icons on the PPV programs’ posters in the SmartTUBE app and the purchase dialog box when clicked.

 .

Setting up xVoD Services


The SmartTUBE SDP enables operators to consolidate movies and series from various sources into a unified catalog, offering the following management capabilities:

  • view content list,
  • add content,
  • set a content access level,
  • add content to bundles,
  • configure content encryption,
  • manage services cost, and more.

Each content unit can contain 1 or more assets (i.e. media files)  There are two types of content providers:

  • Internal provider. Content is stored on SmartTUBE servers and played back from the operator’s equipment or using a CDN. Content metadata is entered manually via the Admin Console.
  • External provider. Content is stored on the servers of an external provider and played back from its equipment. Typically, content metadata is imported automatically using the provider API.

Getting Started with xVoD Services

To launch VoD services, you need to follow these steps:

  1. Add movies and series to catalog
  2. Configure VoD bundles
  3. Configure media assets
  4. Configure price lists
  5. Configure regular import of VoD metadata

1. Adding VoD Content

Depending on the type of provider follow the steps below to play content on end-user devices.

External Provider

1. Import VoD metadata using provider’s API

To configure automatic import of the external content provider metadata, please reach out SmartLabs Support.

The following items will be automatically created in the Admin Console after import:

  • VoD bundle (if not already created).
  • Content unit card, including:
    • content unit parameters;
    • asset parameters;
    • TVOD or SVOD price list with a linked VoD bundle.

If necessary, you can edit some data, such as a bundle name in different languages. However, keep in mind that when you re-import, the manually changed fields will regain the imported values.

2. Add a VoD bundle to the pricing plan

Select or create a new pricing plan on the Pricing plans > Pricing plans page. Add the VoD bundle in the Services section.

Depending on the content provision rule (see the topic “VOD Bundling”), the bundle settings in the pricing plan differ. The following settings are typical, but they may differ for different providers:

  • TVOD: uncheck the A subscriber can manage the service flag, the Default state is Active.
  • AVOD and FVOD: uncheck (if the bundle is required) or check (if optional) the A subscriber can manage the service flag, the Default state is Active. If necessary, set the pricing rules for the bundle in the Price lists* section, having previously agreed them with the provider.
  • SVOD: check the A subscriber can manage the service flag, set the pricing rules for the bundle in the Price lists section, having previously agreed them with the provider.

In order for the bundle content to be available to the subscriber, this subscriber must be subscribed to the pricing plan that includes this bundle.

Internal Provider

Before configuring content, make sure that asset files are located on SmartTUBE video servers and are available over the network.

1. Get content distribution rights from copyright holders

The copyright holders should allow you to provide content to subscribers.

2. Create one or more VoD bundles

Content must be included in one or more VoD bundles. If necessary, create a new package on the “Pricing plans” – “VoD bundles” page (see the chapter “VOD Bundling”).

3. Add VoD bundles to the pricing plan

Select or create a new pricing plan on the Pricing plans > Pricing plans page. Add the VoD bundle in the Services section.

Depending on the content provision rule (see the chapter “VOD Bundling”), define the following settings:

  • TVOD: uncheck the A subscriber can manage the service flag, the Default state is Active.
  • AVOD, FVOD, SVOD (at the operator’s discretion). Example:
    • for a free bundle (typically AVOD, FVOD): uncheck the A subscriber can manage the service flag, the Default state is Active, do not set the pricing rules for the bundle in the Pricing lists section.
    • for a paid package (typically SVOD): check the A subscriber can manage the service flag, set the pricing rules for the bundle in the Pricing lists section.

Repeat for all bundles containing content.

In order for the bundle content to be available to the subscriber, this subscriber must be subscribed to the pricing plan that includes this bundle.

4. Add the content you are going to provide to your subscribers

To add a series/movie, click the Add button on the Content > Series or Movies page and specify the following parameters:

  • content parameters received from the copyright holders,
  • assets,
  • price lists.

Information on setting up assets and price lists is provided in the chapter “Configuring Assets and Price Lists in the Content Unit Card“.

After filling in all the parameters, check the Published flag and save changes.

2. VoD Bundling

When adding a VoD bundle please pay attention to the parameters below.

Parameters of the external provider’s VoD bundle are usually filled in automatically, their description is provided for reference.

  • External ID

Bundle ID used for integration with external systems, for example, with billing – to identify the bundle when sending requests to subscribe / unsubscribe the bundle from the subscriber. This field is not used for interaction with an external content provider. Instead, the settings on the right panel of the VoD bundle card are used.

  • Content delivery rule

This field defines:

  • for end-user devices — the method of providing a content bundle;
  • for SmartTUBE server — if the provider is external, the package to place the content during import. See the description of the parameter “Service plan ID at provider’s”

Valid values:

  • TVOD – paid, purchase;
  • SVOD – paid, subscription;
  • FVOD – free, subscription;
  • AVOD – free, subscription, with advertising.
  • Content provider

The Content provider values are passed from the Administration > Content Providers dictionary accessible for users with the Administrator role only.

  • Service plan ID at provider’s

Bundle ID on the provider side. Used only for external providers.

On the SmartTUBE side, VoD bundles, into which the content is placed, are created in advance or when importing metadata. If the provider does not place content into packages on its side, the SmartTUBE sets the following values for the created bundles in this field when importing:

  • DEFAULT_FREE_SVOD – for AVOD and FVOD;
  • DEFAULT_SVOD – for SVOD;
  • DEFAULT_TVOD – for TVOD.
  • Information Fields

The following fields are only relevant, if the content is packaged by an external provider. They allow you to understand, what a package is on the provider side, and they are not passed to the end-user devices:

  • The provider’s content title. Bundle name.
  • The provider’s content duration. Content delivery duration after the subscription.
  • The provider’s price. Bundle price.
  • The provider’s content synopsis. Description of the bundle.

The values of the following fields are passed to devices (they can be edited in agreement with the provider, except for the TVOD price list):

  • Name
  • Comment
  • Duration and price from the TVOD price list (for TVOD content) / pricing plan (for SVOD content)

3. Configuring Assets & Price Lists

A content unit can have one or more assets. Usually, the movie and TV series assets are specified in a similar way. So for the movie, a full description of filling in the parameters is provided (see the chapter “Configuring Movie Assets”), and for the series – only differences from the movies (see the chapter “Configuring Series Assets”).

Depending on the provider type – external or internal, – asset parameters are filled in differently. Since the parameters of external provider assets are typically filled in automatically, their description is provided here for reference.

To make the asset available to subscribers, you should add the price list(s) for it. For an external provider, price lists are added and configured automatically during import. So, changing them manually in Admin Console makes sense only for test purposes.

Image8

Asset parameters in the content unit card

Configuring Movie Assets

1. Add assets on the Assets tab

Set the following parameters for each asset:

  • File name (for internal provider only)

This field defines the URL that the end-user device requests to play content. URL is as follows:

<provider_prefix>/<filename>.<provider_postfix>

This field can contain either an absolute path to the file or a relative path. In the second case, the prefix and postfix are specified on the Administration > Content providers > [any provider] page. This page is accessible for users with the Administrator role only.

The URL of all assets of the same provider must be specified in the same way.

You can set the asset path in the following ways:

  • As absolute path in the File name field:

http://111.1.11.11/hls/VOD/smartlabs/movie.m3u8

  • As relative path or <filename> only in the File name field, and <provider_prefix> with <provider_postfix> on the Content providers > [any provider] page:

File name: /hls/VOD/smartlabs/movie
Asset file prefix: http://111.1.11.11
Asset file postfix: .m3u8

File name : movie
Asset file prefix: http://111.1.11.11/hls/VOD/smartlabs/
Asset file postfix: .m3u8

  • External content ID (for external provider only)

String ID of the content unit on the external provider side. Used by the SmartTUBE server to match content when importing data from the provider, and by the subscriber application to play the content. Filled in automatically when importing a movie.

Do not edit the asset external ID after it is created. If you do this after a subscriber purchases content, the content will no longer be available to that subscriber.

  • Encryption type

The system with which the asset is encrypted (for example, Widevine). If not encrypted, leave Not Selected.

  • Content provider
    • INTERNAL – for internal content provider;
    • {External content provider ID}
  • DRM identifier

DRM identifier used for encryption (should be provided by the party that encrypted the content).

  • Available on mobile devices

If this check box is selected, this content will be available on mobile devices running iOS and Android.

  • Set the price list(s) for each asset
Image1
  • TVOD (one-time purchase). Create A TVOD price list, specify the VOD bundle, the price, the duration of the movie (if the duration is not specified, the asset will be sold as EST (indefinitely)), and the quality of the asset.
  • SVOD (subscription). Create a price list in the Movie packages tab, specify the VoD bundle in it. The price for SVOD content is set in the pricing plan.
  • After filling in all the asset parameters, check the Ready checkbox.

This means that the asset file is ready for playback on end-user devices. If the asset is not ready (for example, it is damaged), uncheck this checkbox, and the asset will not be streamed to devices. A movie without ready-to-play assets will not appear on devices.

Configuring Series Assets

To make a series available to subscribers follow these steps:

  1. Add the series on the Series > [any series] > Provider relation tab. Set the required parameters:
    • Content provider – select Internal (since only the internal provider needs to manually fill in the parameters).
    • External content ID​ – arbitrary value (for example, ID of the series).
    • Add a TVOD or SVOD price list (the Movie packages tab), specify the VoD bundle and other parameters, similar to the movie. This price list will be used for billing the series as a whole.
    • Check the Ready checkbox.
  1. Add at least 1 published season.
  2. Add at least 1 published episode for each published season.
  3. Add at least 1 ready asset for each published episode. Episode assets data is used to play content. Specify the asset parameters for each episode in the same way as for movies paying attention to the following rules:
    • Set the TVOD or SVOD price list to the episode only if you want subscribers to buy it separately from the entire series.
    • If an episode has a price list set and the subscriber has purchased the entire series that includes this episode, it also becomes available for watching by the subscriber.
    • If you want subscribers to buy each episode separately (without the ability to buy the entire series), set the TVOD price list for each episode and place the entire series into a hidden active SVOD bundle (i.e., set the Hide checkbox and the Default state = Active field for the bundle in the corresponding pricing plan).

4. Configuring VoD Import

On the Administration > Scheduled jobs page, you can create a job for regular VoD importing.

Image9

List of methods for regular execution

In the Method field you can choose one of the available importers:

  • CableLabsFormat VOD IMPORT with vod identifier in request (cablelabsformatvodimport#doimport) — supports the SmartLabs VoD Metadata Format (based on Cablelabs 3.0) and importing from one provider.
  • Import metacontent from external sources (metacontentimport#doimport) — supports the HBO VoD Metadata Format (based on Cablelabs 3.0) and importing from multiple providers.

For a description of the HBO and SmartLabs VoD metadata formats, see the chapter “VoD Content Import”.

Import of VoD Metadata in HBO Format

To perform an import using the metacontentimport#doimport method, specify the following parameters in the Method parameters field:

  1. Metadata processing logic

Format:

“{external provider ID in lowerCase format}.use.provider.logic”: “{external provider ID whose logic should be used}”

The “logic” here means a set of settings and rules for processing metadata specific to each provider. Thus, in the example below, the FBOD provider will download content from the FTP server (access details are indicated below), with the same folder naming rules, using the same logic and in the same XML format as the HBO provider.

Example:

“fbod.use.provider.logic”: “HBO”

  1. List of providers to process

Format:

“providers”: “{external provider IDs separated by comma}”

Example:

“providers”: “PROVIDER_1,PROVIDER_2,PROVIDER_3”

This parameter is optional. If not set, the job performs import sequentially for all active providers in the Administration > Content providers dictionary. This dictionary is accessible for users with the Administrator role only.

  1. Other parameters specific to each provider

Format:

“{external provider ID in lowerCase format}.{provider-specific parameter}”: “{parameter value}”

Example:

“provider_1.ftp.server”: “172.20.50.54”,
“provider_2.content-sortBy”: “popular”,
“provider_3.overrideOriginalName”: 1

Example of the Method parameters string for multiple providers:

{ “provider_1.providerSupportedLangsMap”: “ru=ru,en=en,lv=lv”, “provider_1.content-sortBy”: “popular”, “provider_1.overrideContentNames”: 1,  “provider_1.overrideOriginalName”: 1, “updatedLangName”: 1,  “updateNormalizedName” : 1, “updateLangDescription”: 1, “provider_2.providerSupportedLangsMap”: “en=en,cs=cs”, “provider_2.accessLevelRemoveAllButDigits”: 1, “provider_2.accessLevelPrefix”: “PEGI-“, “blabla1”: 5, “provider_3.appVersion”: “1234”, “provider_3.getPurchaseInfo.skipTestPrices”: false, “provider_3.providerSupportedLangsMap” : “ru=ru”, “provider_3.conflictProviders”: “PROVIDER_1”,  “provider_1.conflictProviders”: “PROVIDER_3” }

Notes

  1. To successfully complete the job, all providers specified in its parameters must be present in the Administration > Content providers dictionary. This dictionary is accessible for users with the Administrator role only.
  2. Parameters of steps a) and c) can be specified in the system.conf configuration file (in the metacontent section), observing the format: parameter = “value”

Example:

metacontent = { provider_1.use.provider.logic = “HBO” provider_1.ftp.server = “192.168.299.189” provider_2.providerSupportedLangsMap = “ru=ru,en=en,lv=lv” provider_2.content-sortBy = “popular” provider_2.overrideContentNames = 1 provider_2.overrideOriginalName = 1 }

Import of VoD Metadata in SmartLabs Format

To perform an import using the cablelabsformatvodimport#doimport method, specify the following parameters in the Method parameters field:

  • Content provider to process

Format: “defaultContentProvider”: “{External ID of the Content provider in the SmartTUBE}

Example: “defaultContentProvider”: “PROVIDER_2”

This parameter is optional. If not set, the job performs import for the provider INTERNAL.

  • DRM mapping. Allows to change the assets’ Encryption type specified by the <content:EncryptionInfo> XML section when importing.

Format:

  • “drmTypeNameMap”: “{Name of the Content provider in the SmartTUBE}|{External ID of the Encryption type set in the XML imported}={Name of the Encryption type in the SmartTUBE} or
  • “drmTypeIdMap”: “{Name of the Content provider in the SmartTUBE}|{External ID of the Encryption type set in the XML imported}={ID of the Encryption type in the SmartTUBE}

You can also specify DRM mapping for multiple providers by using the * character as a separator (see examples below).

Examples:

  • “drmTypeNameMap”: “PROVIDER_3|widevine=widevine_provider3*INTERNAL|widevine=widevine”

It sets the widevine_provider3  Encryption type instead of the widevine for the PROVIDER_3 provider.

  • “drmTypeIdMap”: “PROVIDER_3|widevine=247824302*INTERNAL|widevine=240419092”

Notes

  1. To successfully complete the job, the providers specified in its parameters must be present in the Administration > Content providers dictionary. This dictionary is accessible for users with the Administrator role only.
  2. The job parameters can be specified in the system.conf configuration file (in the metacontent section) as follows:
metacontent = {
cablelabsformatvodimport.defaultContentProvider =
“PROVIDER_2”
cablelabsformatvodimport.drmTypeNameMap =
“PROVIDER_3|widevine=widevine_provider3*INTERNAL|widevine=widevine”
}

5. Enable Watching VoD Offline (optional)

To enable offline viewing for specific movies, series, or episodes for your subscribers in SmartTUBE Apps, follow the steps below:

  1. Access SmartTUBE Admin Console and go to Content > Movies/Episodes.
  2. Select the desired movie or episode.
  3. Enable the Download enabled option for the chosen asset in the Assets tab:
  4. Enable the Offline content option for the Pricing plans > Bundles & Packages > VoD bundle that includes the selected movie/episode:
  5. Update the setup.json configuration file to set “isDownloadOfflineEnabled”: true for the target end-user devices using SmartTUBE Device Manager.
  6. Test the offline viewing feature in SmartTUBE Apps to ensure functionality.

.

Content Promotion


The SmartTUBE platform provides the operator with a variety of features that enable the promotion of content or marketing activities within the user interface of SmartTUBE apps. Here they are:

  • Banners
  • Recommendations
  • Showcases

Banners

Banners can be displayed on the Home screen above the Main menu and when content is paused in the player:

Regular Banner

Image3

Regular banner on the Home Screen

Image4

Regular non-clickable banner in the player when playback is paused
(available for SmartTUBE Apps v9.2 and higher)

Faded Banner

Image7

Faded banner on the Home Screen
(available for SmartTUBE apps v8.xx and higher)

Trailer-enabling Banner

The trailer-enabling banner is displayed at the top of the Home screen and starts playing the movie/series trailer a few moments after the user points to it.

Available for SmartTUBE apps v8.xx and higher.

Configuring Banners

Banners of all types are set up on the SmartTUBE Admin Console > Content > Banners page:

Image5

Banner upload areas

If you are using SmartTUBE apps 8.x and later, please upload Home screen banners considering the following guidelines:

Type of device

Upload area

“Image tag” parameter

Recommended banner size, pixels

Android smartphones

Tagged logos

androidPhone

1170×1664

Android tablets

Tagged logos

androidTablet

2048×930

iPhones

Tagged logos

v8

1170×1664

iPads

Tagged logos

v8

2048×930

Large-screen devices

(STB, Smart TV, web browsers)

Logo

HD: 1280×480

Full HD: 1920×780

If you have not see such tags in the Tagged logos area, please add them in the Dictionaries > Image Tags dictionary

In addition, you can explicitly define the Device types the tagged banners should be displayed on.

Configuring Features for Banners Displayed in the Player when Paused

Banners for the player are uploaded to the Logo area with no Image tag. In the SmartTUBE Apps, they are stretched to fill the screen on the smaller side. When deciding on the resolution, please refer to the recommended banner width provided in the table above.

Configuring Features for Trailer-enabling Banners

The SmartTUBE apps v8.xx and later features top banners to play trailers when in focus. These banners are also faded.

If your SmartTUBE app is not configured this way by default, you can add the parameters below to its configuration files setup.json and home.json using SmartTUBE Device Manager:

setup.json

“showBannersTrailer” = true

home.json

{
“lines”: [
{
“id”:
“banners”,
“component”: {
“params”: {
“showTrailers”:
true
}
}
}
]
}
Configuring Features for Faded Banners

If you want to leave top banners only faded without playing trailers, apply the settings below:

setup.json

“showBannersTrailer” = false

home.json

{
“lines”: [
{
“id”:
“banners”,
“component”: {
“params”: {
“showTrailers”:
false
}
}
}
]
}

Make sure to place important information within the safe zone indicated in the mockups below to keep it visible and prevent it from being obscured by UI elements. Text outside the safe zone may become unreadable.

Image10

Mockup for large-screen devices

Image2

Mockup for tablets

Image6

Mockup for phones

Recommendations

Add recommended movies and series in Content > Recommendations. Recommendation rails usually shown on the Home screen below the Main menu.

Showcases

Menu Content > Showcases allows to create additional thematic lists of content displayed below the Main menu as poster rails. Compared to the Recommendations, showcases have an extended set of settings:

Settings

Description

Name

Name of the showcase.

External ID

External ID of the showcase, used to identify the showcase during the import process.

Content providers

Content providers, movies and series of which are displayed in this showcase. Used to filter the content by provider.

Age rating

Level of age restrictions.

Sort order

Showcase sort order on the main screen.

Show only icon

Indicates whether the showcase icon is displayed with or without a Name.

Selected icon

Image of the showcase icon selected in the SmartTUBE app. The image size should match the size of the main menu icons.

Icon

Image of the showcase icon not selected in the SmartTUBE app. The image size should match the size of the main menu icons.

Movies

List of movies to be shown in the showcase.

Series

List of serials to be shown in the showcase.

  • The banners, recommendations and showcases which refer to content with the highest access level in Dictionaries > Access levels (the highest access level is which has the highest Sort order) are not shown in the SmartTUBE apps’ UI.E.g., if 18+ has the highest value of Sort order field, the banners and recommendations which refer to content 18+ will not be shown, even if specified in Admin Console. To show such banners and recommendations, you may create the age restriction 21+ and set for it the higher Sort order.
  • The output of banners, recommendations and showcases on the main screen are configured via the configuration files of the SmartTUBE apps and uploaded to end-user devices using SmartTUBE Device Manager.

Subscriber Management

Digital TV services require customers to subscribe to specific pricing plans, which offer a variety of service bundles tailored to different viewing preferences. These bundles can include combinations of TV channels, on-demand movies and series, DVR functionalities, and more, allowing operators to create flexible and customizable plans. This article provides a comprehensive guide on how to set up pricing plans, manage service bundles, apply discounts, and configure account settings to ensure seamless access to Digital TV services for subscribers.

Pricing Plans

In order for your customers to use Digital TV services, they must be subscribed to one of the pricing plans. Each pricing plan may include a unique set of service bundles — for example, a bundle with 50 TV channels + a bundle with the latest movies and TV series + a bundle with 10 hours of nPVR.

Creating a Pricing Plan

In the general case, to create a pricing plan you need to do the following:

  1. Add the content in SmartTUBE Admin Console > Channels > Channels and/or Content > Movies/Series.
  2. Create content related service bundles in Pricing plans > Bundles & Packages > [bundle type]. They may be of the following types:
    • TV — packages of TV channels available to subscribers;
    • DVR — enables TSTV & Pause Live services for selected channels and sets the duration of channel recording (channel rewind depth);
    • VoD — packages of movies and series available to subscribers. Allows to select delivery rule (SVoD, TVoD, etc.) for each movie, type of content provider (internal or external), VAST server for AVoD bundles, etc.
    • NPVR — determine the possibilities of personal recording of selected channels for subscribers. Allows to enable the recording of current and/or past programs, set the recording quota, notification about quota level, storage time of recorded content, period within which the recording of finished TV programs is allowed, etc.
    • PPV — set prices for paid (pay-per-view) TV programs. Such programs are typically marked with a special tag in the EPG imported from the EPG provider. You can set the price either for the whole program or for one minute of viewing.

Each type of bundle has its own parameters — specify them by following the hints.

  1. Create auxiliary service bundles of the following type in Pricing plans > [bundle type]:
    • Device/session limit service — allows to set limits of number of devices simultaneously authorized under single service account or devices bound to the service account. So, you can offer your subscribers these limits as service packages.
    • Additional services — allows to pass the additional user-filled information (e.g. email, promocodes, subscriber suggestions, etc.) from the SmartTUBE app to the operator’s OSS/BSS when subscribing to the package.
    • Discounts — overlaps the price lists of the specified packages with its own. About setting up discounts, see here.
    • Discounts (percentage) — allows to specify the percentage of discount applied to the specified packages. About setting up discounts, see here.

Each type of bundle has its own parameters — specify them by following the hints.

  • To allow the bundle purchase in the SmartTUBE iOS/Android apps you should configure it in app stores:
    1. Add in-app purchase information to your apps in the store.
    2. Put the product ID of the purchase you have created into the corresponding field (Apple ID / Android ID) for the bundle.

For more information about getting product IDs, please follow these links:

  1. Apple AppStore: General Info & How to configure in-app purchase
  2. Google Play Store
  1. Choose the 1-stage or 2-stage billing mode for the service:
    • 1-stage — for offline subscription/purchase of a bundle or when there is no need in online interaction with the external content providers. The logic of this mode is demonstrated by this scheme.
    • 2-stage — for online interaction with the external content providers (online cinemas, content aggregators, etc.). The logic of this mode is demonstrated by this scheme.
  1. Add the pricing plan including the created bundles in Pricing plans > Pricing plans. For each bundle add one or more price lists and set other rules.

For detailed information on how to add a pricing plan in the specific case, see Setting up TV Services and Setting up xVoD Services.

Discounts

The SmartTUBE offers two types of discounts that can be applied to service packages (TV, VoD, DVR, etc.):

  • Overriding discounts — rewrites the price lists of the service packages with its own;
  • Percentage discounts — allows to specify the percentage of discount applied to the service packages.

This guide will help you effectively apply discounts to SmartTUBE service packages.

Overriding Discounts

To apply overriding discounts to service packages, follow these steps:

  1. Create a Discount:
    • Access the SmartTUBE Admin Console and go to Pricing plans > Discounts.
    • Click the Add (+) button to create a new discount.
    • Fill in the discount properties following the tooltips around the fields.
    • Save changes by clicking the Save button.
  1. Add the Discount to Service Packages:
    • Go to Pricing Plans > Bundles & Packages and open the details of the package(s) you wish to discount.
    • Add the created discount to the Discount field.
    • Save changes by clicking the Save button.
  1. Add the Discount to Pricing Plans:
    • Navigate to Pricing plans > Pricing plans.
    • Open the relevant pricing plan(s) containing the service packages with applied discount.
    • In the Services section, click the Add (+) button.
    • In the panel on the right, choose the created discount in the Service field.
    • Specify the Start and End date of the discount.
    • In the Price lists section, click the Add (+) button to create a price list that should overlap the price lists of the service packages with applied discount.
    • Fill in other properties as per tooltips around the fields.
    • Save changes by clicking the Save button.
    • Optionally, create multiple price lists to provide different discounts for different time periods.

Percentage Discounts

The application of this type of discount differs from Overriding ones in two key respects:

  1. When creating a discount, set the discount amount as a percentage in the Discount (%) field.
  2. When adding the discount to the pricing plan, there is no need to specify the price list.

Only one discount can be given per package

Change Log

SmartTUBE SDP 8.3

  • New feature

Service Accounts

Creating Accounts

Service account is an object that contains all information about a subscriber and uniquely identifies it in the system. A subscriber can bind several devices — STBs, tablets, Smart TVs — to the account and use them in parallel within the limit of devices set by the operator.

To make Digital TV services available to subscribers, they must be subscribed to a tariff plan that includes the corresponding content bundles (TV, VoD) and services (PVR, DVR, PPV). You can set the bundles as active by default or allow the subscribers to activate them in the SmartTUBE app’s UI.

There are two ways to create service accounts — Manual and Automatic.

Manual Account Creation

To add or edit a service account manually, create it in Service accounts > Service accounts or click an existing one for editing. Enter account details, including:

  1. Set the account State, which defines if the subscriber has the access to the services provided by the pricing plan. The table below summarizes their implications on service access within the SmartTUBE App.

State

Description

ACTIVE

A subscriber logging in to an ACTIVE account: The SmartTUBE App authorizes on the SDP, proceeds to the Home screen, and provides access to services in accordance with the pricing plan set for their service account.

The ACTIVE status changes from any other state when the SmartTUBE App is running: A modal window “Account is active” with an OK button is displayed, granting the subscriber access to services according to their pricing plan.

BLOCKED

A subscriber logging in to a BLOCKED account: The SmartTUBE App starts, proceeds to the Home screen, and displays a modal window “Account is blocked” with an OK button. However, the subscriber cannot watch content.

The ACTIVE status changes to BLOCKED when the SmartTUBE App is running: The content stops playing, and a toast message “Account is blocked” is displayed, indicating that the subscriber can no longer access content.

CLOSED or  DELETED

A subscriber attempts to log in to a CLOSED or DELETED account: A toast message “Service account is deleted or closed” appears on the Login screen, with no progression to the Home screen.

The ACTIVE status changes to CLOSED or DELETED when the SmartTUBE App is running: An error screen “Account is closed/deleted” is displayed, which cannot be closed by the subscriber.

TRIAL CLOSED

A subscriber tries to log in to a TRIAL CLOSED account: A message “Your trial period has ended. Please register to continue the service.” is displayed under the Login button, or a toast message “Service account is deleted or closed” appears on the Login screen, preventing access to the Home screen.

The ACTIVE status changes to TRIAL CLOSED when the SmartTUBE App is running: The app exits to the Login screen, displaying the message “Your trial period has ended. Please register to continue the service.”

NOT ACTIVE

A subscriber logging in to a NOT ACTIVE account: An error screen “Account is not active” is displayed, which cannot be dismissed by the subscriber.

The ACTIVE status changes to NOT ACTIVE when the SmartTUBE App is running: An error screen “Account is not active” is displayed, which cannot be dismissed by the subscriber.

SUSPENDED

New accounts with a predefined connection become ACTIVE automatically when the app loads on the designated device without needing login credentials.

  1. Add a pricing plan in the pane to the right, so that the subscriber can access the services provided by the operator.
  2. Bind devices to the account under Connections. You need to create the login and password for every device; the subscriber enters them when starting the device for the first time, and thereby activates the device.

Devices (terminals) bound to the account manually in the Admin Console or via SmartTUBE OSS API cannot be deleted by a subscriber in the Client UI. Such devices are indicated by the field Service Accounts > Terminals > [any terminal] > Device type data source with the value Billing or API. In all other cases, the value Last authorization will be displayed.

Services Management

See the list of services that are available for the subscriber under his pricing plan in the pane to the right.

To enable or disable a service click on it. To change the End date of the service for the current subscriber click.

Automatic Account Creation

You can configure the automatic creation of a service account at the first start of a device based on the device type. To do this:

  1. Create a service account template for the device type in Service accounts > Service account templates.
  2. In the template, specify the device type and a pricing plan that will be applied to the automatically created service account. If there is no template with the same name as device type, the default one will be used. The service accounts will be created for the devices automatically at the first device start and the chosen pricing plan will be applied to all of them.

If the Demo mode flag is set, this template will be used only for service account creation in a demo mode. The device sends information that it was launched in the demo mode to the SmartTUBE server, and the server finds a template with the Demo mode flag set. If there is no such template, the server returns the error message.  

Device & User Limit Restrictions

The SmartTUBE allows you to restrict access to the platform for subscribers with two option described below.

Restriction by the Number of Devices Simultaneously Authorized Under Single Service Account

  1. To do this, open the Dictionaries > Sessions > Concurrent session limit dictionary.
  2. Create a new limit with the Add (+) button.
  3. Specify the Limit action which should be triggered when the subscriber tries to exceed the max number of devices receiving the service at the same time (the Quantity field):
    1. Disable content — playback of content is prohibited until the device is restarted;
    2. Exit from UI — device exits the SmartTUBE app;
    3. Unlink from group — device is unlinked from the service account.
  1. Apply created limit to the service accounts in the Service accounts > Service accounts > [desired service accounts] > Session limit field (or using the SmartTUBE OSS/BSS API methods createAccount, updateAccount, and createAccountByTemplate).
  2. You can also manage the sequence of deauthorization of devices by their type.For example, if the subscriber exceeds the limit on the number of sessions, you want STB to be disconnected from the service at the very last turn. To do this, setHigh in the Dictionaries > Device types > STB > Session limit priority field. This field sets the priority of deauthorization of devices of selected type linked to the account. I.e., when connecting new devices over the limit, devices with the High priority will be disconnected from the service last. Within each priority, the rule applies — the device that was authorized earlier is deauthorized first.And one more example. Suppose some service account have reached the device limit, and those devices have the

    High priority. If a new device with a  Low or Middle priority tries to authorize on that service account, it will be authorized, and the last authorized device with the High priority will be restricted.

Restriction by the Number of Devices Bound to the Service Account

  1. To do this, open the Dictionaries > Devices > Device limit restrictions dictionary.
  2. Create a new limit with the Add (+) button.
  3. Add limits for devices of a certain type in the Limits section. This section sets the maximum quantity of devices of each type which could be linked to service accounts (devices without UID are not considered).
  • Do not use group device types to set restrictions. If there is no limit for a finite device type, this type is considered unlimited.
  • If there are more than one restriction for one type, the restriction with the less quantity applies.
  1. Apply created limit to the service accounts in the Service accounts > Service accounts > [desired service accounts] > Devices’ limits field (or using the  SmartTUBE OSS/BSS API methods createAccount, updateAccount, and createAccountByTemplate).

Device & Session Limits as a Service

In addition to binding to service accounts, you can provide limits to subscribers as a service. All you have to do is include them in a pricing plan. In this way, for example, subscribers with different pricing plans can have different limits.

This feature is managed in the same way as any other bundle (TV channels, VoD, DVR, etc.) — in the Pricing plans > Device/session limit service:

Image2

After filling out parameters standard for any other bundle, specify Device limit and Session limit in the right-side panel:

Image5
  • If the customer unsubscribes from the Limits package, the original limits set for his account are returned.
  • If you creates a new service account via OSS/BSS API method createAccount, please take into  account the following logic.

When a limit package is subscribed, SmartTUBE SDP simply copies the limits from the package to the subscriber’s account. If a subscriber’s account has already had limits set on it, SDP remembers them. This way, when the package is unsubscribed, previous limits are returned to the subscriber.

Thus, if when creating an account you want to simultaneously assign default limits to the subscriber and add a tariff plan that includes limit packages, you should

  • add limits using the deviceLimit and sessionLimit params in the createAccount method and
  • make sure the limit packages do not have the Default state = Not active in the subscribed tariff plan.

Profiles & Age Restrictions

If several users use the same device, they can customize the SmartTUBE app individually for themselves. Creating profiles, users can save PIN, parental restrictions, permissions to purchase content, channel sorting, viewing history, etc. For a complete list of parameters, see here.

Image1

User profiles in the SmartTUBE STB app

As an operator, you can create and manage profiles for the service account on the SmartTUBE Admin Console > Service Accounts > Service Accounts > [service account details] > Profiles tab. Moreover, you can create predefined profiles that will be automatically created along with the service account using templates (Service accounts > Profile templates). Profiles are displayed on all devices that are bound to the service account. In other words, profiles are associated with the account, not the device. You can also change password for any profile.

Image3


User profiles in the SmartTUBE Admin Console (on the service account details page)

Parental Control, Age Restrictions & Content Access Levels

Now let’s figure out how the user can restrict children’s access to adult content, for example. To do this, the user under Master profile need to create a separate profile with the following settings in the SmartTUBE app > Home screen > Settings > Profiles:

Image4
  • Require PIN code — check Yes to allow a new user to log in to profile only with entering a PIN. If No, then any user will be able to log in to this profile without a PIN. Please note the following:
    • A service account always has at least one profile — a Master profile.
    • Master profile can edit the settings of any other profile (including its PIN), but cannot log in to another profile, if the user of Master profile does not know the PIN of desired profile.
    • Master profile cannot be deleted.
    • If the Master profile has a PIN, the settings of other profiles can be changed only with the PIN of the Master profile — not the PIN of these profiles. As well as their removal.
    • If the Master profile has no PIN, users of any profile can change the settings of any profile (including the Maser profile settings).
    • Each time you log in to the app or turn on the STB, you log in to the last used profile. If this profile has the Require PIN codeYes setting, then the profile selection screen opens after launching.
  • Define PIN-code — set a PIN that will be used to restrict access to this profile, purchases, subscriptions and adult content.
  • Allow to subscribe & Allow to purchase —  these options are pretty clear.
  • Select access level — set the maximum age rating of content this profile can watch without a PIN. Content with a higher age rating is treated as adult. Please note the following:
    • The PIN code will need to be entered each time the adult content is switched on again after returning to the Home screen or standby mode.
    • In the scenario “The user turned on the adult channel > Entered PIN > Watched the adult channel > Switched to the non-adult channel > Switched back to the adult channel” PIN re-entry is required.
    • In the scenario “The user turned on the adult channel > Entered PIN > Switched to another adult channel with the same age rating or lower” PIN re-entry is not required.
    • If the profile has the setting Require PIN codeYes, then the user need to enter the PIN of this profile to access the adult content.
    • If the profile has the setting Require PIN codeNo, then the user may enter the PIN of Master profile to access the adult content.
  • Save current access level — set Yes to automatically increase the Access level of this profile to the age rating of the played adult content after entering a PIN.
    For example, if you have defined the Access level of 6+ and then started playing 12+ content and entered the correct PIN, the Access level will automatically increase to 12+. So the content with the age rating of up to 12+ inclusive will no longer require entering a PIN even after device or app restart.
  • Select max access level — set the maximum age rating of content should be displayed in the TV channel list and VoD catalog. The content with a higher level will be hidden everywhere from the app’s UI. Please note the following:
    • The content with the maximum access level (age rating) specified in the SmartTUBE Admin Console > Dictionaries > Access levels dictionary is not displayed in the rails throughout the app’s UI.
    • The content with the maximum access level will not be displayed in the SmartTUBE iOS app in accordance with Apple’s policy of not displaying erotic content in any form.

Notes on Filtering Sensitive Content

  • Content with the maximum access level is classified as erotic by SmartTUBE for iOS and is not displayed, in compliance with Apple’s policy prohibiting the presentation of erotic content in any form.
  • To explicitly label erotic content, operators can create in the SmartTUBE Admin Console > Dictionaries > Content grouping > Content genres a dedicated genre with the Erotic content option enabled. This allows such content to be filtered by genre in SmartTUBE Apps.
  • To prevent sensitive content from appearing in search results or to secure it behind a PIN in SmartTUBE Apps, operators can create a dedicated Access Level in the SmartTUBE Admin Console under Dictionaries > Access Levels, enabling the Hide from search option or Require PIN option (available starting from SmartTUBE SDP & Apps 9.4) as needed. This access level can then be applied to the relevant sensitive content.

Change Log

SmartTUBE SDP & Apps 9.4

  • The Require PIN option is added to the SmartTUBE Admin Console under Dictionaries > Access Levels.

Messaging

Information and Watermark Messages

Depending on your business task, you can send to end-user devices the messages of several types:

  • Information messages — displayed in the app’s UI as a modal window with the ability to add some identifying information into the message text. This type of messages is well suited for notifying subscribers about promotions, new platform features, technical works, and so on.

Image1


Information message with MAC of the end-user device in text

  • Watermark messages — overlay identifying subscriber data on top of the TV channel stream with the ability to set the text transparency, position on the screen, display duration, and TV channel. This type of messages allows you to prevent or complicate unauthorized copying of content on end-user devices.

Watermark messages do not change the video stream as such — they only overlay text on top of the video in the end-user player.

Image3


Watermark message displaying MAC of the end-user device

To send a message:

  1. Create it in Messages > Messages or Messages > Watermark messages, guided by the field tooltips.

Important notes:

  • You can use the following user-identifying variables in the Message text field:

Example of a message text:

Dear {!USERID!},

Your account {!SAN!} with device {!DEVICEID!} has been selected to participate in our annual ban giveaway!

  • {!USERID!} — user ID;
  • {!DEVICEID!} — unique device ID;
  • {!SAN!} — service account number.
  • The field Message service type allows you select the message delivery technology for Information Messages:
    • Long Polling — Smartlabs notification — messages are displayed on the end-user device as a modal window in the SmartTUBE App only after it is launched;
    • Push notifications Android push notification and Apple push notification — messages are additionally displayed in the notification shade regardless of whether the SmartTUBE App is running or not.
  • The position of the Watermark Message on the screen is set by XY coordinates (Top and Left fields) from the upper-left corner of the screen as a percentage of its size.
  1. Specify receivers of the message. There are two ways:
    • specify a list of MAC-addresses the message will be sent to. For this purpose click Send to MAC-addresses from the list and specify the list in the appropriate field or upload it in a file.

List format: 1 MAC-address in 1 row, duplicates are accounted as different addresses (message is delivered again). MAC-addresses are not validated, if there is a mistake in an address, the message will not be delivered and the system will not inform about the mistake.

  • specify a receivers’ filter either in the message card or in Messages > Receivers’ filters:

Image4

Filter conditions is a groups of statements joined by AND. Each group consists of statements joined by OR. It means that a service account matches the filter conditions, if at least one statement in each group is true.

You can filter the message receivers by the following parameters:

  • Service account number
  • Login
  • Service account state
  • Device location
  • Pricing plan
  • STB MAC address
  • Application version
  • IP address
  • Service available within the pricing plan
  • Connection creation date (after / before): The date when the user device was bound to the service account.
  • Not in pricing plan: The pricing plan to which the service account is not subscribed.
  • Device type
  • Last authentication date (after / before)
  • Service is active for the service account
  • Service is not active for the service account
  • Service account name
  1. Click
    Image2

     to send the message.

If you want the message to be delivered to all subscribers, create a filter without conditions, save it and specify it in the Receivers’ filter field of the message. The delivery of such a message could take a long time depending on the subscribers number.

Message Delivery Statistics

When all the messages are sent, you can view the delivery statistics in the Message statistics tab or export it in CSV with the  button. Please note that the Status column of the CSV file has the following designation:  

  • 0 — presumably not delivered
  • 1 — delivered, but not read
  • 2 — read
  • 3 — deleted

Event-driven Notifications

You can create notifications which will be sent to chosen subscribers at specified events occurrence. The subscribers will see the messages in the SmartTUBE app.

To create an event-driven notification:

  1. Add the message which you want to send in Messages > Messages, as described above.
  2. Create a notification in Messages > Notifications, specify the type of event which will initiate the notification and event conditions.

E.g., if you want to send a message “The pricing plan was changed to ‘You kiddin’ me!'” at pricing plan changing:

  1. Add the message with text “The pricing plan was changed to ‘You kiddin’ me!’.
  2. Add the notification with the following parameters:
    1. Event type: Change product offer.
    2. Event variant: You-kiddin-me.
    3. Message: “The pricing plan was changed to ‘You kiddin’ me!'”.

Ad Services

Introduction

SmartTUBE ADS — a VAST server with a web console for managing advertising campaigns in IPTV and OTT networks. SmartTUBE ADS carries information about ad campaigns, their ad creatives, duration, dates, types, target locations, target content and other parameters. Using this information, the SmartTUBE ADS makes a decision about which ad is the right one for insertion in a specific insertion opportunity (Linear TS or OTT).

Image3


Logical input and output of SmartTUBE ADS

The ad insertion system (Linear TS or OTT) requests an ad decision from the SmartTUBE ADS via VAST protocol. The SmartTUBE ADS checks in its internal database to find a match set of ads based on the request targeting criteria, and responds with a VAST response carrying the correct information about the ad (or ads) to be inserted. In this VAST response, beacons information for the specified ads is also provided so that the ad insertion system can confirm insertion back to the SmartTUBE ADS. The SmartTUBE ADS can also report campaign performance.

There are 2 use cases for using the SmartTUBE ADS:

  • OTT ad insertion for OTT HLS or DASH streams going to OTT subscribers.
  • Linear TS streams that could be distributed on IPTV networks, or pushed to Satellite or DVB-C head ends.

System Workflow

The below diagrams explain how the SmartTUBE ADS works for Linear TS insertions and for OTT. Further details on the workflow are described for each use case.

OTT Ad Insertion

Image7


OTT ad insertion architecture

In case of OTT ad insertion (aka client-side ad insertion), the workflow steps are as follows:

  1. The client player (SmartTUBE Player or 3rd party one) starts to play a specific stream (Live or VOD) that has ad insertion opportunities marked in the origin manifests coming from the SmartMEDIA Content Processor.
  2. The client player sends a request URL to the SmartMEDIA Playlist Manipulator to watch this stream. This stream request URL carries all the targeting parameters needed for the SmartMEDIA Playlist Manipulator to use. For example, the request URL could look like this:

Image1

  1. The SmartMEDIA Playlist Manipulator checks the origin manifest from the SmartMEDIA Transcoder for this channel or movie. If the origin manifest carries ad opportunities mark up, then the SmartMEDIA Playlist Manipulator initiates the ad insertion workflow. If not, then nothing is done on the SmartMEDIA Playlist Manipulator and it just passes the same manifest from the origin to the client player with no ad insertion.
  2. In case there are ad availabilities inside the origin manifests, then the SmartMEDIA Playlist Manipulator strips out the targeting parameters from the client request URL and use these parameters to form a VAST request to the SmartTUBE ADS. The VAST request to the SmartTUBE ADS is sent immediately. The VAST request URL could look like this:

Image2

  1. The SmartTUBE ADS receives this VAST request and immediately checks in the database it has for campaigns matching this targeting criteria. Once a suitable campaign and creatives are found, the SmartTUBE ADS responds with a VAST response carrying information about the ad creatives to be inserted.
  2. The SmartMEDIA Playlist Manipulator checks the creatives provided in the VAST response. If they are in the correct format and bitrates matching the stream it wants to insert it on, then it immediately starts replacing the main video chunks with ad chunks from the ad creative/s, and a ‘personalized’ manifest is prepared for the client and then sent to it for playback.
  3. If the creatives described in the VAST response are in different bitrates and profiles, then the SmartMEDIA Playlist Manipulator skips inserting creatives.
  4. The VAST response provided to the SmartMEDIA Playlist Manipulator has beacons URL’s for confirming playback. The beacons URL’s are then passed to the client in the manifest, and the player fires back the beacons to the SmartTUBE ADS while it plays the ads.

From the above steps, it follows that the SmartTUBE ADS has:

  1. Received a VAST request with targeting parameters.
  2. Checked in it’s campaigns database for matching ads that fulfill this targeting criteria.
  3. In case it found a match, it responds with a VAST response to the SmartMEDIA Playlist Manipulator carrying the right information about the matching ads.
  4. In case no match is found in the DB, then it responds with an empty VAST response declaring that no ads matched this targeting criteria.
  5. The SmartTUBE ADS receives beacons confirming insertion of the ad.

Image6


SmartTUBE ADS workflow for the OTT ad insertion use case

Linear TS Ad Insertion

Image4


Linear TS ad insertion architecture

In the linear TS case (aka server-side ad insertion), the SmartTUBE ADS workflow is as follows:

  1. The SmartMEDIA TS Splicer receives a TS stream over multicast with SCTE-35 markers.
  2. The SmartMEDIA TS Splicer continuously checks the payload of the SCTE-35 signals for ad insertion opportunities.
  3. Once it detects an ad insertion opportunity in the SCTE-35 payload, the SmartMEDIA TS Splicer requests the SmartTUBE ADS for an ad decision.
  4. A VAST request is sent to the SmartTUBE ADS with the right targeting parameters.
  5. The SmartTUBE ADS receives this VAST request and immediately checks in the campaign database it has for campaigns matching this targeting criteria. Once a suitable campaign and creatives are found, the SmartTUBE ADS checks if those matched creatives are available in the right format, codec and resolutions to be inserted on this particular TS stream. Reference to the correct set of creatives with the correct format, codec and resolution is then given in the VAST response back to the SmartMEDIA TS Splicer.
  6. The SmartTUBE ADS responds with a VAST response to the SmartMEDIA TS Splicer. In this response, beacon URL’s are also provided for each creative to make the splicer able to confirm inserting them.
  7. In case the SmartTUBE ADS cannot find matching campaigns and creatives, it responds with an empty VAST to the SmartMEDIA TS Slicer, and therefore, no insertion happens.

Image8


SmartTUBE ADS workflow for the Linear TS ad insertion use case

Ad Transcode Workflow

Transcoding of ad creatives is performed at the stage of creating and configuring the ad campaign via the SmartTUBE ADS Admin Console — during the process of uploading creatives to the server. The source ad files are sent for processing to SmartMEDIA Transcoder, which converts them according to the preconfigured transcoding profiles.

Configuring Ad Campaigns

To configure and launch your ad campaigns, you need to obtain SmartTUBE ADS Control Panel access credentials from SmartLabs Technical Support and follow a few steps below.

Interface Overview

After logging in to the panel, the Home page opens where you can see the main menu with ad campaigns configured.

Image5


Home page

The main menu consists of the following dictionaries:

  • Creatives — list of ad creatives available for ad campaigns
  • Campaigns — list of configured TV campaigns
  • AVoD campaigns — list of configured AVoD campaigns
  • Regions — list of regions used for ad targeting
  • Channels — list of channels used for ad targeting

Below are several reports showing various statistics on ad campaigns.

1. Fill in the ‘Creatives’ Dictionary

Here you can upload ad master files using the Add (+) button and specify the following parameters for each of them:

  • Name — Name of a creative
  • External ID — ID of a creative for external systems
  • Duration — Creative duration in format HH:MM:SS.mmm
  • Priority — priority of the creative to playback
  • Description — text description of a creative
  • URL — link activated by clicking on the creative in the player
  • Media Type — MIME type for the creative’s file container. For example, video/mp4 for MP4.
  • Delivery — either progressive for progressive download protocols (such as HTTP) or streaming for streaming protocols.
  • Width — the native width of the video file, in pixels
  • Height — the native height of the video file, in pixels
  • Is Addition — the sign of a dummy video clip (used to fill in the gap between the last ad in the sequence and the end of the ad window)

2. Fill in the ‘Regions’ Dictionary

This dictionary implies the presence of at least one ad display region with the following parameters:

  • Name — Name of a region
  • External ID — ID of a region for external systems
  • Comment — Comment about the region

3. Fill in the ‘Channels’ Dictionary

To target ad campaigns by TV channels, specify them in this dictionary with the following parameters:

  • Name — Name of a channel. If you use SmartTUBE as your Service Delivery Platform, select channels from the drop-down list.
  • External ID — ID of a channel for external systems
  • Description — Description for the channel

4. Configure TV Ad Campaigns

Now you are able to configure TV ad campaigns in the Campaigns dictionary.

Click the Add (+) button to add a campaign and fill in the following fields:

  • Name —  Name of the campaign
  • External ID — ID of the campaign for external systems
  • Status — status of the campaign: Active, Inactive, Paused, Finished
  • Priority — priority of the campaign among campaigns with the same targeting parameters
  • Type — type of the campaign:
    • Linear — for the server-side ad insertion into multicast TS streams;
    • OTT — for the client-side ad insertion into HLS, DASH, MSS streams.
  • Start / Stop time — start and stop time of the campaign
  • Loading — the intensity of the campaign:
    • Front — the campaign creatives will be played with the highest intensity at the beginning of the campaign and with a lower intensity towards the end;
    • Back — the opposite of the Front;
    • Evenly — the campaign creatives will be played in random order.
  • Description — description of the campaign

Campaign params

  • Target
  • Locations — regions where the campaign to be held
  • OTT count — limit of views of this campaign’s creatives within the OTT ad insertion
  • Creatives — list of creatives intended for the campaign
  • TS insertion count — limit of views of this campaign’s creatives within the Linear TS ad insertion
  • Channels — channels on which the campaign to be conducted

5. Configure AVoD Campaigns

Currently, the AVoD functionality is supported by the SmartTUBE apps for large-screen devices (STB, Smart TV, PC/Mac) only.

You can also  configure AVoD campaigns in the AVoD Campaigns dictionary.

Click the Add (+) button to add a campaign and fill in the following fields:

  • Name —  Name of the campaign
  • External ID — ID of the campaign for external systems
  • Status — status of the campaign: Active, Inactive, Paused, Finished
  • Priority — priority of the campaign among campaigns with the same targeting parameters
  • Start / Stop time — start and stop time of the campaign
  • Loading — the intensity of the campaign:
    • Front — the campaign creatives will be played with the highest intensity at the beginning of the campaign and with a lower intensity towards the end;
    • Back — the opposite of the Front;
    • Evenly — the campaign creatives will be played in random order.
  • Description — description of the campaign

Campaign params

  • Pre-roll / mid-roll max count — max number of creatives in the pre-roll / mid-roll sequence
  • Pre-roll / mid-roll max duration — max duration of the pre-roll / mid-roll sequence, in seconds.
  • Pre-roll / mid-roll can skip — mandatory viewing time of the pre-roll / mid-roll sequence, after which the subscriber can skip it.
  • Mid-roll period, sec — period between mid-roll sequences
  • Type — the moment when the ad blocks are played relative to the movie/episode:
    • Pre-roll — before the movie/episode
    • Mid-roll — during the movie/episode playback
    • Post-roll — after the movie/episode
  • Creatives — list of creatives intended for the campaign
  • Locations — regions where the campaign to be held

After you have configured the AVOD campaign, don’t forget to specify URL of the SmartTUBE ADS server in the AVOD bundles settings in the SmartTUBE Admin Console > Pricing plans > VoD bundles >[desired VoD bundle] >VAST server URL field.

Reporting

Generating Reports

The SmartTUBE Admin Console allows you to create reports, filter data for them and export to CSV or XLS file.

Image1


Reports menu in the SmartTUBE Admin Console

In reports containing data on channel / movie views, one view is playback of the channel / movie by the subscriber device for at least 60 seconds.

Reports Description

  • Created/deleted accounts report — the number of accounts added / deleted during the specified period. Deleted accounts — accounts that have passed to the “Closed” state.
  • Service accounts not authorized till now — a list of service accounts without any activity (authorizations) for the specified period until today (set by field Days till now).
  • Service accounts without new connections — a list of of service accounts without any activity (terminal connections) for the specified period until today (set by field Days till now).
  • Service account w/o terminals — a list of accounts that either do not have any terminals, or all terminals have no UID.
  • Number of pricing plan changes — the number of pricing plan shifts for the period with details by plan names.
  • Percentage of accounts by state — the number and percentage of accounts by state on the specified day.
  • Percentage of users by pricing plan — the number and percentage of accounts by pricing plan for the period.
  • Statistics by device types — the number of terminals of different types.
  • Statistics by app versions — the number of terminals of different SmartTUBE app versions.
  • Terminals — detailed info on the terminals authorized during the specified period.
  • Device online info — info on terminals currently viewing content.
  • Service consumption — the number of accounts by consumed services (bundles).
  • Service consumption in detail — info on the consumption of services, detailed by accounts.
  • SVOD metacontent view count — info on the SVoD content consumption, detailed by the movie/series name.
  • Detailed report by SVOD — detailed info on the SVoD content consumption.
  • Channel viewing statistics — the number and duration of the selected channel’s views in Live / TSTV mode over the time interval.
  • Device combinations on service accounts — all the unique combinations of devices connected to the accounts.
  • Subscribed services — the number of service subscription facts in the specified time frame throughout the whole subscriber base.
  • Subscribed services detailed info — the number of service subscription facts in the specified time frame with account detail.
  • Purchased TVOD movies — the number of movie purchase facts in the specified time frame throughout the whole subscriber base.
  • Purchased TVOD movies detailed info — the number of movie purchase facts in the specified time frame with account detail.
  • TOP 10 most viewed TV programs — the number of TV program in-archive views for the specified time frame.

System Management

Licensing

The number of service accounts and the term of using SmartTUBE are controlled by the license. You can find the list of your licenses on the Administration > Licenses page.

Important!

  • Licenses are added to the system and signed by the SmartLabs Support Team only.
  • When changing the license parameters, its resigning is required.
  • Unsigned licenses (as well as accidentally deleted ones) are not taken into account by the system. Such licenses do not allow you to register new accounts or devices.

Image12


List of licenses

Here you can see the type of licenses, their usage statistics, and warnings like License is expired or License is not signed. To see details on a specific license, click on its title.

Image25

License details

Adding Licenses

To purchase primary and subsequent SmartTUBE licenses, please send a request to the sales@smartlabs.tv, taking into account the information below.

  • You can purchase one or more simultaneously active licenses of the following types:
    • License by accounts
      This method considers only active service accounts — accounts with a status other then Suspended, Trial closed, Closed, Deleted, regardless of whether the subscriber uses the services or not.
    • License by devices
      This method considers only active devices   devices with a non-empty UID and linked to the active account, which were authorized at least once and (optional) with the date of the last authorization is no more than N days ago (set by the countActiveDevice.filter.byLastAuthDateInterval.period.days parameter of the system.conf file). You can specify which device types will be considered by this license.

      Image17
    • License by service account with devices
      This method considers only active service accounts to which only the specified types of devices can be connected. Also you should specify the number of active devices licensed under one license.

      Image24


      For example, if you set 3 devices here, and 6 active devices are connected to the same account, then this account will consume 2 licenses.

  • All license types are independent of each other.
  • If you reach the maximum number of service accounts or devices allowed by the license, new accounts or devices cannot be registered in the system.
  • Licenses have an expiration date.​ If it expires and you do not prolong the license, your subscribers will not be able to use the services.
  • Before any of your licenses expire, you will receive a notification when you log in to SmartTUBE Admin Console.

    Image3

Please contact a SmartLabs representative by email sales@smartlabs.tv before your license expires to continue using SmartTUBE.

Multitenancy

Multitenancy is a software architecture in which a single instance of software runs on a server and serves multiple tenants. Systems designed in such a manner are “shared”. A tenant is a group of users who share a common access with specific privileges to the software instance.

For example, one global IPTV/OTT operator may have several regional divisions. The audience of these divisions may differ geographically, culturally, socially, etc. So may the content. For this case, SmartTUBE Service Delivery Platform (SDP) provides 2 options for multitenant architecture implementation:

  1. Independent SDP instances used for each tenant. We recommend this option for tenants with a number of subscribers more than 10000–15000.
  2. One SmartTUBE instance serves several tenants. This configuration is recommended if the tenants serve an audience of 2000–5000 subscribers.
Image11

Architecture options with multiple tenants

As for TV stream recording and content storage subsystem, in both cases it is recommended to place them close to the content sources. This ensures efficient localization of content and its seamless delivery to subscribers with minimal latency.

Multitenancy Features

  1. SmartTUBE SDP contains a list of tenants. Some special parameters can be configured for each tenant, such as:
    1. Tenant name and description
    2. OSS/BSS integration URL
    3. Standard Tenant UI Customization parameters (detailed in point 7.)
  1. Service accounts and terminals (client devices) have to be linked to only one specific tenant.
  2. Pricing rules for services (TV channel bundles (Live, Time Shift, Catch-up, etc.), SVOD/TVOD bundles) could be managed for each tenant separately, but some tenants could use the same services and pricing plans.
  3. Users of SmartTUBE Admin Console could be configured to have access and management rights for one or several tenants, so employees of one tenant will not have rights for viewing and managing content, services, accounts, etc. from other tenants. Users with administration rights could manage all tenants.
  4. All content (TV channels, VOD movies and serials) is common for all tenants. SDP allows to combine content into different services for each tenant, providing a flexible management tool to enable content from a common headend and VOD library to be presented to multiple tenants.
    EPG is imported common for all channels and is available for all tenants.
  5. All reports provide information for each tenant independently.
  6. Operators can customize the following elements of SmartTUBE Apps UI dependent on tenant:

– Tenant logo on the splash screen when starting the app

– Tenant logo on the status bar

– Selector color

– Limited styling features on the Home screen

Details are provided in the configuration documentation.

Please note that the app remains the same for all tenants. The operator cannot change the app icon and name individually for each tenant!

  1. Messaging system allows sending messages and notifications only to devices of a specific tenant.
  2. Licensing calculation could be separate for each tenant, but administrators have access to full licensing information for the whole system.
  3. Dictionaries (content genres, access levels, supported DRM types, languages, settings, and etc.) are common for all tenants and could be managed by system administrators only.

Configuring Multitenancy. Quick Guide.

If you choose the Option 2, you need to configure tenants the following way:

  1. Log in to the SmartTUBE Admin Console under an account with the Platform administrator role.
  2. Create billing connections in the Administration > Billings dictionary.
    Specify the
    Name, External ID, and URL of the OSS/BSS endpoint for each billing. For more details on OSS/BSS endpoint URLs, please see Method Invocation > On the side of OSS/BSS.

In case of “one-tenant” configuration, the URL of the OSS/BSS endpoint is defined by the oss.standard.url.value parameter in the SmartTUBE Server configuration file system.conf. In case of multitenant configuration this parameter is ignored.

  1. Create tenants in the Administration > Tenants dictionary, specifying corresponding billing connection in the Billing field.
  2. Create SmartTUBE Admin Console users in the Administration > Users dictionary, specifying their affiliation to the tenants in the Tenants field.
    Read more about users and roles
    here.
  3. Create content bundles as it described in the Setting up TV Services and Setting up xVoD Services sections.
  4. Create pricing plans in the Pricing plans > Pricing plans dictionary, specifying their affiliation to a particular tenant in the Tenant field.
    Read more about creating pricing plans
    here.
  5. Create service account templates in the Service accounts > Service account templates dictionary, specifying the pricing plan corresponding to a particular tenant.
    Read more about creating service accounts
    here.

Scheduled Jobs

If you need certain tasks to run automatically at set times, you can create a scheduled job it in the Administration > Scheduled Jobs section:

Image7

The type of a job is selected in the the Method field of a certain job:

Image2

To schedule a job, please specify it’s parameters in the Method parameters tab. Refer to the tooltips for guidance on each field. Once you have filled in the details, check the Active box to enable the job. Finally, click on Apply to save the changes. The job will then be added to the schedule and will run at the specified time.

You can modify any job, whether it’s active or not.

Job Execution Statuses

To the right of the job settings panel, information about its last execution is displayed: start and end time, IP of the executing SDP node, code and text of the execution error, current status. The job can have one of 3 statuses:

  • Completed — the job is completed;
  • Running — the job is currently running;
  • Cancelled — the status is reset. It is assumed that the job was interrupted for some reason. This can happen, for example, if the SmartTUBE SDP restarts while a job is running.

After the job is launched, its status changes to Running. Parallel launch on other SDP nodes before the job completes is excluded.

If the task was Completed successfully, the Error code and Error text fields remain empty. Otherwise, they contain relevant information.

Auto Removing of Junk Service Accounts

Over time, SmartTUBE can accumulate junk service accounts, that can affect the number of accounts available under the license. They may appear for various reasons and usually have a number of similar features (for example, inactive or without connected services). Thus you can filter them and delete.

  1. Create an Account Filter
    1. Go to SmartTUBE Admin Console > Administration > Filters for deleting service accounts
    2. Click the Add (+) button  and create the filter. Follow the field tooltips.
    3. Click the Save button to save the filter.
    4. Click the Reload button appeared to check the filtered accounts.
Image5
  1. Create a Job for Periodically Account Removing
    1. Go to Administration > Scheduled jobs 
    2. Click the Add (+) button to create the job. Follow the field tooltips and these notes:
    3. Select the Delete inactive Service Accounts garbagecollector#deleteinactiveserviceaccounts method in the Method field.
    4. Select the filter you’ve created in the Filter for deleting service accounts field.
    5. Set the Store deleted items in Archive checkbox and the number of days to store. Thus you will prevent accidental permanent deletion of accounts.

If you have archived the wrong accounts, then contact the SmartLabs Support Team to restore them.

  1. Click the Save button to save the job.
Image19

Importing Currency Rates

As an additional service, you can provide your subscribers with currency exchange rates directly in the SmartTUBE apps. The main source of data is the European Central Bank (ECB), but you can use any other service providing currency rates in the same format if the necessary currencies are not in the provided list.

To import currency rates regularly, please create a job with the following required parameters:

  • Method  Exchange rates data import (currencyratesimport#doimport)
  • URL   URL of an XML file with dynamically updated currency rates, e.g. https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml for importing rates from ECB.

For the format reference, please see Currency Rates File Format.

Importing Weather Forecast

SmartTUBE apps allow you to provide your subscribers with a weather forecast. The Openweather service is used as the data source. If you do not know whether the corresponding module is installed on your system, please contact the SmartLabs Technical Support . Then create a job for regularly updating weather data:

  1. Register on the website Openweathermap.org and get your unique API key {appid=} by following the instructions on the “Guide” page.
  2. Create a new job using the weatherforecastsimport#doimport method in the Method field.
  3. In the Method parameters > appid field, specify your Openweather API key.
  4. In the Dictionaries > Cities > [desired city] > External ID field, specify the corresponding city ID on the Openweather website. You can find it on the https://openweathermap.org/city page after searching by the desired city. The last parameter in the URL is the city ID. Example for Moscow:
Image1

You can also specify the city geo coordinates in the Coordinates field. Example:

 

Image15

Please note that this field has a lower priority than the External ID.

Geoblocking

SmartTUBE SDP provides IP geofiltering of end-user devices in distributed IPTV/OTT solutions so that users access only that content, which is intended for distributing to them in their territory regions, and have no access to content intended for other territorial regions. IP geo filtering protects content from accessing by users from unauthorized regions.

How does it work?

In case of IPTV service, the service provider defines an IP subnetwork for each territorial region. In turn, each end-user device gets an IP address belonging to a particular subnetwork by the device’s physical location. This allows SDP to determine the device’s location by its IP with the appropriate API request to the service provider.

In case of OTT service, the geolocation of the device is performed using third-party services such as Maxmind (API is provided with a contract).

SDP allows you to apply geoblocking to TV channel broadcasting services grouped into service packages (Picture 1). Each service package includes information about the regions where enabled TV channels can be distributed to users.

Image23

Picture 1. Region-Level Content Specification

After the device startup, it sends the authorization request to the SmartTUBE server (picture 2). SmartTUBE server determines the device’s location by its IP and returns the list of service packages available to this region.

Image10

Picture 2. Separating Service Packages Between Regions

Processing Logic

A detailed description of the operation logic and geofiltration settings is provided below.

  1. The end-user device starts up and sends an authorization request to the SDP, which includes the IP address.
  2. SDP sends this IP either to a third-party geolocation service (in the case of OTT), or to the service operator (in the case of IPTV) in accordance with the API provided.
  3. SDP receives the device’s location ID, which must match one of the location IDs in the “Regions” dictionary.
  4. Then the following logic is applied:
    1. If the terminal has already been assigned a Region ID (via Admin Console or OSS API), then data from the geolocation system is ignored.
    2. If the terminal has not yet been assigned the Region ID (via Admin Console or OSS API), the Region ID came from the geolocation system is used.
    3. If the terminal is not assigned the Region ID via Admin Console or OSS API, and the geolocation system defines its location as “OUTNETWORK”, then the default Region ID is used (determined by the corresponding mark for the region in the SDP “Regions” dictionary).
  1. The device is provided with a list of services corresponding to the assigned region.

Note: Region ID assigned via OSS API or manually via Admin Console has a higher priority than the Region ID saved during the last authorization. In other words, if there was at least one authorization, the terminal in the Admin Console will be assigned the last defined Region ID. But if the Region ID has been assigned via OSS API or manually via Admin Console, the Admin Console will display the assigned Region ID, and the Region ID obtained from the geolocation system will be ignored.

Configuring the Types of Content Delivery Subnets

SmartTUBE allows you to broadcast different URLs of TV streams to devices, depending on the type of content delivery subnet. To do this, you should configure a list of such subnets and their types.

  1. Configure the default network type in the file /opt/smartlabs/nginx/conf/http.d/50_smtube_authgeo.conf. For example, “OTT”:

geo $remote_addr $networkType {
include http.d/geonetloc.inc;
default OTT;
}

  1. Specify subnets and their types in the file /opt/smartlabs/nginx/conf/http.d/geonetloc.inc. For example:

10.0.0.0/8              Multicast;
0.0.0.0.0           OTT;

  1. Reload or restart nginx.

How to redefine the streaming sources depending on the distribution subnet, see the section Redefining the Channel Streams Depending on Content Delivery Network.

Users and Roles

Only authorized users can view and make changes to SmartTUBE Admin Console entities. Users are created and edited on the Administration > Users page. There are 6 possible user roles with the following possibilities:

Role

Manageable entities

TV channels editor

TV channels

VoD editor

Meta content

Commercial editor

Pricing plans

Analyst

Reports

Message editor

Messages

Manager of Device manager

Device Manager (is separate UI)

Technical support specialist

All of the above

Administrator

Users and all of the above

Only users with the Administrator role can add, edit or delete users.

The Administrator can assign one or more roles to each user depending on the functions the user is going to perform. The interface is adapted to the convenience of each role, so the user sees only those entities that are needed to perform the user’s duties within the assigned role or roles. For example, report settings are not displayed for the VoD editor, whose main duty is to manage meta content. Only the Administrator can see all entities.

Deleting a User

A number of SmartTUBE Admin Console entities (pricing plans, content, service accounts, etc.) are associated with the user who created them. As a result, you should consider the following aspects of deleting users:

  1. On the Administration > Users page, open the details page for the desired user and click the Delete button, and confirm the deletion in the pop-up window.
  2. The system will check the entity relationships with this user. This process may take a few minutes.
    • If the check does not reveal any errors, the user will be silently deleted.
    • Otherwise, the error text will be displayed and the Force Delete button will appear. The forced deletion allows you to delete all the entities created by the user.

The Forced user deletion feature is available on request.

User Activity Monitoring

The Administrator can control user activity on the Administration > Users activity page. Tracking is performed for the following actions on the SmartTUBE Admin Console entities:

  • Create
  • Update
  • Copy
  • Delete

To manage the data storage time:

  1. Open the Administration > Scheduled jobs page.
  2. Create a job with the auditing#cleanlogs method.
  3. In the system.conf file, specify the number of days of data storage using the auditing.shelfLife parameter. If the parameter is not specified, the default value of 60 days is used.

Failure Alerts

SmartTUBE provides an email alerting to failures in certain services. There are currently 4 types of notifications available:

  • OSS integration errors
  • EPG import errors
  • VOD metacontent import errors
  • Database connection limit errors

You can enable/disable them and specify a list of recipient mailboxes in SmartTUBE Admin Console > Administration > Email Alerts.

Image18

Dictionaries

A number of SmartTUBE Admin Console fields are drop-down lists formed from dictionaries, such as genres, countries, device types, and so on. You can edit dictionaries in the Dictionaries section. See below for some dictionary explanations.

Image20

Dictionaries menu of the SmartTUBE Admin Console

Dictionary

Description

Devices

Device types

The data of this dictionary is used to manage the distribution of platform services and resources, depending on the type of end-user devices. Device types are formed from devices that use the same technology (i.e. STB, ANDROID, IOS, etc.). You can also combine multiple types into a single group. See the “Redefining the Channel Streams Depending on Content Delivery Network” chapter for details on the Redefinitions tab.

Device settings

Settings requested by end-user devices at authorization.

Device limit restrictions

Restrictions on the maximum quantity of devices which could be linked to service accounts (devices without UID are not considered).

Sessions

Concurrent session limit

Limits on the number of end-user devices linked to an account and consuming services simultaneously.

Session limit actions

List of actions applied to user sessions that have reached the limits set in the “Concurrent session limit” dictionary.

Servers

Recorder video servers

Video servers used to overlay an additional logo on top of the original channel stream.

Video servers

Video servers used for Catch-up and nPVR services.

Regional settings

Cities

Cities are used for displaying the weather forecast and map services in the SmartTUBE app. Also, the data of this dictionary is used when localizing the subscriber during authorization.

Countries

Countries of content production used to filter VoD content. For more information on how to use the Linked external IDs tab, see the “How to Avoid Duplicates” chapter.

Languages

Languages used for multilingual fields. See Multilingual fields.

Custom languages

Differs from the Languages dictionary by the ability to specify the external language ID with an arbitrary string (instead of 2-symbol ISO 639-1 language code).

Currencies

Currencies are used, e.g. for displaying in the SmartTUBE app in the “Exchange Rate” section.

Content grouping

Content genres

Content genres used to filter VoD content. Genres can be nested. For more information on how to use the Linked external IDs tab, see the “How to Avoid Duplicates” chapter.

TV channel topics

Topics of TV channels. Used for displaying and for filtering by topic in the SmartTUBE apps.

Keywords

Keywords used to filter content

Year ranges

Periods of years used to filter VOD content

Movie related

Movie occupations

Roles of personalities in the production of the movie or episode.

Personalities

Personalities involved in content production. Used only for displaying in the subscriber’s interface.

Awards

Awards for content. Used only for displaying in the SmartTUBE app.

Nominations

Nominations for content

Non-grouped dictionaries

Access levels

Age restrictions. This dictionary specifies the list of available access levels for user profiles and the age restrictions for content in the SmartTUBE app.

Account state switches

Rules for automatic switching of account states when certain conditions occur.

Additional service fields

Additional user-filled information (e.g. email, promocodes, subscriber suggestions, etc.) passed from the SmartTUBE app to the OSS/BSS when subscribing to a specific service.

Dictionary notifications

List of dictionaries upon the updating of which notification needs to be sent to devices. Only updates during the EGP and VoD metadata import are taken into account.

Regions

Regions used for restricting the area of content providing.

Icons

Icons used with Information messages

Image tags

Tags used for labeling banners. For more detail, see Content Promotion.

UI skins

Tenant dependent UI skins for SmartTUBE apps

WV security policy

Widevine security policies set for individual TV channel streams and VoD assets

The Administration menu also contains the following dictionaries:

Dictionary

Description

Users

Users of SmartTUBE Admin Console. Allows to set access rights and bounding to tenant

Cache servers

Allows you to reload cache servers’ configuration, update its data and get statistics.

System properties

Allows to redefine the system configuration parameters (of the system.conf file) and update them on the data and cache servers on-the-fly.

Email alerts

Provides an email alerting to failures in certain services, e.g. OSS integration errors, EPG import errors, VOD metacontent import errors, Database connection limit errors.

Licenses

List of licenses managing the number of service accounts, devices and terms of using SmartTUBE.

Scheduled jobs

Scripts (methods) of different type to be performed regularity, e.g. EPG import, weather forecast update, delete expired logs or messages, inactive service accounts, etc.

Encryption types

Type of content encryption. Used for associating with CAS/DRMs. The External ID must be specified as follows (otherwise the errors may occur):

Name

External ID

without encryption

0

widevine

widevine

securemedia

securemedia

Basic HTTP authentication

basicAuth

DRM license servers

Settings of DRM licensing servers

Integration API users

Users allowed to access SmartTUBE OSS/BSS API

Tenants

List of tenants, if the multitenant architecture is applied.

OSS/BSS Urls

List of connections (end points) to OSS/BSS systems

Filters for deleting service accounts

Filters of service accounts to be periodically removed. See more…

Content providers

List of external content providers

Offers

Offer texts displayed to users when subscribing to a service packages

Logs

Users activity

SmartTUBE Admin Console user activity log

SmartMEDIA warnings

Warnings of situations when the DVR/nPVR packages of SmartTUBE have a channel recording time longer than is actually recorded on SmartMEDIA servers.

Tools

Content dictionary merger

Allows to find and remove duplicate content genres, categories, rubrics and countries by merging the similar entries into one.

Export Wizard

Allows to filter and export into the CSV file data on a number of the SmartTUBE entities

How to Avoid Metadata Duplicates

When you import EPG and/or VoD metadata from different providers, comparison of genres, countries, types and categories of content with existing ones is done by their External IDs. Thus, for example, several content genres with the same name, but differing only in External ID, may appear in the Content genres dictionary.

In order to avoid it, you can associate multiple genres or External IDs of a genre with a single content genre. The same is for the content categories, types, and countries.

Let’s consider three situations.

  1. You have found duplicate genres
    1. Find the genre you want to subordinate to another.
    2. In the Add to the group dropdown field, choose the genre to which you want to subordinate it.
Image14
  1. You know in advance (before importing) that the External ID of a certain genre does not match with an existing one.
    1. Find the genre you want to add an additional External ID to.
    2. Add a new External ID to the genre in the Linked external IDs tab.
Image4
  1. You want to import EPG or VoD metadata and you don’t care.

In this case, two situations may occur:

  1. If the External ID matches, the imported genre will be linked to the existing one without any problems.
  2. If the External ID does not match, a new genre will be created. You can link it to another one later in the way described above.

Admin Console Tips & Tricks

In order to speed up your management duties, the SmartTUBE Admin Console has several useful features.

Multilingual Fields

Some SmartTUBE Admin Console entities may have multilingual fields (for example, movie name, country, director name, etc.). To fill them in multiple languages, follow these steps:

  1. Add the language in the Dictionaries > Regional Settings > Languages dictionary.

    Image8
  2. Select a language from the drop-down list in the top panel.
    This will only affect the value of the fields, and the UI language will remain as it was selected on the login page.

    Image13
  3. Fill the fields in the selected language and save changes.
  4. Repeat steps 2–3 for all needed languages.

Field Hints

SmartTUBE Admin Console has hints for the most critical fields. These hints can help you through the configuring process. To read a hint, hover mouse over the (?) icon next to the field.

Image22

Entity Details Without Leaving the Page

When you open some listing (for example, the list of channels, EPG programs or TV bundles), the pane to the right is empty. In order to view details on a list item in this pane, hover mouse over the item and click on the appeared Play Arrow icon.

Image16

Copying & Bulk Editing / Deleting

If you need to create an item similar to the already existing one, you may select it and click the Copy button.

Image9

If you need to change the same parameters for several similar items (for example, movies) to the same value you may use the Bulk editing feature instead of editing each item separately:

  1. Select or filter the needed entries.
  2. Click the Bulk editing button.

    Image21
  3. Click the Edit button to edit entries or Delete to remove them.

Quick Jump to the Next Item

If you are editing items sequentially, for example, a list of channels or movies, use the Left-Arrow and Right-Arrow buttons to quickly navigate between items.

Image6

Exporting Lists to CSV

You can export item lists (movies, service accounts, messages, etc.) to a CSV file by clicking the Export button on the correspondent page.

Image26

Deploying End-User Apps

This part contains detailed instructions for installing SmartTUBE Apps on devices, customizing and publishing them to stores, as well as detailed instructions for SmartTUBE Device Manager, which allows you to remotely manage STB firmware and SmartTUBE Apps’ configurations.

Installing and Publishing Apps

The SmartTUBE solution provides a suite of applications that support a variety of end-user device platforms. SmartTUBE applications for SmartLabs Android and Linux STBs are pre-installed on devices out-of-the-box. SmartLabs set-top boxes, as well as set-top boxes from other manufacturers that have been migrated to SmartLabs software, can be upgraded using SmartLabs Device Manager. All other SmartTUBE apps are ready to be published in app stores and/or manually installed on devices.

As a SmartLabs customer, you have access to the Software Release Notes page in your SmartLabs Wiki‘s space. This page features SmartTUBE apps that are ready to be downloaded, tested, and published to app stores or installed on STBs.

How to Install SmartTUBE Apps Manually

Before publishing your SmartTUBE apps on app stores, you can test their performance on your side. Just download them from your SmartLabs Wiki‘s space and follow the guides below:

How to Publish SmartTUBE Apps on App Stores

The SmartLabs team has extensive experience in publishing apps for various platforms. We can help you with publishing your SmartTUBE apps to app stores. In order for us to do so, please follow the instructions below.

In order to successfully pass app verification by any app store, your backend must have multiple TV channels with EPG and VoD movies (if you are going to provide VoD service).

Google Play

  1. Register a developer account on the Google Play by following Google’s instructions.
  2. Include our developers to your team.Add the android-dev@smartlabs.tv account to your team in the Google Developer Console with the access to applications created by SmartLabs. The invitation is sent in the Users and permissions section.
  3. Copy or download the metadata template for the Google Play, fill it out and send to the SmartLabs Support Team.

Apple App Store

  1. Register a developer account on the App Store by following the Apple’s instructions.
  2. Include our developers to your team. Add an account with the Apple ID tester.smartlabs@gmail.com to your team with the role admin or application Manager for applications created by SmartLabs. This way we will be able to upload the final release builds to the TestFlight.
  3. Grant us access to distribution certificates and application profiles in the developer account.
  4. Create the provisioning profile, distribution certificate, so that we can download it on the Developer portal and create the Application ID.
  5. Copy or download the metadata template for the Apple App Store, fill it out and send to the SmartLabs Support Team.
  6. According to Apple’s rules, please provide us with the Application Privacy Policy. See an example here.

Samsung Smart Hub

  1. Register a developer account on the Samsung Developer Portal.
  2. Send the login and password to the SmartLabs Support Team.
  3. Copy or download the metadata template for the Samsung Smart Hub, fill it out and send to the SmartLabs Support Team.

LG Content Store

  1. Register a developer account on the WebOS TV Developer portal following the LG instructions.
  2. Send the account login and password to the SmartLabs Support Team.
  3. Copy or download the metadata template for the LG Content Store, fill it out and send to the SmartLabs Support Team.

Whale OS Store

  1. Register a developer account on the ZEASN Developer portal.
  2. Contact ZEASN team for business cooperation.
  3. Send the account login and password to the SmartLabs Support Team.
  4. After completing the registration process, we will send you a metadata template to fill in.

Amazon Store

  1. Register a developer account on the Amazon Developer Portal.
  2. Send the account login and password to the SmartLabs Support Team.
  3. After completing the registration process, we will send you a metadata template to fill in.

Requirements for Basic SmartTUBE Apps Customization

The basic customization of SmartTUBE apps is carried out by SmartLabs.

For this purpose, please send us — at sales@smartlabs.tv or Support ticket — the information and image archives described below.

Please create simple, high-contrast images with recognizable shapes and minimal details for optimal visibility.

Note:

This information and materials are only necessary for the app branding. To publish apps to stores, additional images are required. Their specifications are sent on request.

Common Information

  • Backend host
    e.g. https://fe.lime.clients.some.tv/
  • Operator name
  • List of UI languages to support
  • List of languages the content search to support
  • Default app’s UI language
  • Default Android UI language (only for languages supported by Android 9+)
    Only for Android AOSP STB with firmware delivered by SmartLabs
  • Do you need a language selection page, when the user starts the application for the first time?
    Only for Smart TV and STB devices
  • Default time zone
  • Operator’s official website
  • Operator’s Tech Support phone
  • E-mail (optional)
  • License agreement text (optional)
    With localization for UI languages
  • Application Privacy Policy
    See the example
  • HEX-color of the selector
    Highlights UI elements with a background color on hover
  • STB firmware update URL prefix (optional):
    • for Android AOSP STB with firmware delivered by SmartLabs: http://… (e.g. http://upgrade.some.tv/default-versions)
    • for Linux-based STBs: http://… or multicast (norm://…)
  • Applications packages repository (optional)
    e.g. http://upgrade.some.tv/android-packages
    Only for Android AOSP STBs

Apps for Smart TV

Please add all images to the ZIP archive using the specified paths below.

All Smart TVs

Image purpose

Filename & path

Format & size

Other requirements

Status Bar Logo

(Screens left top corner)

  • SmartTV_all/StatusBarLogoFHD.png
  • SmartTV_all/StatusBarLogoHD.png
  • SmartTV_all/StatusBarLogoSD.png

PNG

Size Variations:

  • 63×60 px (fullhd)
  • 42×40 px (hd)
  • 24×23 px (sd)

Transparent background

Splash Screen Logo

  • SmartTV_all/splashScreenLogoFHD.png
  • SmartTV_all/splashScreenLogoHD.png
  • SmartTV_all/splashScreenLogoSD.png

PNG

Size Variations:

  • 550×181 px (fullhd)
  • 363×119 px (hd)
  • 292×96 px (sd)

Transparent background

Android TV

Requirements for the SmartTUBE Android TV app inherit all image requirements from the All Smart TVs section above.

Image purpose

Filename & path

Format & size

Other requirements

Splash Screen Logo

AndroidTV/splashScreenLogo.png

PNG 550×181 px

Transparent background

App banner for the Applications rail

  • AndroidTV/appBanner-mdpi.png
  • AndroidTV/appBanner-hdpi.png
  • AndroidTV/appBanner-xhdpi.png
  • AndroidTV/appBanner-xxhdpi.png
  • AndroidTV/appBanner-xxxhdpi.png

PNG

Size Variations:

  • 160×90 px (mipmap-mdpi)
  • 240×135 px (mipmap-hdpi)
  • 320×180 px (mipmap-xhdpi)
  • 480×270 px (mipmap-xxhdpi)
  • 640×360 px (mipmap-xxxhdpi)

See also Google requirements

Opaque background

App icon for the Android system menus (in-app location)

  • AndroidTV/appIcon-mdpi.png
  • AndroidTV/appIcon-hdpi.png
  • AndroidTV/appIcon-xhdpi.png
  • AndroidTV/appIcon-xxhdpi.png
  • AndroidTV/appIcon-xxxhdpi.png

PNG

Size Variations:

  • 80×80 px (mipmap-mdpi)
  • 120×120 px (mipmap-hdpi)
  • 160×160 px (mipmap-xhdpi)
  • 240×240 px (mipmap-xxhdpi)
  • 320×320 px (mipmap-xxxhdpi)

See also Google requirements

Opaque background

App for Linux STB

Please add all images to the ZIP archive using the specified paths.

Image purpose

Filename & path

Format & size

Other requirements

Status Bar Logo
(Screens left top corner)

  • stbui/statusBarLogoFHD.png
  • stbui/statusBarLogoHD.png
  • stbui/statusBarLogoSD.png

PNG

Size Variations:

  • 63×60 px (fullhd)
  • 42×40 px (hd)
  • 24×23 px (sd)

Transparent background

Splash Screen Logo

  • stbui/splashScreenLogoFHD.png
  • stbui/splashScreenLogoHD.png
  • stbui/splashScreenLogoSD.png

PNG

Size Variations:

  • 550×181 px (fullhd)
  • 363×119 px (hd)
  • 292×96 px (sd)

Transparent background

System upgrade/startup splash screen

  • stbui/startupSplashScreen1280x720.png
  • stbui/startupSplashScreen720x576.png
  • stbui/startupSplashScreen720x480.png
  • stbui/startupSplashScreen640x480.png

PNG

Size Variations:

  • 1280×720 px
  • 720×576 px
  • 720×480 px
  • 640×480 px

Opaque background

Bootloader for STBs Arris VIP1003/1903 and VIP1113

stbui/bootloaderArris.bmp

Recommended format: BMPv3 with RLE 8-bit color (256 color palette, 32 MiB max)

Size: 720×576 px (scaled from scale the initial 960×576 px)

Aspect ratio: 16:9 sсaled to 4:3 (i.e. you need to scale the initial 960×576 px image to the 720×576 px one)

Some image areas are reserved for animations (see the safe zone mockup)

Transparent background

App for Linux STB Using Web Browser

Requirements for the Linux STBs using web-based SmartTUBE App inherit all image requirements from the All Smart TVs section above.

Image purpose

Filename & path

Format & size

Other requirements

System upgrade/startup splash screen

  • Linux_using_web_browser/startupSplashScreen1280x720.png
  • Linux_using_web_browser/startupSplashScreen720x576.png
  • Linux_using_web_browser/startupSplashScreen720x480.png
  • Linux_using_web_browser/startupSplashScreen640x480.png

PNG

The logo must be fitted in the white rectangle shown on examples below.

Size Variations:

Opaque background

App for Android AOSP STB

Requirements for the Android AOSP STB with firmware delivered by SmartLabs inherit all image requirements from the All Smart TVs section above.

Image purpose

Filename & path

Format & size

Other requirements

Splash Screen for Android AOSP STB with firmware delivered by SmartLabs

AndroidAOSP/splashScreenForSmlAospStb.png

BMP RGB565 and PNG 24bit

1920×1080 px

Opaque background

App for Web Browsers

Please add all images to the ZIP archive using the specified paths.

Image purpose

Filename & path

Format & size

Other requirements

Favicon for the web portal (in-app location)

web/favicon.ico

PNG

Size Variations:

  • 16×16 px
  • 64×64 px

Transparent background

Apps for iOS/iPadOS (iPhone, iPad)

Use these units when creating images:

  • px: Physical pixels (device-specific).
  • pt: Resolution-independent points. Scaling depends on screen density:
    • @1x: 1 pt = 1 px
    • @2x (Retina): 1 pt = 2 px
    • @3x (Super Retina): 1 pt = 3 px

Please add all images to the ZIP archive using the specified paths.

Image purpose

Filename & path

Format & size

Other requirements

Splash Screen and Sign In screens Logo
(in-app location)

iOS/logoBig.imageset/logoBig.pdf

Vector in PDF

Tolerance zone size: 354×170 pt

Transparent background

The logo should be in contrast to the black background

Status Bar Logo
(
Screens left top corner)

iOS/logo.imageset/logo.pdf

Vector in PDF

Tolerance zone size: 30×30 pt

Transparent background

The logo should be in contrast to the dark background

Main App Icon (App Icon)

iOS/AppIcon.appiconset/Icon-1024.png

PNG

1024×1024 px

Opaque background

No rounded corners (iOS applies its own mask)

See also the Apples requirements (App icon attributes paragraph)

Apps for Android Mobile

Please add all images to the ZIP archive using the specified paths.

Image purpose

Filename & path

Format & size

Other requirements

Splash Screen and Sign In screens Logo

Android_Mobile/splashScreenLogo.png

PNG 300×327 px

Opaque background

Main App Icon

  • Android_Mobile/mainAppLogo-mdpi.png
  • Android_Mobile/mainAppLogo-hdpi.png
  • Android_Mobile/mainAppLogo-xhdpi.png
  • Android_Mobile/mainAppLogo-xxhdpi.png
  • Android_Mobile/mainAppLogo-xxxhdpi.png

PNG

Size Variations:

  • 48x48 px (mipmap-mdpi)
  • 72×72 px (mipmap-hdpi)
  • 96×96 px (mipmap-xhdpi)
  • 144×144 px (mipmap-xxhdpi)
  • 192×192 px (mipmap-xxxhdpi)

Opaque background

Status Bar Logo (Screens left top corner)

Android_Mobile/statusBarLogo.png

PNG 63×60 px

Transparent background

In-App Loading Animation (optional)

Sprite animation is used to illustrate waiting states in the player, buttons and general waiting states. For this purpose, a sequential animation storyboard packed into a single image is used. Please, see the sample images here. Default animation speed — 18 frames per second.

Image purpose

Filename & path

Format & size

Other requirements

Loading animation for the player and general waiting states (in-app location)

loader/general/fhd.png

PNG 1944×108 px

Transparent background

18 frames aline

Frame size 108×108

loader/general/hd.png

PNG 1296×72 px

Transparent background

18 frames aline

Frame size 72×72

loader/general/sd.png

PNG 1044×58 px

Transparent background

18 frames aline

Frame size 58×58

Loading animation for buttons (in-app location)

loader/buttons_normal/fhd.png

PNG 972×54 px

Transparent background

18 frames aline

Frame size 54×54

loader/buttons_normal/hd.png

PNG 666×37 px

Transparent background

18 frames aline

Frame size 37×37

loader/buttons_normal/sd.png

PNG 360×20 px

Transparent background

18 frames aline

Frame size 20×20

Loading animation for selected buttons (in-app location)

loader/buttons_inversed/fhd.png

PNG 972×54 px

Transparent background

18 frames aline

Frame size 54×54

loader/buttons_inversed/hd.png

PNG 666×37 px

Transparent background

18 frames aline

Frame size 37×37

loader/buttons_inversed/sd.png

PNG 360×20 px

Transparent background

18 frames aline

Frame size 20×20

Android Boot Animation (optional)

You can customize the visual experience of the boot up process.

You should modify the reference bootanimation-default-500×300.zip file in order to customize the boot animation. Instructions below:

  1. Unzip bootanimation-default-500×300.zip
  2. Add new top level folders

These folders represent sections of the boot animation. Each folder has a series of PNGs arranged alphabetically.

  1. The first line of desc.txt represents the animation width and height in pixels followed by the frames per second:

Example: 1080 720 60.

Be mindful of these numbers — they are specific for each animation. Changing the numbers may create unpredictable visual effects.

  1. Edit the following lines of the desc.txt file. Keep in mind, each of the bolded characters represent different sections of the boot animation.

Example: c 1 0 part1

The first letter (in the example above, “c”) is always “c” or “p”. “c” means the boot animation will play to completion, no matter what. “p” means the boot animation will play unless interrupted by the end of the boot.

The first number (in the example above, “1”) indicates how many times the animation will play — this must always be greater than zero for any partner-added folders. Only one animation can be marked as “0”, and that animation will play on an infinite loop.

The second number (in the example above, “0”) indicates the amount of frames to delay after the animation section ends. This is usually set to “0”.

The final argument (in the example above, “part1”) is the name of the folder inside the zip file.

  1. Re-zip the file

Be careful not to compress the files when doing this — using the zip as a concatenation method is recommended: zip ../bootanimation-default-500×300.zip * -0 -r

  1. Send the resulting zip file to SmartLabs representatives via SmartLabs issue tracking system.


Change Log

18.04.2025

  • Update on image requirements for SmartTUBE Apps for various platforms without changes to animation requirements.

Device Management Console

About SmartTUBE Device Manager

SmartTUBE Device Manager — a service with the web console for managing firmware, applications and configurations on all types of IPTV/OTT devices including Linux and Android STBs, mobile and Smart TV platforms. This console has the following key features:

  • Software artefacts management (STB Linux and Android firmware, private app repository for AOSP, configuration files)
  • Device grouping (production, staging, A&B, etc.)
  • HTTP and Multicast firmware distribution
  • Software version tracking and release notes
  • Update strategies management (soft update, force update, minimal allowed version)

Interface Overview

After logging in, the Home page opens where you can see the summary table with information about the versions of firmware and system apps installed on STBs.

Image6

Home page with Main menu

The screenshot above shows that the SML-5051A devices from the Production group have the hi3798-3.5.4 firmware and Angry birds and Betacom system apps installed.

Each item of the Main menu, except for Home, is a dictionary containing information about firmware, Android apps, device groups, and STB models, respectively.

Filling in Dictionaries

Before uploading firmware, apps and configuration files to devices, you should fill out all the dictionaries.

  1. ‘Device Models’ Dictionary

Add all STB models used on your platform to this dictionary by defining the following parameters:

    • Device model name — used for STB identification in the SmartTUBE Device Manager interface;
    • Hardware revision identifier — device identifier (aka boardName) used for internal API requests and other SmartLabs applications. To obtain it, please contact Smartlabs technical support;
    • Product — identifier allowing to distinguish devices with the same Device model name, but differing, for example, in hardware configuration (memory size, optional connectors, etc.);
    • Type — device type: Linux, Android STB or Other (mobile iOS/Android and SmartTV).
  1. ‘Firmwares’ Dictionary

Upload firmware files to the dictionary by following these steps:

    • Click the Add (+) button.
    • Fill in the following parameters:
      • Version — firmware version;
      • Type — device model for which the firmware is intended;
      • Firmware type:
        • Update — update within the current major version or
        • Upgrade — upgrade to a newer major version;
        • Upgrade to version (for Firmware type — Upgrade only);
      • Release notes.
    • Upload the firmware file using the Upload file button.
    • Click the Save button to save changes.

Now the firmware is ready for assignment to devices — the Is active flag is set to it. If you need to remove firmware from the list of available for installation, set the Is archived flag.

Later, if you need to add an incremental update to a specific firmware version, use the Add (+) button in the Incremental updates to area on the Firmware details page.

  1. ‘Staging Groups’ Dictionary

For testing firmware and apps, multiple end-user devices can be separated into staging groups (the number of groups is not limited):

    • Create a group using the Add (+) button.
    • Specify the parameters:
      • Staging group name — used for the group identification in the SmartTUBE Device Manager interface,
      • Staging group external ID — unique group identifier used in internal API requests and firmware folder naming.
    • Add the terminal UIDs / MACs with the Add (+) button. (You can also do this later).
    • Click the Save button to save changes.

Now you are able to open group details and add more terminals.

    • One by one in the Terminal UID field.
      If you use SmartTUBE SDP as middleware, then the choice is performed by the devices’ UID registered in SDP. Otherwise, the MAC addresses are entered manually
      or
    • Load the list of UIDs /MACs using the Add (+) button.

The Production staging group represents the bulk of STBs held by subscribers and is not editable. When the device testing is complete, it can be moved to this group with the Move to production button.

  1. ‘Android Apps’ Dictionary

In addition to firmware, you can manage Android apps on STBs installed. Applications can be User or System. The only difference between them is that the name and version of System apps are displayed on the Home page for quick and easy monitoring.

    • Apps are loaded in the same way as firmware with the following fields specified:
    • Published — flag to make the app available for assignment to devices,
    • Application name — to identify the app in the SmartTUBE Device Manager interface,
    • Code version — to identify the app version in the SmartTUBE Device Manager interface,
    • Application package — application package name,
    • Application type — User or System.
    • Path — path to the app file on the server. It is filled in automatically after the app file is uploaded.

Uploading Firmware, Apps and Configuration Files

Once you’re done filling out the dictionaries, you’ll be able to upload software artifacts to devices.

  1. Go to the Home page and click on the desired empty cell.

A window offering you to upload firmware, apps and configuration files is displayed:

Applying new firmware and Android apps to devices

  1. Specify the following parameters:
    • Firmware version — select it from the drop-down list.

For the mobile and SmartTV devices, this setting is for informational purposes only. Technically, the version is managed in the corresponding AppStore/Play Market/Seller Lounge LG/Samsung showcase and differs from the specified one. Make changes only after you receive confirmation that the app version has been published on the showcase.

    • Minimal supported version — if the device has a firmware version lower than the minimal supported, it will be forced to update to the current one.
    • Portal URL — Web Application URL (For details, please contact the SmartLabs Support Team).
    • Update by HTTP or Update by Multicast
    • Block authorization for old versions — prohibits subscriber authorization if the firmware version of the end-user device is lower than the current one.
    • Update strategy:
      • Force — subscriber receives an on-screen notification about the need to restart the device without the option to opt out;
      • Soft — subscriber receives the notification with the ability to postpone the update several times.
    • Android apps tab — add a new app using the  button or select from the dictionary using the search field below (enter 3 or more characters).
    • Additional link params tab — If you need to provide the firmware and configuration files of this “Model-Group” pair to devices with a specific firmware version (regardless of the UID and belonging to any staging group), select it from the drop-down list.
    • Setting files section — add JSON or text configuration files using the Add JSON file and Add text file buttons. You can also upload a file of any other format with the Upload files button.

Filled up section looks as follows:

Image9

Here you can track the history of setting files applied to various firmwares (section with the folder tree) and history of changes for each file (using the History button):

Image8
  • Click the Save button to save changes.
  • Software artefacts are now uploaded to devices.

Apps and configuration files should not be uploaded without firmware.

Management of Installed Apps

After you upload the apps to devices, you will have additional options for managing them.

  1. Click on the desired table cell on the Home page. You will see the following information about the installed apps:
Image1
  1. Set the following options, if required:
    • Move to black list — prevent app installation on devices and remove previously installed apps that not part of the firmware built-in apps;
    • Always installed — make it impossible for the subscriber to delete the app;
    • Allow downgrade — allow downgrading for installed debug builds of the app and for installed firmware debug builds

As a security measure, downgrading the app version is prohibited, because if installed, the package gets access to the data left on the device by its predecessor. Therefore, downgrading the application version is only allowed for debugging builds installed.

On debuggable platform builds, downgrades are permitted even for non-debuggable packages. Debuggable platform builds do not offer security guarantees, and thus some security mechanisms can be disabled to make debugging/testing on those builds easier.

  • Force update — subscriber receives an on-screen notification about the need to update the app without the option to opt out;
  • Remove app from link — unlink the app from the current “Device model – Staging group” pair.

Logging

SmartTUBE Device Manager allows you to monitor all actions performed by operators and errors that occur during firmware updates.

Operator Action Logs

The Logs page provides a chronology of actions performed by Device Manager users. You can filter this log by required parameters using the search fields.

Image13

Here you can track the following objects and data:

  • Object class — type of Device Manager entities:
  • ManagerConfigFile — Settings file editor. Tracks only the creation, deletion and saving of files. History of changing the file contents can be found in the Settings files section.
  • Firmware Firmwares dictionary
  • AndroidApp versions of Android apps
  • AndroidAppMain Android apps dictionary
  • AndroidAppStagingGroupDeviceModelLink — linking of Android apps to device models and staging groups on the Home page
  • DeviceModel Device models dictionary
  • FirmwareStagingGroupDeviceModelLink — linking of firmwares to device models and staging groups on the Home page
  • TerminalStagingGroupLink — linking of terminals (end-user devices) to staging groups in the Staging groups dictionary
  • Action — action performed by operator to the object of the Device Manager or a configuration file:
  • create — creating a new object
  • delete — deleting of a certain object
  • update — updating settings for a certain object
  • savefile(new) — creating a new file (configuration, text, image, etc.) for the “Device model – Staging group” link on the Home page
  • savefile — updating a file for the “Device model – Staging group” link on the Home page
  • Object ID — ID of an object of the Device Manager. In the current UI implementation, you can find an object by its ID as follows:
    • Determine the object class and object ID:

Image2

 

    • Proceed to the appropriate dictionary and select any object:
Image10
Image5
    • Look at the URL of this object and replace its ID with the ID of the object you are looking for:

original:

Image3

changed:

Image12

 

    • You found the object:
Image7

 

  • Login — login of the user who applied changes to the Device Manager objects
  • Action date
  • Details — details on the changes applied to the object

Firmware Error Logs

All errors raised during firmware update are collected on the Firmware error logs report. You can use this information for debugging.

Image11

The report provides 4 types of errors (Reasons):

  • Link error: Reasons:
  • No ‘Firmware – Device model – Staging group’ association was found for the device.
  • The Production group has a firmware with the Not for production usage option enabled.
  • Unable to update the device from source firmware to target one via the update chain.
  • File not found: Newer firmware for the upgrade is on the system, but the firmware file was not found.
  • Delivery error: A device attempted to request firmware via unicast or multicast, but this type of delivery is not allowed.
  • Version error: Reasons:
  • The Device Manager have the firmware version older than installed on a device.
  • There is no version argument in the device’s request.
  • Error in internal data structures when building the update chain.
  • Error when searching for firmware in the update chain.

Configuring and Customizing Apps

Baselines

SmartLabs offers service operators a variety of applications for end-user devices that are compatible with the SmartTUBE solution — including set-top boxes, Smart TVs, mobile iOS/Android devices, and web browsers. The user interface (UI) and user experience (UX) of the SmartTUBE applications can be tailored to specific requirements using a set of configuration files outlined in this section.

Customization of applications is divided into two stages:

  • Basic — carried out during the system’s commissioning phase by SmartLabs experts to align with the corporate identity of a service operator;
  • Operational — conducted by the service provider while the system is in operation.

Basic customization enables the operator to make adjustments to the user interface within the existing structure, such as the layout of main components and animation logic. It encompasses the following capabilities:

  • Interface localization — provides for localization of the user interface of SmartTUBE apps into the operator’s language by the operator. English is supported by default. Localization into languages using fonts containing hieroglyphs, Arabic script and other specific alphabets is discussed separately.
  • Operator logo — can be integrated into various parts of the user interface, such as the upper left corner, placeholders, splash screen, and more.
  • Color customization for element selector
  • Animation customization for waiting states

For a comprehensive list of customizable elements, please see here.

Operational customization enables the operator to modify the visual representation of the UI elements (e.g. Home screen, Movies/Series catalogs, Profile menu, etc.) as well as UX parameters. This can be achieved by uploading the correspondent configuration files to devices using the SmartTUBE Device Manager. The variations in operational customization options for different platforms are outlined in the sub-sections.

Format of Configuration Files

Configuration files for the SmartTUBE applications are structured in JSON format. The composition of files and parameters for each SmartTUBE application varies based on the target device platform. You can find their description in the relevant subsections of Configuring &Customizing Apps section.

Priority of Applying Configuration Parameters

The sequence in which the configuration parameters are executed by the application is as outlined below:  

  1. Default settings retrieved from the local file.
  2. Override settings retrieved from the local file.
  3. Override settings uploaded from the SmartTUBE Device Manager.

Thus, the settings specified in the configuration files uploaded from the SmartTUBE Device Manager hold the utmost precedence.

Local configuration files are installed with the app, stored locally on a device in the [app_container]srcconfigs directory and adhere the following format:

{
// Start of default configuration settings

“param_1”: “value_1”,
“param_2”:
“value_2”,
“set_of_params”: {
  “param_3”:
“value_3”,
  “param_4”:
“value_4”
},

// End of default configuration settings

“overrides”: {  // Overriding settings for the configuration parameters above
  “param_2”:  “value_5”,
  “set_of_params.param_3”:
“value_6”
}
}

Utilizing the “overrides” section enables the safe testing of alternative parameter values while maintaining the default settings. For instance:

{
“baseUrl”:
“https://fe1.some.tv/”,
“player”: {
  “startNumberForDVBChannels”:
1000,
  “subtitlesBackgroundStyle”: {
    “color”:
“000000”,
    “opacity”:
50
  },
“overrides”: {
  “baseUrl”:
“https://fe2.some.tv/”,
  “player.startNumberForDVBChannels”:
500,
  “player.subtitlesBackgroundStyle.opacity”:
70
}
}

Settings uploaded to devices via SmartTUBE Device Manager must be included to the “overrides” section. Example:

{
“overrides”: {
  “baseUrl”:
“https://fe2.some.tv/”,
  “player.startNumberForDVBChannels”:
500,
  “player.subtitlesBackgroundStyle.opacity”:
70
}
}

Also, please note, that the following notation:

{
“player”: {
  “subtitlesBackgroundStyle”: {
    “color”:
“000000”
  }
}

is equivalent to this one:

{
  “player.subtitlesBackgroundStyle.color”:
“000000”
}

Differentiation of Parameter Values Depending on Device Specifics

To optimize configuration management, you can specify the dependence of parameter values on the device specifics. Thus, you can distribute one configuration file to all your end-user devices. For example, you can make the fast forwarding on Smart TVs faster than on other devices. To do this, please follow this example, which can be applied to any configuration parameter:

“seekMultiplier”: [  // Configuration parameter
{
  “value”:
1.75,  // Value for the end-user devices filtered by the “rule” parameter
  “rule”:
“platform = cobalt & deviceType = STB & tenant = best_operator | platform = tizen & platformVersion < 4 & authorized = true”
},
{
  “value”:
1.25 // Value for other end-user devices
}
]

The “rule” parameter is the combination of the filters below, that define the target end-user device. You can use the following logic operators to combine filtering parameters: =, <, >, | (or), & (and).

platform, string

Platform of the end-user device. Acceptable values: tizen, webos, cobalt, web.

platformVersion, number

Version of the end-user device’s platform

deviceType, string

Name of the end-user device’s type. The list of acceptable values is determined by the dictionary SmartTUBE Admin Console > Dictionaries > Device types.

tenant, string

Name of the tenant. The list of acceptable values is determined by the dictionary SmartTUBE Admin Console > Administration > Tenants.

authorized, boolean

Flag of the authorization status of a device

Configuring Large-Screen Apps

Primary UI/UX Settings

The primary UI/UX configuration settings of the SmartTUBE Apps for large-screen and Android Mobile Devices are specified within the setup.json file. This pertains to the most recent generation of the SmartTUBE apps, known as SmartTUBE JUNG.

Changes to the setup.json file are applied only after the application is rebooted.

Parameter Description

baseUrl, string

Base backend URL (absolute, ex. https://10.65.50.71)

apiUrl, string

Default value: /api/v1

Path (relative or absolute) for calling methods of the SmartTUBE End-User Device API

getSettingsPath, string

Default value: /managerapi/manager/getSettingsPath?output=json&board=${deviceType}&mac=${uuid}&current_firmware_version=${appMajorMinorVersion}&currentVersion=${appMajorMinorVersion}

Path (relative or absolute) to get configuration parameters.

title, string

Tab title for the SmartTUBE App for Web Browsers

tenant, string

ID of a tenant. It is used in the multi-tenant system configurations to get customized attributes (fonts, logos, other configuration parameters) belonging to the specified tenant.

configsUrl, string

Path (relative or absolute) to the directory with configuration files. Overrides the default one (/configs/).

logoWidth, number

Default width of logo (in rem)

lang, string

Default language of the SmartTUBE app

langs,  array[string_values]

Languages available in the SmartTUBE app

epg, {object}

Settings for EPG preloading

before, integer

Hours before the current moment to preload the EPG

after, integer

Hours after the current moment to preload the EPG

loadMode, string

Initial load mode: column  makes several requests limited by pregroup interval, standard  makes separate requests for each channel.

dvbTimeOffset, number

DVB time offset in seconds

loadEpgFromTVInput, boolean

Flag to load EPG from the DVB input, even for DVB channels mapped by the mapDvbToSdpChannels parameter.

player, {object}

Integrated media player settings

ignoreSkipAdvertTimeoutForPl, boolean

Deprecated starting from JUNG 9.2 and replaced by the disableSkipBanForCurrentProgram parameter.
Flag to prohibit skipping ads for Pause Live programs, even if the Skip Advert Timeout has not expired.

showAdvBlockedPanel, boolean

Deprecated starting from JUNG 9.2. Flag to display the ad rewind panel

nonSkipableAdvInterval, integer

Deprecated starting from JUNG 9.2. The amount of ads the subscriber cannot skip and rewind, in sec. The value -1 prohibits skipping all ads.

maxSaveAdvertismentTimeout, integer

Deprecated starting from JUNG 9.2. Seconds after exiting standby mode during which it is possible to rewind ads (when the “Do not allow rewind ads” option is enabled on the channel).

resetSkipAdvertTimeoutOnSwitch, boolean

Deprecated starting from JUNG 9.2. Flag to reset the Skip Advert Timeout (see Step 3 of the How-to article) every time the subscriber switches a channel (including nPVR):

  • true — reset when switching a channel;
  • false — reset after viewing an ad block.

disableSkipBanForCurrentProgram, boolean

Flag to prohibit skipping ads for the ongoing program, even if the SmartTUBE Admin Console > Dictionaries> Ad skip restriction policies > [selected policy] > Ad Skip Ban Grace Period has not expired. Applicable if only the Pause Live / TSTV feature is enabled for the channel. This parameter replaces the deprecated parameter ignoreSkipAdvertTimeoutForPl.

openChannelTSTVFromStart, boolean

Flag that controls the behavior of the player when processing playlists:

  • true: the player starts playback from the beginning of the playlist
  • false (by default): the player tends to play as close to the end of playlist as possible (in order to minimize the delay for live)

ads, {object}

Settings for interaction with SmartTUBE Advertisement Decision System (ADS)

playback, string

Ad playback method:

  • single — the ad is played in the same video element as the content
  • double — the ad is played in a separate video element

xml, string

Type of the XML parser to process the VMAP data: external or native

skipBufferingAfterZapping, boolean

Skip buffering after zapping

shakaVersion, string

Version of Shaka module to use

playerSelectionRule, [array{object}]

Rules of player selection depending on platform. See the example here.

alwaysShowTvChannelsButton, boolean

Flag to display the “TV channels” button, even if movie is playing.

startSeekSpeed, integer

The initial speed of content rewinding (multiplier). Then it is replaced by the speed of maxSeekSpeed.

maxSeekSpeed, integer

The max speed of content rewinding (multiplier).

seekMultiplier, double

The multiplier to increase the rewind speed by each keypress. For example, a value of 1.5 will increase the multiplier by 1.5 each time a key is pressed.

  • 1
  • 1×1.5 = 1.5
  • 1.5×1.5 = 2.25
  • 2.25×1.5 = 3.375
  • until maxSeekSpeed is reached.

thumbnailWidth, integer

Width (in rem) of the thumbnail displayed above the progress bar during content seeking

thumbnailHeight, integer

Height (in rem) of the thumbnail displayed above the progress bar during content seeking

resetSeekIfThumbnailShownAfterSec, number

The period of the user inactivity, after which the thumbnail over the progress bar is hidden.

allowSeekAfterLive, integer

Period (in seconds) for which it is allowed to fast forward beyond the live moment.

checkProgramAccessLevelWhileSeeking, boolean

Flag to check programs for access level while seeking to avoid displaying thumbnails of restricted content.

limitPrevNonRecordable, integer

The protective period (in seconds) before the non-recordable program, during which recording is also prohibited.

limitNextNonRecordable, integer

The protective period (in seconds) after the non-recordable program, during which recording is also prohibited.

keepAlivePlayEvent, integer

Frequency (in seconds) of sending the keepalive event during content playback.

movieMinTime, integer

The time (in seconds) from which the playback of VoD content should start. For debugging purposes.

minSecToReloadAfterPause, integer

If playback is paused and the period between the pause time and the live time exceeds the specified one (in sec), the application reloads the playlist.

defaultAspectRatio, string

Default aspect ratio. Acceptable values: letterbox, fullscreen, panAndScan. Not applicable to LG WebOS Smart TVs, as they use native aspect ratio settings.

secMediaPositionIgnore, integer

The minimum time (in sec) to watch a movie or nPVR recording to save the media position.

haltPlayerOnError, boolean

Flag to go back in history in case of a player error

openLastViewedChannelOnStartup, boolean

Flag to open the last viewed channel when the application starts.

adaptiveChannelsBitrateIntervals, {object}

Marking the video quality for channels depending on the bitrate of stream variants. See the Example Configuration for the detailed example.

adaptiveVoDBitrateIntervals, {object}

Marking the video quality for CoD content depending on the bitrate of stream variants. See the Example Configuration for the detailed example.  

enableQualityLabelOverride, boolean

Flag to enable the overwriting stream labels of different quality described in the adaptiveChannelsBitrateIntervals and adaptiveVoDBitrateIntervals sections. For example, you can rewrite the stream quality label Excellent as 2160p. See the Example Configuration for the detailed example.

qualityAliases, {object}

Rules of overwriting stream labels of different quality described in the adaptiveChannelsBitrateIntervals and adaptiveVoDBitrateIntervals sections. See the Example Configuration for the detailed example.  

[bitrate_alias_name], string

Overwritten name of the stream quality label. For example, “Excellent”: “2160p”

qualityListAbbr, {object}

Rules of adding the auxiliary visual label for the stream quality labels.

[quality_alias_name], string

Text of the auxiliary visual label. For example, the “2160p”: “4K” pair can be displayed in the player like 2160p4K.

defaultPlayer, string

The player that should be pre-initialized at the start of the application.

playbackOptimizations, {object}

Content playback optimization settings

profile, string

The value of the “profile” argument added to the playlist request to the streaming server (e.g. SmartMEDIA)

shaka, {object}

Playback optimization settings for the Shaka player

ac3ignorer, boolean

Flag to ignore ac3 tracks

notCleanDRM, boolean

Flag not to clean the DRM keys. It is required for WebOS devices with a platform version less than 5.

stopLiveBeforeOpen, boolean

Flag to stop the previous stream for ux.tvChannelOpenTimeout ms before switching on a new channel when channel zapping.

shakadrmWithoutCredentials, boolean 

Flag to disable the withCredentials headers in the playlist/chunk requests in the Shaka player

shakadrmWithoutCredentials, boolean 

Flag to disable any custom headers in the playlist/chunk requests in the Shaka player

cobalt, {object}

Playback optimization settings for the Cobalt player

args.dashAccumulateDynamicManifest, boolean

Flag to accumulate dynamic manifest (i.e. segments that are not presented in the manifest anymore for args.dashAccumulateDynamicManifestDurationMs but not more than time shift buffer size value)

args.dashAccumulateDynamicManifestDurationMs, integer

See the args.dashAccumulateDynamicManifest parameter

args.dashAccumulateDynamicManifestThresholdUs, integer

Threshold for overlaps between segments to be considered as a sequence (if actual overlap is more than this value then new coming segments is considered as a duplicate) during accumulation.

setChannelPositionOnlyPaused, boolean

Flag to save the channel media positions only on pause

enabledDVBChannels, boolean

Flag to enable DVB channels

startNumberForDVBChannels, number

Start of DVB channel numbering

subtitlesBackgroundStyle, {object}

Background subtitles style

color, string

Color hex 000000

opacity, number

Opacity from 0 to 100

subtitlesMarginBottom, number

Subtitles margin bottom, in rem.

logLevel, integer

Logging level of the media player (Shaka Player):

  • 0 — OFF: logging is switched off;
  • 1 — ERROR: there are problems that need to be solved. The error does not stop the app operation as a whole, other requests can work correctly;
  • 2 — WARNING: there are warnings that need to be taken into account. An unexpected action occurred, despite this, the system executed the request;
  • 3 — INFO: important expected actions;
  • 4 — DEBUG: actions needed for the app debugging;
  • 5 — V1: Verbose 1 level (can generate a lot of output);
  • 6 — V2: Verbose 2 level (extremely noisy).

openTVChannelsInPlayerByOkButton, boolean

Flag to open channel list with the “Ok” button on remote control when the player interface is hidden. If false, the “Ok” button will pause the playback.

renderInterfaceAfter, array[{object}]

Interface opening delay depending on the in-app event. It is necessary to launch the player faster.

event, string

In-app event:

  • open — the app launch
  • play — the player launch

timeout, integer

Interface opening delay, in seconds.

showAfterRender, boolean

Flag to show the interface after an event occurrence of after timeout

progressbarMarginX, {object}

Margins of the progress bar relative to the content playback time on the left and right, in rem.

default, {object}

Margins for the channels and CoD

left, integer

right, integer

movie, {object}

Margins for movies

left, integer

right, integer

trailer, {object}

Margins for trailers

left, integer

right, integer

vodStartTimeString, {object}

Settings for displaying the start time of VoD content (to the left of progress bar)

type, string

Type of the time indication:

  • timeFromStart — time elapsed since the movie beginning;
  • timeToEnd — time remaining until the movie end;
  • endTime — total movie duration;
  • none — do not display the start time.

format, string

Default value: [hh:mm]or[mm:ss]

Time format:

  • hh:mm:ss
  • [hh:mm]or[mm:ss]
  • [hh:mm:ss]or[mm:ss]

vodEndTimeString, {object}

Settings for displaying the end time of VoD content (to the right of progress bar)

type, string

Type of the time indication:

  • timeFromStart — time elapsed since the movie beginning;
  • timeToEnd — time remaining until the movie end;
  • endTime — total movie duration;
  • none — do not display the start time.

format, string

Default value: [hh:mm]or[mm:ss]

Time format:

  • hh:mm:ss
  • [hh:mm]or[mm:ss]
  • [hh:mm:ss]or[mm:ss]

messages, {object}

Settings for the system messages

autohideSetRead, boolean

Flag to mark incoming messages as viewed after auto-hiding

usePopupMessageFlag, boolean

Flag to show messages with the field “popupMesssage”: true as a popup.

appVersion, string

SmartTUBE app version

channelContentProvider, string

ID of the TV channels’ provider on the SmartTUBE side. Must match one of the values of the contentProviders.key parameter. By default, “INTERNAL”.

contentProviders, array[{object}]

Settings for the VoD content providers

key, string

Content provider ID on the SmartTUBE side

provider, string

Content provider type:

  • smartlabs
  • megogo
  • go3

config, {object}

Settings for interaction with external content providers. The smartlabs type does not require any settings in this section. The settings for megogo type are provided below:

partnerId, string

Partner ID for interacting with MEGOGO services

salt, string

A key used to generate the authorization request to the billing

publicKey, string

Public key for interacting with MEGOGO services

privateKey, string

Private key for interacting with MEGOGO services

server, string

Default value: “https://api.megogo.net/v1”

URL of the MEGOGO API endpoint

sendSmartlabsHeaders, boolean

Default value for “provider”: “megogo”: true

Default value for “provider”: “go3”: false

Flag to send the x_smartlabs_mac_address and x-smartlabs-request-id headers in requests for the content. To avoid problems with the blocking access to content from external providers (CORS blocking), set the value to false.

ux, {object}

UX settings of the SmartTUBE Apps

silentAutoplayOnBannersAndChannelRail, string

Default value: UserDefinedDefaultFalse

This feature controls the audio behavior of trailer previews on the main banner and current TV show previews on the channel rail.

  • UserDefinedDefaultTrue: Users can manage this setting through the Settings > System > Mute preview menu, previews are muted by default.
  • UserDefinedDefaultFalse: Users can manage this setting through the Settings > System > Mute preview menu, previews are unmuted by default.
  • true: Previews are muted, and users cannot change this setting via the app’s menu.
  • false: Previews are unmuted, and users cannot change this setting via the app’s menu.

mainMenuType, string

Default value: “horizontal”

Type of the Main menu on the Home screen:

  • horizontal: Horizontal text menu
  • vertical: Vertical sidebar

useUpDownArrowsAsChUpDown, string

Feature that allows the user to switch channels using the D-pad on the remote. This is especially useful for Android STB remotes without dedicated “Channel +/-” buttons. Acceptable values:

  • “UserDefinedDefaultTrue”: User can change the feature behavior in the settings menu. Sets the On value in the menu as default.
  • “UserDefinedDefaultFalse”: User can change the feature behavior in the settings menu. Sets the Off value in the menu as default.
  • true (without quotation marks): Feature is enabled, user can’t change the feature behavior in the settings menu, settings menu doesn’t contain this option.
  • false (without quotation marks): Feature is deactivated, user can’t change the feature behavior in the settings menu, settings menu doesn’t contain this option.

androidTvBanners, boolean

Flag to show apps in the Application rail as banners on the large-screen Android devices

showBannersTrailer, boolean

Flag to show trailers when hovering the selector over the top banner on the home screen

hideBannersTitle, boolean

Default value: true

Flag to hide the movie title overlaid on the banner on the Home screen

subscribeOnlyFromService, boolean

Flag to display a dialog box with two options — “Go to Services menu” and “Cancel” — when a user tries to watch a channel that is not subscribed to.

redesignedTv, boolean

Flag to enable the new TV screen

npvrMetadataUrl, string (channel)

Source of metadata for npvr channel or npvr record

movieSubfilterResetButtonAtBottom, boolean

Flag to place the Reset Filter button at the bottom

vodFilterBackgroundColor, string

Background color for the VoD filters

tvProgramFilter, boolean

Flag to display the filter of TV programs by topic

filtersDimensions, {object}

Settings for the filter panel width depending on the current UI language

tv, {object}

Settings for the TV section

filter, {object}

Settings for the main filter panel

{language_id}, integer

Width of the panel for the {language_id} language (defined in the langs parameter), in rem.

default, integer

Width of the panel for other languages, in rem.

subFilter, {object}

Settings for the subfilter panel

{language_id}, integer

Width of the panel for the {language_id} language (defined in the langs parameter), in rem.

default, integer

Width of the panel for other languages, in rem.

movies, {object}

Settings for the Movies/Series sections

filter, {object}

Settings for the main filter panel

{language_id}, integer

Width of the panel for the {language_id} language (defined in the langs parameter), in rem.

default, integer

Width of the panel for other languages, in rem.

subFilter, {object}

Settings for the subfilter panel

{language_id}, integer

Width of the panel for the {language_id} language (defined in the langs parameter), in rem.

default, integer

Width of the panel for other languages, in rem.

speedTest, {object}

Settings for the integrated network speed test

url, string

URL of the test file to download

engine, string

Method for performing HTTP requests:

  • fetch — method for the Cobalt browser;
  • xhr — method for WebOS 3.

duration, integer

 Download cutoff by time, in seconds.

sizeInBytes, integer

Cutoff by the number of bytes downloaded. Required for the Cobalt browser.

useFakePostfix, boolean

Flag to add the request date to the URL to avoid caching on the nearest cache server

channelDigits, integer

The number of digits in the channel numbers

isRecordStartedProgram, boolean

Flag to allow user to record already airing programs

isRecordStartedProgram, boolean

Flag to allow user to record already airing programs

startChannelNumFromZero, boolean

Flag to start channel numbering from 0

keyboardFullscreen, array[{object}]

Layout for the full screen keyboard. Examples: en, ru, lv.

keyboardSearch, array[{object}]

Keyboard layout for the search screen. Examples: search-en, search-ru, search-lv.

playerBackground, boolean

Flag to enable background playback of content on the home screen

replaceLogoOnMovieByProvider, array[string]

List of content providers that determines the replacement of the in-app logo on the movie details page with the content provider’s logo, which is located in the images/icons/logo_${provider.externalId.toLowerCase()}.png directory.

uiDebounceTime, integer

Debounce time (in ms) for fast scrolling of programs in the TV and EPG sections.

preloadProgressWeight, integer

Weight for progress bar preload, depends on channels count.

noTransitionAfterRetrieveTimeout, number

The period for which the animation is disabled after opening some UI page, in msec. You can apply it for a specific page only using a rule with the route argument. For example, { “value”: 5000, “rule”: “route = /tv” }.

showTvLegend, boolean

Flag to show the tip “Change day [CH+] / [CH-]  Watch [Ok]” in the TV section

npvrQuotaStatus, boolean

Flag to show the nPVR quota status in the “My Profile” > “Recordings” section

requirePinOnStart, boolean

Flag to enable PIN code request on app start.

requirePinOnAwake, boolean

Flag to enable PIN code request after waking up from standby mode.

selectChannelOnEpgGridViaRemote, boolean

Flag to move the focus to the channel and the currently aired program in the EPG section when manually entering the channel number (on the RC or PC keyboard)

vodCategoriesVersion, string

VoD categories config version

mosaicBackgroundUrl, string

URL of the background for the channel mosaic view

canRemoveNpvrItem, boolean

Flag to allow the subscriber to delete his nPVR recordings

shouldFilterTracks, boolean

Flag to not display unsupported tracks (by codec) in the player

preferredNativeLangPronounce, boolean

Flag to display the names of audio tracks in the player in the national language (from the /configs/iso-639-1-2.json file)

showXXXMoviesInPurchaseList, boolean

Flag to show movies with the maximum access level in the list of purchased movies

openPlayerOnLastWatched, boolean

Flag to open the player when clicking on the content poster in the “Continue Watching” rail on the home screen

watchedContentDuration, integer

The movie viewing duration (in ms), after which it is considered viewed.

seekingDelayInitial, integer

Delay (in ms) in the payer’s response to the rewind button

seekingDelayLongPress, integer

Delay (in ms) in the player’s response to a long press of the rewind button

ratings, array[string]

Flags to display ratings (IMDB, etc.) on content posters

checkUnsupportedBrowser, boolean

Flag to prohibit the SmartTUBE app launch, if the built-in web browser is not supported by the app. The corresponding info message is displayed to the user.

showIconChannelLock, boolean

Flag to show the unavailability icon (strikethrough, lock, or similar) on the channel inaccessible to the subscriber.

shouldTerminateOnBack, boolean

Flag to close the app by pressing the “Back” button on the Home screen (with a confirmation dialog)

deliveryRuleVisible, boolean

Flag to display the delivery rule labels (“Subscribe”, “Rent”, “Buy”) on content posters

standbyTimers, array[integer_values]

List of standby timers available to the user (separated by comma and specified in hours). The -1 value adds the “Never” option in the SmartTUBE app. Example: “standbyTimers”: [-1, 1, 2, 3, 4] 

defaultStandbyTimer, integer

Standby timer set by default, in hours. The -1 value sets the “Never” option by default.

standbyModalTimer, integer

The number of seconds provided to the user to respond to the message about the automatic shutdown of the device after the expiration of the standby timer.

switchToLiveModalTimerSecs, integer

The time (in sec) of displaying the notification of switching to Live mode when the device detects that the channel is being played in nPVR mode for too long.

playNowProgramFromGrid, boolean

Selecting an action by clicking on the program in the EPG:

  • false — the program details page opens;
  • true — start playback of the program (or channel, if the nPVR record of the program is not available). If the channel is not subscribed, the correspondent dialog is displayed to the subscriber.

alwaysRequirePinOnProfileEdit, boolean

Flag to require the master-profile PIN when editing profiles, regardless of the “Require PIN code” option in the master-profile settings.

setupWizardSteps, array[{object}]

Settings for the setup wizard, launched on STBs at the first start.

key, string

Identifier of the wizard object:

  • language — UI language selection
  • license — license acception
  • baseUrl — base URL of the SmartTUBE Server

licensePath, string

URL of the TXT file with the license text

hidePassword, boolean

Flag to hide the password by bullets on the login screen

useHTMLInputElement, boolean

Type of input elements:

  • true — native (required value for browsers)
  • false — custom

canUnlinkOtherDevices, boolean

Device unlinking feature:

  • true — the current device can unlink other devices
  • false — the current device can unlink itself only

notFoundStatusProcessing, string

The action of the application when the service account state changes to the TRIAL CLOSED:

  • authorize — open the login page;
  • blockedDialog — block the interaction with UI and display the corresponding message;
  • closableBlockedDialog — display the warning message and close the application;
  • webView — not used

showInitialWizardIfAuthorizationFailed, boolean

Flag to open Initial Wizard in case of failed authorization

lowEndDevice, boolean

Flag to disable the UI animation in the player

cacheEnabled, boolean

Flag to cache EPG data in the indexDB

useSystemLangOnStartup, boolean

For Smart TVs only. Flag to use the Smart TV UI language at the first launch of the SmartTUBE app. If the Smart TV UI language is not supported by the app, the default language from the “lang” setting is used.

canOpenLink, boolean

Flag to allow links to be opened

playerInterfaceWakeOnMouse, integer

Delay in mouse pointer response to mouse awakening, ms.

preloadUrls, {object}

Settings for the applications’ preload. Construct a type with a set of properties K of type T

tv

dispose, boolean

preload, number

applications

dispose, boolean

preload, number

grid

dispose, boolean

preload, number

search

dispose, boolean

preload, number

my-feed

dispose, boolean

preload, number

vod

dispose, boolean

preload, number

home

dispose, boolean

preload, number

closableBlockedDialog, boolean

Flag to allow the subscriber to close the “Your service account is closed” dialog box when the state of his account changes to “CLOSED”.

rebootInterval, integer

The waiting time for user actions before the automatic restart after changing the account status to “CLOSED” and displaying the corresponding dialog box, in seconds.

playerResumeDialogTimeout, integer

Time (in sec) to display the dialog “Continue watching from the last saved position?”

showProgramStatusInGrid, boolean

Flag to display the “TSTV”, “NPVR”, “Reminder” labels on programs in the grid EPG

accessLevelType, string

Folder name (in skins) with a set of access levels

paymentRule, string

Reaction to an attempt to play not subscribed/purchased content:

  • sdp — standard subscription/purchase process (via SmartTUBE SDP)
  • webView — open a WebView. The URL for the WebView is configured by the SmartLabs developing team for each customer individually.
  • dialog — open a dialog box with the paymentText or paymentText_{language_code} message and the paymentImage image

paymentText, string

Default text of the dialog box for the “paymentRule”: “dialog”

paymentText_{language code}, string

Localized text of the dialog box for the “paymentRule”: “dialog”. For example, “paymentText_cz”: “Nejste podepsaní. Prosím, zaregistrujte se na našich webových stránkách.”

paymentImage, string

URL of the dialog box image for the “paymentRule”: “dialog”

allowChangeChannelSortType, boolean

Flag to allow to change the sorting type (user / operator) in the channel list

canRenameDevicesOnDevicesPage, boolean

Allow the subscriber to rename linked devices in the Settings > Devices > My device menu

prependEpisodeNameWithSeasonEpisodeNumbers, boolean

Flag to hide the prefix S(# of season)E(# of episode) before the episode name in the player and list of episodes.

searchHistoryBufferSize, integer

Number of items in the search history

searchHintsSize, integer

Number of the search suggestions

emptySearchHintsSize, integer

Number of the search suggestions for the empty search

mediaPositionLimit, {object}

The maximum number of media positions in the “Continue watching …” rails for movies, TSTV programs, and nPVR recordings.

meta, integer

The maximum number of media positions for the “Continue watching movies” rail

tstv, integer

The maximum number of media positions for the “Continue watching programs” rail

npvr, integer

The maximum number of media positions for the “Continue watching recordings” rail

useNewMy, boolean

Flag to enable the new “My” screen

toggleActiveIcons, boolean

Flag to use the active/inactive icons

grid, {object}

EPG Grid settings

movies, {object}

Grid settings for movies

itemsSpacingBottom, number

showPlayerInGrid, boolean

Flag to display the mini-player on the EPG screen. It displays the ongoing TV show above the program guide next to the program description.

epgGridLeft, number

Left border of the EPG Grid from the current moment, in minutes.

epgGridScale, number

Width of the EPG Grid, in minutes.

remoteEventThrottleTime, number

Throttle time for a remote control

showDvrBadgeOnChannels, boolean

Show DVR badges on a channel

showVODTotalCount, boolean

Show the total count of VoD items

keysUrl, {object}

Key to URL mapping. Allowed values: home, tv, grid, mosaic, video-libraries, movies, applications, applications/weather, applications/currencies, applications/radio, radio, settings, settings/profile/:id, continue-watching, player/:mode/:id, player, program/:id, movie/:id, npvr/:id, my-feed, my, search, profiles.

showProfileSelectOnHome, boolean

Flag to display the Profile switching icon on the Home screen

hideSendReportButton, boolean

Flag to hide the Send Peport button in the Settings menu

tvChannelOpenTimeout, integer

Delay to wait for the key event (e.g. RC button press) before enable a channel stream, in ms.

showLoginHint, boolean

Default value: false

Flag to display a tooltip on the login page

loginFailureMsgTimeout, integer

Default value: 1500

Time for displaying a tooltip when a user attempts to log in unsuccessfully, in ms.

date, {object}

Date and time format for various UI objects. Please, use a time pattern string of the format described here: https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

date, string

Date format for the Purchases page

defaultFormat, string

Default date format

epgheader, string

Date header format for the TV page

gridDate, string

Date format for the pointer in the upper left corner of the EPG grid

messageDate, string

Date format for the list of messages

programdate, string

Date format for the list of program series and program reminder

programinfo, string

Date format for the program details page

statusbar, string

Date format for the status bar

time, string

Date format for the start/end date of the program in the player, program time in the EPG grid, and on the Purchases page (when the program is purchased).

timeSeconds, string

Date format for the media positions and status bar pointer in the player when rewinding

npvrProgramInfo, string

Date format for the nPVR program details page

npvrFeed, string

Date format for the nPVR program rail (“Continue watching” )

availableTill, string

Format for the date of availability of a package/subscription

dateTime, string

Date format for the programs on the Search page

weatherInfo, string

Date format for the weather forecast

weatherForecastInfo, string

Date format for the weather forecast details

currenciesInfo, string

Date format for the current exchange currency rate

currenciesChart, string

Date format for the exchange currency rate chart

shortDateFormat, string

Default value: “EEE dd MMM”

Date format for the SmartTUBE apps for mobile devices (starting from v8.xx). Date, not time. Please, specify time format with the timeFormat parameter.

timeFormat, string

Default value: “HH:mm”

Time format for the SmartTUBE apps for mobile devices (starting from v8.xx)

brandName, string

Operator’s brand name for the Support page

operatorPage, string

URL of the operator web site for the Support page

operatorSupportPhone, string

Operator tech support phone number for the Support page

operatorEmail, string

Operator e-mail address for the Support page

mobileQRCodeUrl, string

URL of the QR code with a link to the operator’s SmartTUBE app for mobile iOS/Android devices

mediaPlayersConfigs, {object}

Settings for integrated media players

shaka, {object}

Settings for the Shaka player. Most of parameters in this sections are bounded to the same-name parameters of the Shaka player’s original config. Their description can be found here.

streaming, {object}

Settings of the stream processing

bufferBehind, integer

The amount of content the player keeps in buffer behind the playhead. For example, if this is 30, the player keeps 30 seconds of content buffered behind the video’s current time. When it have more than 30 seconds buffered behind, content will be removed from the start of the buffer to save memory. This is a minimum; if the stream’s max segment size is longer than the bufferBehind, then that will be used instead.

bufferingGoal , integer

The amount of content the player tries to buffer. For example, if this is set to 30, the player fetches segments until it have at least 30 seconds buffered.

safeSeekOffset, integer

The amount of seconds that should be added when repositioning the playhead after falling out of the availability window or seek. This gives the player more time to buffer before falling outside again, but increases the forward jump in the stream skipping more content. This is helpful for lower bandwidth scenarios. Defaults to 5 if not provided.

inaccurateManifestTolerance, integer

The maximum difference, in seconds, between the times in the manifest and the times in the segments. Larger values allow us to compensate for more drift (up to one segment duration). Smaller values reduce the incidence of extra segment requests necessary to compensate for drift.

stallEnabled, boolean

When set to true, the stall detector logic will run. If the playhead stops moving for stallThreshold seconds, the player will either seek or pause/play to resolve the stall, depending on the value of stallSkip.

stallThreshold, number

The maximum number of seconds that may elapse without the playhead moving (when playback is expected) before it will be labeled as a stall.

stallSkip, number

The number of seconds that the player will skip forward when a stall has been detected. If 0, the player will pause and immediately play instead of seeking. A value of 0 is recommended and provided as default on TV platforms (WebOS, Tizen, Chromecast, etc).

rebufferingGoal, number

The minimum number of seconds of content that the StreamingEngine must buffer before it can begin playback or can continue playback after it has entered into a buffering state (i.e., after it has depleted one more more of its buffers).

manifest, {object}

Settings of the manifest processing

defaultPresentationDelay, integer

A default presentationDelay (native Shaka setting) value. For DASH, it’s a default presentationDelay value if suggestedPresentationDelay (native Shaka setting) is missing in the MPEG DASH manifest. The default value is 1.5 * minBufferTime (native Shaka setting) if not configured or set as 0. For HLS, the default value is 3 segments duration if not configured or set as 0. For more details, please see the link: https://shaka-player-demo.appspot.com/docs/api/shaka.extern.html

dash, {object}

Settings for the DASH manifest processing

ignoreMinBufferTime, boolean

If true will cause the DASH parser to ignore minBufferTime (native Shaka setting) from manifest. It allows player config to take precedence over manifest for rebufferingGoal (native Shaka setting). Defaults to false if not provided. For more details, please see the link: https://shaka-player-demo.appspot.com/docs/api/shaka.extern.html

disableXlinkProcessing, boolean

If true, xlink-related processing will be disabled. Defaults to false if not provided.

abr, {object}

defaultBandwidthEstimate, integer

The default bandwidth estimate to use if there is not enough data, in bit/sec.

restrictions, {object}

An object describing application restrictions on what tracks can play. All restrictions must be fulfilled for a track to be playable/selectable. The restrictions system behaves somewhat differently at the ABR level and the player level, so please refer to the documentation for those specific settings. See also the description of the “rule” parameter and configuration example.

value, {object} 

List of restrictions.

minWidth, number

The minimum width of a video track, in pixels.

maxWidth, number

The maximum width of a video track, in pixels.

minHeight, number

The minimum height of a video track, in pixels.

maxHeight, number

The maximum height of a video track, in pixels.

minPixels, number

The minimum number of total pixels in a video track (i.e. width * height).

maxPixels, number

The maximum number of total pixels in a video track (i.e. width * height). For Tizen and WebOS platforms, you can set the value to 2073600 (1920х1080) or 1296000 (1080х720) if needed.

minFrameRate, number

The minimum framerate of a variant track.

maxFrameRate, number

The maximum framerate of a variant track.

minBandwidth, number

The minimum bandwidth of a variant track, in bit/sec.

maxBandwidth, number

The maximum bandwidth of a variant track, in bit/sec.

hlsjs, {object}

Settings for the HLS.js player (https://hls-js.netlify.app/demo/)

maxBufferLength, integer

Maximum buffer length in seconds. If buffer length is/become less than this value, a new fragment will be loaded. This is the guaranteed buffer length hls.js will try to reach, regardless of maxBufferSize.

maxMaxBufferLength, integer

Maximum buffer length in seconds. Hls.js will never exceed this value, even if maxBufferSize is not reached yet.

hls.js tries to buffer up to a maximum number of bytes (60 MB by default) rather than to buffer up to a maximum nb of seconds. This is to mimic the browser behaviour (the buffer eviction algorithm is starting after the browser detects that video buffer size reaches a limit in bytes)

maxBufferLength is the minimum guaranteed buffer length that hls.js will try to achieve, even if that value exceeds the amount of bytes 60 MB of memory. maxMaxBufferLength acts as a capping value, as if bitrate is really low, you could need more than one hour of buffer to fill 60 MB.

maxBufferSize, integer

‘Minimum’ maximum buffer size in bytes. If buffer size upfront is bigger than this value, no fragment will be loaded.

cobalt, {object}

Settings for the Cobalt player

args, {object}

General settings

allowLivePlaybackSpeedControl, boolean

Default value: false

Flag to allow control over the playback speed during live playback

restorePosOnRestart, boolean

Flag to restore the playback position on restart

networkBitrateLimit, number (long)

Maximum bitrate allowed for network playback

networkBitrateLimitContentCoeff, number (float)

Content coefficient for the network bitrate limit

dashAccumulateDynamicManifest, boolean

Flag to accumulate dynamic manifest (i.e. segments that are not presented in the manifest anymore for args.dashAccumulateDynamicManifestDurationMs but not more than time shift buffer size value)

dashAccumulateDynamicManifestDurationMs, number

See the args.dashAccumulateDynamicManifest parameter

dashAccumulateDynamicManifestThresholdUs, number

Threshold for overlaps between segments to be considered as a sequence (if actual overlap is more than this value then new coming segments is considered as a duplicate) during accumulation.

player, {object}

Player settings

quickStart, boolean

  • true: Re-use decoder and DRM sessions from previous stream if possible.
  • false: Always reinitialize player.

Recommended to set false while debugging stream start issues.

webos, {object}

Settings for the WebOS environment

tizen, {object}

Settings for the Tizen environment

sml, {object}

Settings for the SmartLabs sml STBs

kreatv, {object}

Settings for the KreaTV platform.

ficusAddress, string

HTTP address:port of the Ficus.

DashConfig, {object}

Config on how to handle the DASH protocol.

Manifest, {object}

Configuration on how to handle the manifest file.

Retry, {object}

Retry parameters to download the MPD file.

@attributes.maxAttempts, integer

Specify the number of attempts to retry downloading a file on failure. If the value is 2, the maximum number of download attempts will be 3. If the value is 0, never retry downloading on failure.

@attributes.interval, integer

Specifies the time delay (in milliseconds) before the next attempt at downloading the same file.

Stream, {object}

Configuration on how to handle stream segments.

@attributes.initialSelectionStrategy, string

The strategy on how to select the first stream to play in DASH:

  • maintain_bandwidth: The Representations are selected by referring to the bandwidth of the Representations played in the previous session. If this is the first playback, the lowest_bandwidth strategy is applied. If the stream is from a URL different from that of the last DASH playback, the lowest_bandwidth strategy is applied.
  • lowest_bandwidth: The Representation with the lowest bandwidth in the candidate Adaptation Sets will be selected. For video, if HEVC Adaptation Set exists, the candidates are the HEVC Adaptation Sets; otherwise, all video Adaptation Sets are candidates.

@attributes.bandwidthSelectionMode, string

Specifies the mode of DASH bandwidth selection algorithm in Adaptive Bit-Rate (ABR) playback. The algorithm selects proper bandwidth based on bit rate measurement and buffer level:

  • standard: Select a bandwidth that is less than and closest to the measured bit rate (after smoothing).
  • conservative: Select a lower bandwidth than that of “standard” mode in order to keep a higher buffer level and be less likely to underflow in case of poor network performance.
  • auto: The algorithm will start in “standard” mode, but can toggle to “conservative” if the bandwidth measurements are inconsistent.

Retry, {object}

Retry parameters to download media segments.

@attributes.maxAttempts, integer

Specify the number of attempts to retry downloading a file on failure. If the value is 2, the maximum number of download attempts will be 3. If the value is 0, never retry downloading on failure.

@attributes.interval, integer

Specifies the time delay (in milliseconds) before the next attempt at downloading the same file.

MinBufferTime, integer

The minimum amount of content (in milliseconds) to buffer before starting DASH playback. The value can be set to -1, 0, or a positive integer.

  • -1: Apply the minBufferTime attribute parsed from DASH MPD.
  • 0: Start playback when the first I-Frame has been received.

BufferTimeAhead, integer

Defines the desired amount of content (in milliseconds) to buffer from the current position for DASH playback. The value should be larger than the value of MinBufferTime.

Specifying a too low value might affect the playback experience in case of network jerkiness, while a too large value may cause the STB to be busy in downloading segments at the start of playback.

If the value is so large that the memory reserved for DASH playback is not enough, the prebuffering stops when buffer is full. If the value is less than the minimum buffer time (defined by the MinBufferTime element of this configuration, or the MPD attribute minBufferTime when the value of MinBufferTime is -1), STB will choose the larger one of twice the minimum buffer time and the default value.

ResolutionLimitation, string

Defines the maximum resolution of playback representation. If no representation is within the limitation, the representation with the lowest resolution will be selected. If the value is not defined, then the representation is selected automatically, based on the bandwidth, resolution and codec, etc. Acceptable values:

  • SD: The maximum resolution of playback representation is 720×576.
  • HDready: The maximum resolution of playback representation is 1366×768.
  • HD: The maximum resolution of playback representation is 1920×1080.
  • UHD: The maximum resolution of playback representation is 3840×2160.

[channel ID], {object}

Integrated media player settings depending on a channel

[npvr program ID], {object}

Integrated media player settings depending on an nPVR program

[movie ID], {object}

Integrated media player settings depending on a movie

[trailer ID], {object}

Integrated media player settings depending on a trailer

[radio channel ID], {object}

Integrated media player settings depending on a radio channel

googleReCaptchaConfig, {object}

Settings for interaction with the Google ReCaptcha service

publicKey, string

Public key for interaction with the service

privateKey, string

Private key for interaction with the service

showLoginCaptcha, boolean

Flag to enable the Google ReCaptcha at the login stage

analyticsProviders, array[{object}]

Settings of analytics providers

provider, string

ID of the analytics provider

config, {object}

Individual settings for specified analytics provider

url, string

Endpoint URL of the analytics provider

timeout, integer

Analytics provider response timeout, in ms.

batchInterval, integer

Interval of batch sending of CHUNK_LOADED events to SmartCARE, in seconds. Allows the network stack not to be overloaded by sending single events. If 0, the event is sent with every chunk. Used only if “analyticsProviders.provider”: “smartcare”.

sendChunkUrl, boolean

Flag to send the chunk URL (the url parameter) within the CHUNK_LOADED event to SmartCARE. Used only if “analyticsProviders.provider”: “smartcare”.

sendPlaylistUrl, boolean

Flag to send the playlist URL (the url parameter) within the PLAYLIST_LOADED event to SmartCARE. Used only if “analyticsProviders.provider”: “smartcare”.

cpuCheckInterval, integer

Periodicity of sending CPU_LOAD event to SmartCARE, in sec. The event is sent, if only the current measured CPU usage value differs from the previous one. The difference between these values, which is sufficient to send the event, is set by the parameter cpuPercentsDiff. Used only if “analyticsProviders.provider”: “smartcare”.

cpuPercentsDiff, integer

Percentage difference between the current and previous values of CPU usage, which is sufficient to send the CPU_LOAD event to SmartCARE (see the cpuCheckInterval parameter). If set 0, the event is sent just by timer with the cpuCheckInterval periodicity. Used only if “analyticsProviders.provider”: “smartcare”.

memCheckInterval, integer

Periodicity of sending MEMORY event to SmartCARE, in sec. The event is sent, if only the current measured RAM usage value differs from the previous one. The difference between these values, which is sufficient to send the event, is set by the parameter memPercentsDiff. Used only if “analyticsProviders.provider”: “smartcare”.

memPercentsDiff, integer

Percentage difference between the current and previous values of RAM usage, which is sufficient to send the MEMORY event to SmartCARE (see the memCheckInterval parameter). If set 0, the event is sent just by timer with the memCheckInterval periodicity. Used only if “analyticsProviders.provider”: “smartcare”.

memThresholdCheckInterval, integer

Periodicity of sending MEMORY_THRESHOLD event to SmartCARE, in sec. The event is sent, if only the current measured RAM usage value differs from the previous one. Used only if “analyticsProviders.provider”: “smartcare”.

wifiCheckInterval, integer

Periodicity of sending WIFI_STRENGTH event to SmartCARE, in sec. The event is sent, if only the current measured value of Wi-Fi signal strength differs from the previous one. The difference between these values, which is sufficient to send the event, is set by the parameter wifiPercentsDiff. Used only if “analyticsProviders.provider”: “smartcare”.

wifiPercentsDiff, integer

Percentage difference between the current and previous values of Wi-Fi signal strength, which is sufficient to send the WIFI_STRENGTH event to SmartCARE (see the wifiCheckInterval parameter). If set 0, the event is sent just by timer with the wifiCheckInterval periodicity. Used only if “analyticsProviders.provider”: “smartcare”.

bufsizeCheckInterval, integer

Periodicity of sending BUF_SIZE event to SmartCARE, in sec. The event is sent, if only the current measured value of buffer size differs from the previous one. The difference between these values, which is sufficient to send the event, is set by the parameter bufsizePercentsDiff. Used only if “analyticsProviders.provider”: “smartcare”.

bufsizePercentsDiff, integer

Percentage difference between the current and previous values of Wi-Fi signal strength, which is sufficient to send the BUF_SIZE event to SmartCARE (see the bufsizeCheckInterval parameter). If set 0, the event is sent just by timer with the bufsizeCheckInterval periodicity. Used only if “analyticsProviders.provider”: “smartcare”.

storageCheckInterval, integer

Periodicity of sending STORAGE_STATS event to SmartCARE, in sec. The event is sent, if only the current measured values of storage directories differs from the previous ones. Used only if “analyticsProviders.provider”: “smartcare”.

keepAliveInterval, integer

Periodicity of sending KEEP_ALIVE event to SmartCARE, in sec. Used only if “analyticsProviders.provider”: “smartcare”.

excludeEvents, array of strings

List of events not to send to SmartCARE. Allowable values are names of events in the SmartCARE End-User Device API (the e argument). Example: [“CHUNK_LOADED”, “PLAYLIST_LOADED”]. Used only if “analyticsProviders.provider”: “smartcare”.

loggerUrl, integer

URL of the logging server. You may send logs of the application (logLevel) only and logs of the Shaka media player additionally (player.logLevel).

logLevel, integer

Application’s logging level:

  • 0 — ERROR: there are problems that need to be solved. The error does not stop the app operation as a whole, other requests can work correctly;
  • 1 — WARNING: there are warnings that need to be taken into account. An unexpected action occurred, despite this, the system executed the request;
  • 2 — LOG: normal actions;
  • 3 — INFO: important expected actions;
  • 4 — DEBUG: actions needed for the app debugging;

drmTokenLazyThreshold, integer

Number of seconds before the expiration time of the DRM key to request its update

awakerConfig, {object}

Config for delayed network check on device wakeup

delayBetweenAwakingAndCheckingNetwork, number

forceAwakeDelay, number

cache, {object}

Setting of caching the movies’ and programs’ metadata

programByID, {object}

max, integer

Number of last added programs to store in the cache

metaByID, {object}

max, integer

Number of last added movies to store in the cache

sendSmartlabsIdHeader, boolean

Flag to include the “X-Smartlabs-Request-ID” header in each request to the SmartTUBE. This header contains a unique UUID for each request, which is used for end-to-end numbering of requests passing from end-user devices to SmartTUBE.

sendSmartlabsIdPlayerHeader, boolean

Flag to include the “http_x_smartlabs_mac_address” header in each request to the SmartTUBE

delayEpgUpdatesWhileContentIsPlaying, boolean

Flag to postpone the EPG update (upon notification) when the player is playing the content (to avoid lagging the player).  

useJwtAuth, boolean

Flag to use the JWT authorization

storeRedirect, {object}

Links to the app page in the app stores when opening the interface (redirect)

googlePlay, string

Link to the Google Play Market

appStore, string

Link to the Apple App Store

uhdSeparatePlatform, boolean

For Cobalt. Flag to send deviceType=ANDROIDTVUHD or ANDROIDTV depending on supported resolution by device or depending the setting Settings > System > UHD TV Support.

deviceTypeOverride, {object}

Settings for overriding the deviceType=ANDROIDTVUHD or ANDROIDTV arguments. See the uhdSeparatePlatform parameter.

ANDROIDTVUHD, string

Overriding the ANDROIDTVUHD device type

ANDROIDTV, string

Overriding the ANDROIDTV device type

androidDeviceType, string

Device type returned by device in the deviceType parameter when communicating via SmartTUBE End-User Device API.

supportDeviceTypeChange, boolean

Flag to display the Device Type option with the following values in the Settings menu:

  • IPTV (default) — returns STB in the deviceType parameter when communicating via SmartTUBE End-User Device API;
  • OTT — returns OTTSTB.

If false, the device returns STB.

useUHDDeviceType, boolean

Flag to display the My service option with the following values in the Settings menu:

  • Multi-Screen TV — returns ANDROIDTVUHD in the deviceType parameter when communicating via SmartTUBE End-User Device API. Can be overridden using the androidUHDDeviceType property in the Server section.
  • Multi-Screen Lite — returns ANDROIDTV.

The app tries to detect UHD support for the device when it first starts up and sets Multi-Screen TV as the default setting.

terminalName, string

Set this string as terminalName on authorization if set

langToIso, {object}

Construct a type with a set of properties K of type T

profile, {object}

User profile settings

force, boolean

Flag for forcing the settings of the profile section:

  • falsethe settings are applied only when the application is launched for the first time. On subsequent launches, the settings saved in local storage are applied.
  • true the settings are applied on the first and subsequent launches. The settings in local storage are ignored.

disableSubtitles, boolean

Flag to disable subtitles by default

textTrackSort, array of {“type”:”string”}

Default sorting of subtitle tracks. For example, “textTrackSort”: [“sq”, “en”]

userTextTrackSort, boolean

Flag to use the sorting set by the textTrackSort parameter

audioTrackSort, array of {“type”:”string”}

Default sorting of audio tracks by language. For example, “audioTrackSort”: [“sq”, “en”]

userAudioTrackSort, boolean

Flag to use the sorting set by the audioTrackSort parameter

doubleOkClosesTvPane, boolean

Flag for configuring the closing of the TV channel panel in the player by clicking the OK button on the remote control:

  • true Up and Down buttons only scroll through the channel list, the first OK click starts the channel broadcast, the second OK click closes the panel;
  • false — channels are switched when scrolling through the channel list using the Up and Down buttons, the first OK click closes the panel.

preferredAudioCodecList, string

For STBUI only. Default sorting of audio tracks by a codec. For example, “preferredAudioCodecList”: “aac,mpeg2”. The values must match the codecs parameter of the audio track.

mapDvbToSdpChannels, boolean

Flag to map DVB channels to the SmartTUBE SDP channels. This way you can use the channel icons and descriptions for DVB channels from the SmartTUBE SDP.

pushNotificationsEnabled, boolean

Flag to enable the Push notifications for the Simple and Event-driven notifications by default

showLoginCaptcha, boolean

Default value: false

Flag to enable the captcha on the Log in screen

maxRunTime, number

Default value: -1 (not set)

The STB uptime (in hours) after which the SmartTUBE app restarts after returning from standby mode. The STB does not restart in run mode, even after the specified uptime has elapsed. Applicable for STBs with STBUI app only.

registerHelp, {object}

Settings for the info button (“How to register?”, “Help”, etc.) on the authorization page. Example:

“registerHelp”: {
“el”: {
  “label”:
“πώς να εγγραφείτε?”,
  “url”:
“base://license.txt”
},
“en”: {
  “label”:
“How to register?”,
  “url”:
“base://license.txt”
},
“ru”: {
  “label”:
“Rак зарегистрироваться?”,
  “url”:
“base://license.txt”
}

}

[language_id], {object}

Button label and text settings for the UI language specified by the {language_id}. Language is defined by 2-letter language code ISO 639-1:2002.

label, string

Button label

url, string

URL of the text to be opened when the button is clicked

licensePath, {object}

Simplified settings for the license text displayed in the setup wizard. Example:

[language_id], string

URL of the license text to be opened for the UI language specified by [language_id]. Language is defined by 2-letter language code ISO 639-1:2002.

licensePath, string

URL of the license text to be opened in the setup wizard. Example: “licensePath”: “base:///license.txt”

noScrollPastInGrid, boolean

Flag to disable scrolling back in time in the EPG grid

showBannersTrailerWithoutOffset, boolean

Flag to take in account the aspect ratio of the movie trailer when displaying it on the Home screen under the trailer-enabling banner. If true, the application takes into account the aspect ratio of the stream and, based on it, displays the video in width on the full screen, and in height — from the top edge of the screen to the value calculated by the aspect ratio of the video stream. For example, if the trailer has an aspect ratio of 21:9, the image will be pushed to the top edge and there will be a black bar at the bottom.

syslog, {object}

Logging settings for syslog

params, [array{object}]

Parameters of the syslog configuration. Recommended configuration:

// Note: JSON is an uncommented format. Please remove the comments below in the actual configuration to avoid malfunctions.

“syslog”: {
“params”: [
  {
    “name”:
“Device.SyslogClient.Enabled”, // Flag to enable the syslog data transferring
    “type”:
“xsd:boolean”,
    “val”:
“1” // 1 – enabled; 0 – disabled
  },
  {
    “name”:
“Device.SyslogClient.Protocol”, // Protocol for transferring logs to the server
    “type”:
“xsd:string”,
    “val”:
“tcp” // tcp or udp
  },
  {
    “name”:
“Device.SyslogClient.ServerHost”, // Host name of a server receiving the syslog data
    “type”:
“xsd:string”,
    “val”:
“elkexample.net”
  },
  {
    “name”:
“Device.SyslogClient.ServerPort”, // Port of a server receiving the syslog data
    “type”:
“xsd:unsignedInt”,
    “val”:
“10514”
  },
  {
    “name”:
“Device.SyslogClient.Format”, // Format of the syslog data
    “type”:
“xsd:string”,
    “val”:
“syslog-ng”
  },
  {
    “name”:
“Device.SyslogClient.UseMac”, // Flag to use the device’s MAC address
    “type”:
“xsd:boolean”,
    “val”:
“1”
  }
 
  ]

}

isDownloadOfflineEnabled, boolean

Default value: false

Flag to allow users to download VoD content to a device and watch it offline. To enable this feature, the VoD content asset must have the downloadEnabled property enabled (SmartTUBE Admin Console > Content > Movies / Episodes > [specific movie details] > Assets tab > [specific asset details] > Download enabled option).

Example Configuration

{
“baseUrl”:
“”,
“apiUrl”:
“/api/v1”,
“getSettingsPath”:
“/managerapi/manager/getSettingsPath?output=json&board=${deviceType}&mac=${uuid}&current_firmware_version=${appMajorMinorVersion}&currentVersion=${appMajorMinorVersion}”,
“title”:
“”,
“tenant”:
“”,
“configsUrl”:
“”,
“lang”:
“en”,
“langs”: [
 
“en”,
 
“ru”
],
“epg”: {
  “before”:
5,
  “after”:
5
 
},
“player”: {
  “ads”: {
    “playback”: [
      { “value”:
“single”
      }
    ],
    “xml”: [
      { “value”:
“external”,
       “rule”:
“platform = cobalt”
      },
      {
        “value”:
“native”
      }
    ]
   
  },
  “maxSaveAdvertismentTimeout”:
3600,
  “startSeekSpeed”:
5,
  “maxSeekSpeed”:
60,
  “seekMultiplier”:
1.2,
  “thumbnailWidth”:
0,
  “thumbnailHeight”:
0,
  “allowSeekAfterLive”:
300,
  “checkProgramAccessLevelWhileSeeking”:
true,
  “limitPrevNonRecordable”:
300,
  “limitNextNonRecordable”:
300,
  “keepAlivePlayEvent”:
120,
  “movieMinTime”:
2,
  “minSecToReloadAfterPause”:
10,
  “defaultAspectRatio”: [
    {
      “value”:
“fullscreen”,
      “rule”:
“platform = webos”
     
    },
    {
      “value”:
“letterbox”
     
    }
   
  ],
  “secMediaPositionIgnore”:
60,
  “openLastViewedChannelOnStartup”:
false,
  “adaptiveChannelsBitrateIntervals”: {
    “AVERAGE”: [
     
-1,
     
512000
    ],
    “GOOD”: [
     
512001,
     
1228800
    ],
    “HIGH”: [
     
1228801,
     
2867200
    ],
    “EXCELLENT”: [
     
2867201,
     
-1
    ]
   
  },
  “adaptiveVoDBitrateIntervals”: {
    “VERY_LOW”: [
     
-1,
     
600000
    ],
    “LOW”: [
     
600001,
     
1200000
    ],
    “AVERAGE”: [
     
1200001,
     
1400000
    ],
    “GOOD”: [
     
1400001,
     
1800000
    ],
    “HIGH”: [
     
1800001,
     
2800000
    ],
    “EXCELLENT”: [
     
2800001,
     
-1
    ]
   
  },
  “defaultPlayer”: [
    {
      “value”:
“shaka”
     
    },
    {
      “value”:
“cobalt”,
      “rule”:
“platform = cobalt”
     
    }
   
  ],
  “playbackOptimizations”: {
    “shaka”: {
      “ac3ignore”: [
        {
          “value”:
false
         
        },
        {
          “value”:
true,
          “rule”:
“platform = tizen & platformVersion < 4 & platform = tizen & platformVersion > 2”
         
        }
       
      ],
      “notCleanDRM”: [
        {
          “value”:
false
         
        },
        {
          “value”:
true,
          “rule”:
“platform = webos & platformVersion < 5”
         
        }
       
      ]
     
    }
   
  },
  “logLevel”:
0,
  “openTVChannelsInPlayerByOkButton”:
false,
  “renderInterfaceAfter”: [
    {
      “value”: {
        “event”:
“play”,
        “timeout”:
6
       
      }
     
    },
    {
      “value”: {
        “event”:
“open”,
        “timeout”:
1
       
      },
      “rule”:
“platform = browser | platform = cobalt”
     
    }
   
  ],
  “progressbarMarginX”: {
    “default”: {
      “left”:
5,
      “right”:
5
    }
   
  },
  “vodStartTimeString”: {
    “type”:
“timeFromStart”,
    “format”:
“[hh:mm]or[mm:ss]”
   
  },
  “vodEndTimeString”: {
    “type”:
“timeToEnd”,
    “format”:
“[hh:mm]or[mm:ss]”
   
  }
 
},
“messages”: {
  “autohideSetRead”:
true,
  “usePopupMessageFlag”:
false
 
},
“appVersion”:
“desktop”,
“channelContentProvider”:
“INTERNAL”,
“contentProviders”: [
  {
    “key”:
“INTERNAL”,
    “provider”:
“smartlabs”,
    “config”: {
    }
   
  }
 
],
“ux”: {
  “subscribeOnlyFromService”:
false,
  “tvProgramFilter”:
true,
  “filtersDimensions”: {
    “tv”: {
      “filter”: {
        “default”:
11
       
      },
      “subFilter”: {
        “default”:
16
       
      }
     
    },
    “movies”: {
      “filter”: {
        “default”:
14
       
      },
      “subFilter”: {
        “default”:
15
       
      }
     
    }
   
  },
  “speedTest”: {
    “url”:
“${baseUrl}/speedtest.dat”,
    “engine”: [
      { “value”:
“xhr”,
       “rule”:
“platform = webos”
      },
      {
        “value”:
“fetch”
      }
    ],
    “duration”:
10000,
    “sizeInBytes”:
1e7,
    “useFakePostfix”:
true
   
  },
  “channelDigits”:
3,
  “isRecordStartedProgram”:
true,
  “keyboardFullscreen”: [
  ],
  “keyboardSearch”: [
  ],
  “playerBackground”: [
    {
      “value”:
true
     
    },
    {
      “value”:
false,
      “rule”:
“platform = webos | platform = tizen | platform = hisense”
     
    }
   
  ],
  “replaceLogoOnMovieByProvider”: [
    ‘hbo’,
    ‘tvbox’,
    ‘megogo’
  ],
  “uiDebounceTime”:
600,
  “showTvLegend”:
false,
  “npvrQuotaStatus”:
true,
  “requirePinOnStart”:
true,
  “requirePinOnAwake”:
true,
  “selectChannelOnEpgGridViaRemote”:
false,
  “vodCategoriesVersion”:
“v2”,
  “mosaicBackgroundUrl”:
“assets/background-m.png”,
  “beanfieldEPG”:
false,
  “isUseOldNpvr”:
false,
  “canRemoveNpvrItem”:
true,
  “shouldFilterTracks”:
false,
  “preferredNativeLangPronounce”:
true,
  “showXXXMoviesInPurchaseList”:
true,
  “openPlayerOnLastWatched”:
false,
  “watchedContentDuration”:
90,
  “seekingDelayInitial”: [
    {
      “value”:
400
     
    },
    {
      “value”:
600,
      “rule”:
“platform = webos & platformVersion < 5”
     
    }
   
  ],
  “seekingDelayLongPress”: [
    {
      “value”:
700
     
    },
    {
      “value”:
10000,
      “rule”:
“platform = webos & platformVersion < 5”
     
    }
   
  ],
  “ratings”:
false,
  “checkUnsupportedBrowser”: [
    {
      “value”:
true,
      “rule”:
“platform = browser”
     
    },
    {
      “value”:
false
     
    }
   
  ],
  “showIconChannelLock”:
true,
  “shouldTerminateOnBack”:
false,
  “deliveryRuleVisible”:
true,
  “standbyTimers”: [
   
1,
   
2,
   
3,
   
4
  ],
  “defaultStandbyTimer”:
2,
  “standbyModalTimer”:
300,
  “switchToLiveModalTimerSecs”:
30,
  “playNowProgramFromGrid”:
false,
  “alwaysRequirePinOnProfileEdit”:
false,
  “setupWizardSteps”: [
    {
      “value”: [
        {
          “key”:
“language”
         
        },
        {
          “key”:
“license”,
          “licensePath”:
“base:///license.txt”
         
        }
       
      ],
      “rule”:
“platform = cobalt”
     
    },
    {
      “value”: [
      ]
     
    }
   
  ],
  “hidePassword”:
true,
  “useHTMLInputElement”: [
    {
      “value”:
true,
      “rule”:
“platform = browser”
     
    },
    {
      “value”:
false
     
    }
   
  ],
  “canUnlinkOtherDevices”:
true,
  “notFoundStatusProcessing”:
“authorize”,
  “showInitialWizardIfAuthorizationFailed”:
false,
  “lowEndDevice”: [
    {
      “value”:
false
     
    },
    {
      “value”:
true,
      “rule”:
“platform = webos & platformVersion < 4 | platform = tizen & platformVersion < 4”
     
    }
   
  ],
  “cacheEnabled”:
true,
  “useSystemLangOnStartup”:
true,
  “canOpenLink”: [
    {
      “value”:
false
     
    },
    {
      “value”:
true,
      “rule”:
“platform = browser | platform = cobalt”
     
    }
   
  ],
  “playerInterfaceWakeOnMouse”: [
    {
      “value”:
350
     
    },
    {
      “value”:
2000,
      “rule”:
“platform = webos”
     
    }
   
  ],
  “closableBlockedDialog”:
false,
  “rebootInterval”:
180,
  “playerResumeDialogTimeout”:
10000,
  “showProgramStatusInGrid”:
false,
  “accessLevelType”:
“core”,
  “paymentRule”:
“sdp”,
  “allowChangeChannelSortType”:
true,
  “canRenameDevicesOnDevicesPage”:
true,
  “prependEpisodeNameWithSeasonEpisodeNumbers”:
false,
  “searchHistoryBufferSize”:
100,
  “searchHintsSize”:
3,
  “emptySearchHintsSize”:
10,
  “mediaPositionLimit”: {
    “meta”:
50,
    “tstv”:
50,
    “npvr”:
50
   
  }
 
},
“date”: {
  “date”:
“dd.MM.yyyy”,
  “defaultFormat”:
“HH:mm:ss dd.MM.yyyy”,
  “epgheader”:
“EEEE, d MMMM”,
  “gridDate”:
“d MMM”,
  “messageDate”:
“dd.MM.yyyy ‘at’ HH:mm”,
  “programdate”:
“do MMMM ‘in’ HH:mm”,
  “programinfo”:
“EEE, do MMMM, HH:mm”,
  “statusbar”:
“EEEE, d MMMM, HH:mm”,
  “time”:
“HH:mm”,
  “timeSeconds”:
“HH:mm:ss”,
  “npvrProgramInfo”:
“d MMMM HH:mm”,
  “npvrFeed”:
“d MMM ‘at’ HH:mm”,
  “availableTill”:
“dd.MM.yyyy HH:mm”,
  “dateTime”:
“dd.MM ‘at’ HH:mm”,
  “weatherInfo”:
“d MMMM, EEEE”,
  “weatherForecastInfo”:
“dd.MM EEEE”,
  “currenciesInfo”:
“d MMMM”,
  “currenciesChart”:
“dd.MM”
 
},
“brandName”:
“Lime”,
“operatorPage”:
“smartlabs.tv”,
“operatorSupportPhone”:
“0000000”,
“operatorEmail”:
“help@smartlabs.tv”,
“mobileQRCodeUrl”:
“”,
“mediaPlayersConfigs”: {
  “shaka”: {
    “streaming”: {
      “safeSeekOffset”:
25,
      “inaccurateManifestTolerance”:
0
     
    },
    “manifest”: {
      “defaultPresentationDelay”:
10,
      “dash”: {
        “ignoreMinBufferTime”:
true
       
      }
     
    }
   
  },
  “hlsjs”: {
    “maxBufferLength”:
15,
    “maxMaxBufferLength”:
20,
    “maxBufferSize”:
20000000
   
  }
 
},
“googleReCaptchaConfig”: {
  “publicKey”:
“6LeG6uQZAAAAADNofsxQ7Sso-OhdFa8cbLG0feFt”,
  “privateKey”:
“6LeG6uQZAAAAAL-_gr6EGK71WQqrsXOCdI2HWYHW”
 
},
“showLoginCaptcha”:
false,
“analyticsProviders”: [
  {
    “key”:
“smartcare”,
    “provider”:
“smartcare”,
    “config”: {
      “url”:
“/smartcare/care”
     
    }
   
  },
  {
    “key”:
“console”,
    “provider”:
“console”
   
  }
 
],
“logLevel”: [
  {
    “value”:
3,
    “rule”:
“platform = cobalt”
   
  },
  {
    “value”:
2
   
  }
 
],
“drmTokenLazyThreshold”:
0,
“sendSmartlabsIdHeader”:
false,
“timeOffsetInMin”:
0,
“cache”: {
  “programByID”: {
    “max”:
10000
   
  },
  “metaByID”: {
    “max”:
100
   
  }
 
}
}

Change Log

JUNG 9.2

  • New parameters ux.showPlayerInGrid, ux.showLoginHint,  ux.loginFailureMsgTimeout supported.
  • New parameter ux.silentAutoplayOnBannersAndChannelRail is supported.
  • New parameter player.disableSkipBanForCurrentProgram  is supported.
  • Parameters showAdvBlockedPanel, nonSkipableAdvInterval, resetSkipAdvertTimeoutOnSwitch, ignoreSkipAdvertTimeoutForPl, maxSaveAdvertismentTimeout in the player section are deprecated.

iOS 9.1

  • New parameters canTerminalNameChange, canTerminalDelete, ux.hideBannersTitle are supported.

iOS 8.4.x

  • New parameters canTerminalNameChange, canTerminalDelete, ux.hideBannersTitle are supported.

JUNG 8.3.x

  • New parameters ux.showPlayerInGrid, noScrollPastInGrid, ux.epgGridLeft, ux.epgGridScale, ux.hideSendReportButton, player.playbackOptimizations.shaka.stopLiveBeforeOpen, ux.tvChannelOpenTimeout, showBannersTrailerWithoutOffset, noScrollPastInGrid, ux.epgGridLeft, ux.epgGridScale, ux.hideSendReportButton, player.playbackOptimizations.shaka.stopLiveBeforeOpen, ux.tvChannelOpenTimeout, showBannersTrailerWithoutOffset are supported.

JUNG 8.2

  • New parameters analyticsProviders.config.sendChunkUrl and analyticsProviders.config.batchInterval, syslog.params supported

JUNG 8.1

  • New parameter player.openChannelTSTVFromStart supported

STB-UI-5.37.57

  • New parameter preferredAudioCodecList supported

Home Screen

The Home screen of the SmartTUBE app for the large-screen platforms and web (aka JUNG) consists of several rails: banner, main menu, scrollable content rails (“Recommendations”, “Top channels”, “Best for you”, and so on).

You can configure the representation of each rail and their arrangement on the screen using two JSON files:

  • Home screen configuration file — home.json,
  • Main menu configuration file — home-menu.json.

The structure of the home.json file consists of a single section “lines”, which describes how the rails are filled in with content and how they are displayed on the screen.

The sequence of displaying rails on the Home screen is set by the sequence of their description in the file. The typical sequence is as follows: Banner, Main menu, Continue watching, Top 10 programs, Recommended movies/series, etc. — you can change it as you like.

{
  “lines”: [
      {
          “id”:
“banners”,
          “sources”: [
              {
                  “type”:
“banners”,
                  “feedUrl”:
“sdp://userfeed/banners”
              }
          ]
      },
      {
          “id”:
“menu”,
          “titles”: {
              “en”:
“Menu”,
              “cz”:
“Menu”
          },
          “default”:
true,
          “center”:
true,
          “sources”: [
              {
                  “type”:
“menu”
              }
          ]
      },
      {
          “id”:
“applications”,
          “titles”: {
            “en”:
“Applications”,
            “cz”:
“Aplikace”,
          },
          “preset”:
“app”,
          “component”: {
            “type”:
“ItemApp”
          },
          “sources”: [
            {
              “type”:
“applications”,
              “limit”:
7,
              “config”: {
                “applications”: [
                        {
                          “packageName”:
“com.google.android.youtube”,
                          “sortPosition”:
1
                        },
                        {
                          “packageName”:
“com.android.vending”,
                          “sortPosition”:
2
                        },
                        {
                          “packageName”:
“com.google.android.music”,
                          “sortPosition”:
3
                        }
                ],
                “sorting”:
“label”
              }
            }
          ]
      },
      {
        “id”:
“channels”,
        “titles”: {
          “en”:
“Channels”,
          “cz”:
“Kanály”,
        },
        “preset”:
“channelWithProgramInAir”,
        “videoPreview”: {
          “delay”:
5000,
          “muted”:
true
        },
        “sources”: [
          {
            “type”:
“programsInAir”,
            “component”: {
              “type”:
“NewItemChannel”
            },
            “feedUrl”:
“sdp://userfeed/channels”,
            “url”:
“/player/channel/${chId}”
          },
          {
            “type”:
“menu”,
            “items”: [
              {
                “id”:
“tv”,
                “filterId”:
“tv”,
                “titleLocale”:
“APPLICATION.MORE”,
                “path”:
“/tv”,
                “dontConsiderAsItem”:
true
              }
            ],
            “component”: {
              “type”:
“ItemMenu”,
              “params”: {
                “showBack”:
true
              }
            },
            “url”:
“${path}”
          }
        ]
      },
      {
          “id”:
“programs”,
          “titles”: {
              “en”:
“Top 10 Programs”
          },
          “sources”: [
              {
                  “type”:
“programs”,
                  “feedUrl”:
“sdp://userfeed/topPrograms”,
                  “limit”:
10
              }
          ]
      },
      {
          “id”:
“npvr”,
          “titles”: {
              “en”:
“Your Records”
          },
          “sources”: [
              {
                  “type”:
“npvr”
              }
          ]
      },
      {
          “id”:
“continueWatchingPrograms”,
          “titles”: {
              “en”:
“Continue Watching Programs”
          },
          “sources”: [
              {
                  “type”:
“continueWatching”,
                  “contentType”:
“programs”
              }
          ]
      },
      {
          “id”:
“continueWatchingMovies”,
          “titles”: {
              “en”:
“Continue Watching Movies”
          },
          “sources”: [
              {
                  “type”:
“continueWatching”,
                  “contentType”:
“movies”
              }
          ]
      },
      {
          “id”:
“continueWatchingProgramsMovies”,
          “titles”: {
              “en”:
“Continue Watching Programs and Movies”
          },
          “sources”: [
              {
                  “type”:
“continueWatching”
              }
          ]
      },
      {
          “id”:
“promo”,
          “titles”: {
              “en”:
“Best for You”
          },
          “sources”: [
              {
                  “type”:
“items”,
                  “feedUrl”:
“sdp://userfeed/items”,
                  “limit”:
20
              }
          ]
      },
      {
          “id”:
“recommendedVOD”,
          “titles”: {
              “en”:
“Recommended movies and series”
          },
          “sources”: [
              {
                  “type”:
“meta”,
                  “feedUrl”:
“sdp://userfeed/aliasMetaContent?lang=en&aliasName=recomVod”,
                  “limit”:
20
              }
          ]
      },
      {
          “id”:
“recommendedPrograms”,
          “titles”: {
              “en”:
“Recommended TV Programs”
          },
          “sources”: [
              {
                  “type”:
“programs”,
                  “feedUrl”:
“sdp://userfeed/aliasEpg?lang=en&aliasName=recomProgs”,
                  “limit”:
20
              }
          ]
      },
      {
          “id”:
“history”,
          “titles”: {
              “en”:
“Viewing History”
          },
          “sources”: [
              {
                  “type”:
“history”
              }
          ]
      }
  ]
}

Depending on the type, each rail has a specific set of parameters:

id — rail identifier

titles — rail titles in accordance with the UI language. Displayed above the rail.

<language ID> — Localized rail title in the format: “en”: “Continue Watching Programs” . 2-letter language code ISO 639-1:2002 is used.

default — Flag to focus this rail when starting the device or when going to the Home screen.

center — Flag to center the contents of the rail.

sources — Sources of content for the rail

type — Display style of a rail:

  • menu — Main menu

Parameters: none

Note: Configured with the separate file (see “Configuring the Main Menu”)

  • banners — Banner panel

Parameters: feedUrl

  • channels — User favorite channels and channels sorted by the operator in Admin Console

Parameters: feedUrl, limit

  • programs — Top viewed programs

Parameters: feedUrl, limit

  • npvr — list of nPVR records

Parameters: none

  • history — viewing history (movies, series and programs sorted by the last viewed time)

Parameters: none

  • continueWatching — incompletely viewed content

Parameters: contentType

  • items — “Best for you” recommendations (programs, movies, series, services, etc.)

Parameters: feedUrl, limit

  • meta — Movies or series with filters

Parameters: feedUrl, limit

  • applications — Android apps installed on a device

Parameters: sorting, limit

  • programsInAir — programs currently on the air

Parameters: feedUrl 

config.applications.packageName — Android application package name to display in the Applications rail. Other apps not listed and not sorted in this config are displayed sorted by the package name. You can switch the layout type of the app items in the rail (a classic app banner or an app icon with caption) using the ux.androidTvBanner parameter of the setup.json file.

config.applications.sortPosition — sorting position of the Android application in the Applications rail. Other apps not listed and not sorted in this config are displayed sorted by the package name.

sorting — sorting type for the Applications rail. Default sorting type — by the package name. Only for type = applications:

  • label — sort by the config.applications.sortPosition number.

feedUrl — URL of the content feed, specific to each type. Please, DO NOT CHANGE it, except feedUrl for custom rails (such as “Recommended movies and series” and “Recommended TV Programs”). For more details about configuring custom rails, see the article “Configuring Content Rails on Home Screen”.

contentType — Content type for the rail: programs or movies. Only for type = continueWatching.

limit — Max number of content items in the rail. Only for type = channels, programs, items, meta, applications.

videoPreview.delay — Delay before a screenshot of the current program changes to a video stream when user hover over a channel tile in the channel rail, in ms. Available only for the rails with sources.type: “programsInAir”

videoPreview.muted — Flag to mute the stream of the current program when user hover over a channel tile in the channel rail. Related to videoPreview.delay.

The content with the maximum access level (age rating) specified in the SmartTUBE Admin Console > Dictionaries > Access levels dictionary is not displayed in the rails throughout app’s UI.

Main Menu

The structure of the home-menu.json file is a list of objects, each of which describes one of the Main menu buttons — “TV”, “Movies”, “Series”, “Search”, “My”, etc. The sequence of buttons is set by the sequence of their description in the file. You can change it and hide some buttons as you like.

Image10


Main menu

We strongly recommend you do not change any settings inside objects and operate only with their sequence and visibility.

{
  “menuItems”: [
      {
          “moduleName”:
“TvModule”,
          “moduleArgs”:
“”,
          “itemIcon”:
“qrc:/images/icons/big_menu_tv.png”,
          “itemIconSelected”:
“qrc:/images/icons/big_menu_tv_active.png”
      },
      {
          “moduleName”:
“EpgGridModule”,
          “moduleArgs”:
“”,
          “itemIcon”:
“qrc:/images/icons/big_menu_grid.png”,
          “itemIconSelected”:
“qrc:/images/icons/big_menu_grid_active.png”
      },
      {
           “moduleName”:
“CatalogModule”,
           “moduleArgs”:
“movies”,
           “itemIcon”:
“qrc:/images/icons/big_menu_movies.png”,
           “itemIconSelected”:
“qrc:/images/icons/big_menu_movies_active.png”
       },
       {
           “moduleName”:
“CatalogModule”,
           “moduleArgs”:
“serials”,
           “itemIcon”:
“qrc:/images/icons/big_menu_serials.png”,
           “itemIconSelected”:
“qrc:/images/icons/big_menu_serials_active.png”
      },
      {
          “moduleName”:
“SearchModule”,
          “moduleArgs”:
“”,
          “itemIcon”:
“qrc:/images/icons/big_menu_search.png”,
          “itemIconSelected”:
“qrc:/images/icons/big_menu_search_active.png”
      },
      {
          “moduleName”:
“MyModule”,
          “moduleArgs”:
“”,
          “itemIcon”:
“qrc:/images/icons/big_menu_my.png”,
          “itemIconSelected”:
“qrc:/images/icons/big_menu_my_active.png”
      },
      {
          “moduleName”:
“ApplicationsModule”,
          “moduleArgs”:
“”,
          “itemIcon”:
“qrc:/images/icons/big_menu_applications.png”,
          “itemIconSelected”:
“qrc:/images/icons/big_menu_applications_active.png”
      },
      {
          “moduleName”:
“UsbModule”,
          “moduleArgs”:
“”,
          “itemIcon”:
“qrc:/images/icons/big_menu_usb.png”,
          “itemIconSelected”:
“qrc:/images/icons/big_menu_usb_active.png”
      },
      {
          “moduleName”:
“SettingsModule”,
          “moduleArgs”:
“”,
          “itemIcon”:
“qrc:/images/icons/big_menu_settings.png”,
          “itemIconSelected”:
“qrc:/images/icons/big_menu_settings_active.png”
      }
  ]
}

Movies/Series Catalog

VoD Sections Configuration. Step-by-step Guide.

When your subscribers open the “Movies” or “Series” section in the SmartTUBE apps’ UI they could see the following Default screen:

Image13


Movies” section

Clicking the “Left” button on remote control the subscriber can open the Filter panel:

Image5


“Movies” section with the Filter panel opened

As you can see, the “Movies” section includes 3 configurable areas:

  • Filter panel
  • Quick filter panel
  • Poster area

Their representation and filling is managed by the vod.json file, which consists of the following sections:

  • “filter” — describes the Filter Panel;
  • “quickFilter” — describes the Quick Filter Panel;
  • “presets” — describes the visual representation of poster area
  • “feeds” — describes the rules for filling content the poster area

The order of the sections in the file can be arbitrary.

The vod.json is applied simultaneously to the “Movies” and “Series” sections. Thus, their representation in the app’s UI will differ only in content.

Let’s configure areas one by one and start with the Filter panel.

Configuring the Filter Panel

The Filter panel usually contains a set of typical filters and sorts:

Image6


Filter panel

The “filter” section in this case will look as follows:

{
“filter”: [
  {
    “id”:
“genres”,
    “name”:
“Genre”
  },
  {
    “id”:
“years”,
    “name”:
“Years”
  },
  {
    “id”:
“countries”,
    “name”:
“Country”
  },
  {
    “id”:
“purchaseTypes”,
    “name”:
“Purchase type”,
    “exclusive”:
true
  },
  {
    “id”:
“providers”,
    “name”:
“Providers”,
    “exclusive”:
true
  },
  {
    “id”:
“sortings”,
    “name”:
“Sortings”,
    “exclusive”:
true,
    “values”: [
      {
        “id”:
“name”,
        “name”:
“Title”,
        “type”:
“customArgs”,
        “urlArgs”:
“sort=name”
      },
      {
        “id”:
“defaultRating”,
        “name”:
“Our rating”,
        “type”:
“customArgs”,
        “urlArgs”:
“sort=rating”
      },
      {
        “id”:
“releaseDate”,
        “name”:
“Release date”,
        “type”:
“customArgs”,
        “urlArgs”:
“sort=newRelease_desc”
      }
    ]
  }
],

id — filter ID. You can use either an arbitrary string value (as “sortings”) or one of the reserved values:

  • top10 — 10 most rated movies. You can specify any number after the top, e.g. top25, top33.
  • genres — filter by the genres
  • years — filter by the year ranges
  • countries — filter by country of production
  • purchaseTypes — filter by purchase type (subscription, transactional, advertisement)
  • providers — filter by content provider

name — filter name displayed in the SmartTUBE app

urlArgs — parameters of content filtering

type — content type: movies or series

genreId — list of genre IDs

providerId — list of content provider IDs

countryId — list of country IDs

accessLevelId — ID of the access level of the active profile

genreALevelId — ID of the access level of the genre

showcaseId — showcase ID

sort — sorting the content by:

  • name — the movie name
  • rating — the Default order field on the movie/series details page in the SmartTUBE Admin Console
  • startDate — the date when the movie became available for rental (in ascending order)
  • startDate desc (not a typo) — the date when the movie became available for rental (in descending order)
  • newRelease_desc — the movie release date

year — list of movie/series by production years. Examples of acceptable values: 2015 (one year), 2005,2007,2008 (several years), 2005-2015 (interval).

text — text for searching in the Name, Description and Original name fields

id — list of movie/series IDs

serviceId — ID of a metacontent bundle

rubricId — list of rubric IDs

exclusive — indicates that this filter could be selected exclusively, i.e. other filters in the group are reset.

Configuring the Quick Filter Panel

Configuring the Quick filters panel is similar to the Filter panel and differs only in some of the arguments described below. Unlike the Filter panel, it makes sense to add frequently used, trending and interesting filters here:

Image14


Quick filters panel

The “quickFilter” section in this case will look as follows:

“quickFilter”: [
  {
    “id”:
“openFilters”
  },
  {
    “id”:
“auto-genres”,
    “name”:
“Group by genre”,
    “selectFeed”:
“auto-genres”,
    “exclusive”:
true
  },
  {
    “id”:
“lastWatch”,
    “name”:
“Last watched”
  },
  {
    “id”:
“defaultRating”,
    “name”:
“Our choice”,
    “type”:
“customArgs”,
    “urlArgs”:
“sort=rating”
  },
  {
    “id”:
“top25”,
    “name”:
“Top 25”,
    “exclusive”:
true
  },
  {
    “id”:
“2022”,
    “name”:
“2022”,
    “type”:
“customArgs”,
    “urlArgs”:
“year=2022”
  },
  {
    “id”:
“Xmas Comedies”,
    “name”:
“Xmas Comedies”,
    “type”:
“customArgs”,
    “urlArgs”:
“genreId=47239&text=christmas”,
    “exclusive”:
true
  },
  {
    “id”:
“marvel”,
    “name”:
“Marvel”,
    “type”:
“customArgs”,
    “urlArgs”:
“showcaseId=41233”,
    “exclusive”:
true
  },
  {
    “id”:
“gameOfThrones”,
    “name”:
“Game of Thrones”,
    “type”:
“customArgs”,
    “urlArgs”:
“id=32047”,
    “exclusive”:
true
  },
  {
    “id”:
“sciFi”,
    “name”:
“Sci-Fi”,
    “selectFeed”:
“sci-fi”,
    “exclusive”:
true
  },
  {
    “id”:
“clearAllFilters”
  }
],

id — quick filter ID. You can use either an arbitrary string value (as “gameOfThrones”) or one of the reserved values:

  • openFilters — button to open the Filter panel
  • clearAllFilters — button to reset all filters
  • lastWatch — last watched movies
  • lastAdded — movies sorted by rental start date

name — quick filter name displayed in the SmartTUBE app

exclusive — indicates that this filter could be selected exclusively, i.e. other filters are reseted.

selectFeed — ID of the content feed for this quick filter (configured in the ”feeds” section, see below)

Configuring the Poster Display Presets

The “presets” section may contain one or more presets for displaying posters, which will be used in the “feeds” section. The screenshot below shows how two different presets — “normal” and “big” — are displayed in the SmartTUBE app.

Image7


Two rails with different poster presets

The “presets” section in this case will look as follows:

“presets”: {
  “normal”: { // Preset name
    “titleSize”:
“s”,
    “rows”:
1,
    “cols”:
5.5,
    “height”:
13,
    “itemWidth”:
9,
    “itemSpacingRight”:
0.5,
    “itemVisibleLeft”:
2,
    “itemVisibleRight”:
2,
    “component”: {
      “type”:
“ItemMovie”
    },
    “url”:
“/movie/${id}”
  },
  “big”: {
    “titleSize”:
“s”,
    “rows”:
1,
    “cols”:
5.5,
    “height”:
23,
    “itemWidth”:
13,
    “itemSpacingRight”:
0.5,
    “itemVisibleLeft”:
2,
    “itemVisibleRight”:
2,
    “component”: {
      “type”:
“ItemMovie”
    },
    “url”:
“/movie/${id}”
  }
},

In order not to complicate the setup, we recommend that you configure only the parameters described below:

titleSize — size of the rail title. Acceptable values (in order of increasing font size): s, sb, n, nb, l, lb, xl, xlb.

height — height of posters

itemWidth — width of posters

itemSpacingRight — spacing between posters

Configuring the Rules for Filling Content the Poster Area

When your customer enables any filter from the Filter panel, the Poster area is filled with a single grid of posters:

Image9


Grid of posters

The “feeds” section allows you to fill the Poster area for some Quick filters with a custom set of rails:

Image11


Poster rails

This example of the “feeds” section shows how you can fill in the Quick filters “Group by genre” and “Sci-Fi” with a custom set of poster rails:

“feeds”: {
  “auto-genres”: { // Content feed ID
    “expand”: {
      “preset”:
“normal”,
      “id”:
“genres”
    }
  },
  “sci-fi”: {
    “lines”: [
      {
        “title”:
“Sci-Fi”,
        “preset”:
“big”,
        “url”:
“/movie/${id}”,
        “sources”: [
          {
            “type”:
“meta”,
            “filters”: [
              {
                “urlArgs”: {
                  “genreId”:
21660790
                }
              }
            ]
          }
        ]
      },
      {
        “title”:
“Fantasy”,
        “preset”:
“normal”,
        “url”:
“/movie/${id}”,
        “sources”: [
          {
            “type”:
“meta”,
            “filters”: [
              {
                “urlArgs”: {
                  “genreId”:
21660652
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
}

expand — section that allows you to group movies into rails based on the attribute specified in the id parameter.

preset — name of the poster display preset from the “presets” section

id — attribute by which the movies should be grouped into rails. Acceptable values:

  • genres — filter by the genres
  • years — filter by the year ranges
  • countries — filter by country of production
  • purchaseTypes — filter by purchase type (subscription, transactional, advertisement)
  • providers — filter by content provider

lines — a custom set of rails

title — name of the rail displayed above it

filters — movie filtering options for the rail

urlArgs — parameters of content filtering

type — content type: movies or series

genreId — list of genre IDs

providerId — list of content provider IDs

countryId — list of country IDs

accessLevelId — ID of the access level of the active profile

genreALevelId — ID of the access level of the genre

showcaseId — showcase ID

sort — sorting the content by:

  • name — the movie name
  • rating — the Default order field on the movie/series details page in the SmartTUBE Admin Console
  • startDate — the date when the movie became available for rental (in ascending order)
  • startDate desc (not a typo) — the date when the movie became available for rental (in descending order)
  • newRelease_desc — the movie release date

year — list of movie/series by production years. Examples of acceptable values: 2015 (one year), 2005,2007,2008 (several years), 2005-2015 (interval).

text — text for searching in the Name, Description and Original name fields

id — list of movie/series IDs

serviceId — ID of a metacontent bundle

rubricId — list of rubric IDs

Tenant-dependant Skins

If you have a multi-tenant architecture, you can adapt the SmartTUBE app’s UI to the corporate identity of each tenant and make it more individual. In this topic we unveil the ways to change the logo, selector color and size of content rails on the Home screen dependent on tenant.

Configuring Logo

The SmartTUBE platform allows you to set the logo for the splash screen and upper-left corner in the app’s UI individually for each tenant.

Image1

Image12

  1. Open the SmartTUBE Device Manager.
  2. Go to the File Storage section.
  3. Upload logos for the splash screen and the upper left corner of UI. Image format requirements for different platforms, please see here.

Image3

  1. Double click on each logo image and write down their URLs, we’ll need them in the Step 8.

Image8

  1. Go to the Home page.
  2. Find the desired device group.
  3. Find the folder of a firmware currently used on devices. It should be marked with the CURRENT label.

Image4

  1. Click the Add JSON file button and create the setup.json file with the settings below. If it already exists, just add or edit these settings.

{
“ux”: {
  “preloadImageSources”: [ // Section with settings for images preloaded during application startup
    {
       “image”:
“https://SmartTUBE_Device_Manager_hostname:port/6ef805fe-a532-4017-8227-f63aa4676b90” // URL of the logo for the tenant “Tenant_A”. Copied from the SmartTUBE Device Manager > File Storage menu
     },
     {
       “image”:
“https://SmartTUBE_Device_Manager_hostname:port/8daada32-2554-4b1b-852f-5225b13d263d”  // URL of the logo for the tenant “Tenant_B”
     },
     {
       “image”:
“https://SmartTUBE_Device_Manager_hostname:port/7d69b9c7-bf7c-4a0b-bb00-5073a012b10d” // URL of the logo for the tenant “Tenant_C”
     }
   ]
 },
 “logoWidth”: [ // Logo width
   {
     “value”:
17, // The “logoWidth” value, in rems.
     “rule”:
“tenant = Tenant_A” // A rule indicating that “logoWidth” with “value”: 17 should only be applied to a tennant with “External ID” = “Tenant_A”. The tenant’s External ID can be found in SmartTUBE Admin Console > Administration > Tenants > [selected tenant] > External ID field.
   },
   {
     “value”:
7 // The “logoWidth” value for all other tenants
   }
 
 ],
 “imageReplace”: [ // Settings for replacing the default logo image stored in the app with the tenant’s logos
   [
     {
       “value”: {
         “search”:
“images/icons/logo.png”,  // URL of the upper-left corner logo stored in the app to be replaced. Do not change it!
         “replace”:
“https://SmartTUBE_Device_Manager_hostname:port/6ef805fe-a532-4017-8227-f63aa4676b90” // URL of the logo for the tenant “Tenant_A” for replacing the “search” image. Copied from the SmartTUBE Device Manager > File Storage menu.
       },
       “rule”:
“tenant = Tenant_A” // A rule indicating that “value” section should only be applied to a tennant with “External ID” = “Tenant_A”. The tenant’s External ID can be found in SmartTUBE Admin Console > Administration > Tenants > [selected tenant] > External ID field.
     },
     {
       “value”: {
         “search”:
“images/icons/logo.png”,
         “replace”:
“https://SmartTUBE_Device_Manager_hostname:port/8daada32-2554-4b1b-852f-5225b13d263d”
       },
       “rule”:
“tenant = Tenant_B”
     },
     {
       “value”: {
         “search”:
“images/icons/logo.png”,
         “replace”:
“https://SmartTUBE_Device_Manager_hostname:port/7d69b9c7-bf7c-4a0b-bb00-5073a012b10d”
       },
       “rule”:
“tenant = Tenant_C”
     },
     {
       “value”: {
         “search”:
“images/splashes/logo.png”,  // URL of the splash screen logo stored in the app to be replaced. Do not change it!
         “replace”:
“https://SmartTUBE_Device_Manager_hostname:port/6ef805fe-a532-4017-8227-f63aa4676b90” // URL of the logo for the tenant “Tenant_A” for replacing the “search” image. Copied from the SmartTUBE Device Manager > File Storage menu.
       },
       “rule”:
“tenant = Tenant_A” // A rule indicating that “value” section should only be applied to a tennant with “External ID” = “Tenant_A”. The tenant’s External ID can be found in SmartTUBE Admin Console > Administration > Tenants > [selected tenant] > External ID field.
     },
     {
       “value”: {
         “search”:
“images/splashes/logo.png”,
         “replace”:
“https://SmartTUBE_Device_Manager_hostname:port/8daada32-2554-4b1b-852f-5225b13d263d”
       },
       “rule”:
“tenant = Tenant_B”
     },
     {
       “value”: {
         “search”:
“images/splashes/logo.png”,
         “replace”:
“https://SmartTUBE_Device_Manager_hostname:port/7d69b9c7-bf7c-4a0b-bb00-5073a012b10d”
       },
       “rule”:
“tenant = Tenant_C”
     }                  
   ]
 ],
}

  1. Click the Save button to save changes.
  2. Now the file should be uploaded to devices.
  3. Check that the new settings have been applied to devices.

Configuring Selector Color

The selector highlights UI elements when they are selected (green in the screenshots below):

Image2

Image15

In order to change its color, follow the steps below:

  1. Create CSS files (one for each tenant) and name them as follows: fixes.[tenant External ID from the SmartTUBE Admin Console > Administration > Tenants dictionary].css  For example, fixes.alter_tvio.css
  2. Define the selector color in these files changing the color value (#ff0000 in the example below) to desired one as follows:

.button-normal.button-focus,
base-button.button-focus.selected,
base-button.button-focus.show-back,
.button-normal.focus,
base-button.focus.selected,
base-button.focus.show-back,
base-button.focus.show-full,
base-button.focus,
.button-spinner.button-focus,
base-button.button-focus.loading,
.button-spinner.focus,
base-button.focus.loading,
base-item-channel.show-back.focus,
.focus-item.focus,
.focus.filter-item,
base-item-filter.focus,
.focus-item-focus,
.filter-item-focus,
base-item-filter.checked.focus,
base-item-filter.checked.focus.checked-default-color,
.focus.menu-item,
base-item-menu.focus,
.menu-item-focus,
base-item-menu.checked.focus,
base-item-radio.focus,
base-item-radio.checked.focus,
base-home-item-menu.label-without-icon.focus .label,
base-channels-programs .cursor-circle,
base-channels-programs .cursor-line-channel.active,
base-channels-programs .cursor-line-program.active,
base-channels-programs .cursor-circle.active,
.grid-background-active,
base-keyboard.search .key.focus {
 
background-color: #ff0000 !important;
}

.text-input.focus,
base-input.focus,
.text-input-focus,
base-input.focus.active,
.focus > .pin-input.focus,
.active > .pin-input.focus {
 
border-color: rgba(#ff0000, 0.7) !important;
}

.focus-bg-virtualkeyboard-highlightButtonBackground.focus,
.focus-bg-virtualkeyboard-highlightButtonBackground,
.bg-virtualkeyboard-buttonBackground {
 background-color: rgba(#ff0000, 0.1) !important;
}

.statusbar-page-navigation-path,
base-home-item-menu.focus .label {
 
color: #ff0000 !important;
}
base-tv-item-channel.focus,
base-tv-item-program.focus,
base-home-item-menu.label-without-icon.focus .label {
 
color: #fff !important;
}

base-channels-programs .cursor-line-tri {
 
border-left-color: #ff0000 !important;
}

  1. Upload files via SmartTUBE Device Manager to the current firmware version of desired device group.
  2. Check that the new settings have been applied to devices.

Configuring App for iOS

The customization of SmartTUBE app for iOS is performed using the JSON files specified below. These files could be distributed across your end-user devices via the SmartTUBE Device Manager.

  • Primary UI/UX settings — setup.json  or networkConfig.cfg
  • Home screen — home.json 
  • “My” page — my.json
  • “Profile” page — settings.json
  • Movies & Series catalogs — vod.json & series.json
  • rail styles — layouts.json

Primary UI/UX Settings

The primary UI/UX settings are placed in the setup.json (app version 8.x and later) or networkConfig.cfg (app version lower than 8.x) file adhering to the JSON format.

Configuration Examples

setup.json — for the app version 8.x and later:

{
“player”: {
  “fairplayCertificatePath”:
“/fairplay.cer”
},
“isBannerTitleVisible”:
true
}

networkConfig.cfg — for the app version lower than 8.x. All settings in this file should be listed in the “result” section as shown below:

{
“result”: {
    “player”: {
      “fairplayCertificatePath”:
“/fairplay.cer”
  },
    “isBannerTitleVisible”:
true
}
}

Parameter Description

isBannerTitleVisible, boolean

Flag to display the movie title overlaid on the banner on the Home screen

bannerDuration, integer

Duration of displaying banners in the carousel on the Home screen

showAdvBlockedPanel, boolean 

Flag to display the notification with the skip timer above the progress bar in the app’s player

nonSkipableAdvInterval, integer

The amount of ads (in seconds) that the subscriber cannot skip and rewind. The value -1 prohibits skipping all ads.

maxSaveAdvertismentTimeout, integer

If the STB exits standBy mode and it has been in this mode for more than set minutes, the “Skip advert timeout” timer for all channels is reset. This timer is also reset after the STB is rebooted.

resetSkipAdvertTimeoutOnSwitch, boolean

Flag to reset the Skip Advert Timeout (see Step 6) every time the subscriber switches a channel (including nPVR). true — reset when switching a channel; false — reset after viewing an ad block.

ignoreSkipAdvertTimeoutForPl, boolean 

Flag to prohibit skipping ads for Pause Live programs, even if the Skip Advert Timeout has not expired.

canTerminalNameChange, boolean

Flag to allow user to rename a device linked to the account. Renamed to userCanChangeTerminalName in SmartTUBE App for iOS 9.1.

userCanChangeTerminalName, boolean

Flag to allow user to rename a device linked to the account

canTerminalDelete, boolean

Flag to allow user to unlink a device from the account. Renamed to userCanDeleteTerminalsFromAccount in SmartTUBE App for iOS 9.1.

userCanDeleteTerminalsFromAccount, boolean

Flag to allow user to unlink a device from the account

Home Screen

The app’s Home screen usually consists of a banner and themed content rails. The home.json file describes the order of rails, its contents and layout. Following the example below, you can customize the Home screen yourself.

Example Configuration

{
  “lines”: [
      {
          “layout”: {
              “banner”:
“banner”
          },
          “sources”: [
              {
                  “feedUrl”:
“sdp://userfeed/banners”,
                  “type”:
“banners”
              }
          ]
      },
      {
          “titles”: {
              “de”:
“Kanäle”,
              “en”:
“Channels”,
              “lv”:
“Kanāli”
          },
          “layout”: {
              “channel”:
“channel”
          },
          “sources”: [
              {
                  “feedUrl”:
“sdp://userfeed/channels”,
                  “type”:
“channels”
              }
          ]
      },
      {
          “titles”: {
              “de”:
“Empfehlungen”,
              “en”:
“Recommendations”,
              “lv”:
“Ko noskatīties šodien”
          },
          “layout”: {
              “episode”:
“movie”,
              “movie”:
“movie”,
              “program”:
“program”,
              “season”:
“movie”,
              “series”:
“movie”
          },
          “sources”: [
              {
                  “feedUrl”:
“sdp://userfeed/items”,
                  “limit”:
20,
                  “type”:
“items”,
                  “updateTimeout”:
1440
              }
          ]
      },
      {
          “titles”: {
              “de”:
“TOP 10 der meistgesehenen Sendungen im TV-Archiv”,
              “en”:
“TOP 10 most viewed broadcasts in TV archive”,
              “lv”:
“TOP 10 skatītākās TV arhīva pārraides”
          },
          “layout”: {
              “program”:
“program”
          },
          “sources”: [
              {
                  “feedUrl”:
“sdp://userfeed/topPrograms”,
                  “type”:
“programs”,
                  “updateTimeout”:
60
              }
          ]
      },
      {
          “titles”: {
              “de”:
“Weiter schauen”,
              “en”:
“Continue Watching”
          },
          “layout”: {
              “episode”:
“movie”,
              “movie”:
“movie”,
              “program”:
“program”,
              “season”:
“movie”,
              “series”:
“movie”
          },
          “sources”: [
              {
                  “type”:
“continueWatching”
              }
          ]
      }
  ]
}

Parameter Description

lines — core section of the configuration file

layout — section with the rail layout settings

[layout type] — ID of layout described in the layouts.json file and applied to this [layout type]. For example, the string “series”: “movie” prescribes using the layout with ID “movie” for the series posters.

titles — rail titles in accordance with the UI language. Displayed above the rail.

<language ID> — localized rail title in the format: “en”: “Continue Watching Programs” . 2-letter language code ISO 639-1:2002 is used.

sources — sources of content for the rail (at the moment only one source supported)

type — type of content and display style of a rail. Acceptable values:

  • banners — banner panel. The parameter feedUrl is required for this rail type.
  • channels — user favorite channels and channels sorted by the operator in Admin Console. The parameter feedUrl is required for this rail type.
  • programs — top viewed programs. The parameter feedUrl is required for this rail type.
  • npvr — list of nPVR records
  • history — viewing history (movies, series and programs sorted by the last viewed time)
  • continueWatching — incompletely viewed content
  • items — “Best for you” recommendations (programs, movies, series, services, etc.). The parameter feedUrl is required for this rail type.
  • meta — movies or series with filters. The parameter feedUrl is required for this rail type.
  • favoriteChannels — user favorite channels
  • favoriteMovies — user favorite movies
  • reminders — reminders for upcoming broadcasts set by the subscriber
  • metaAlias — custom rail with movies or series filtered with Search aliases (configured in SmartTUBE Admin Console > Content > Search aliases > Content). The parameter feedUrl is required for this rail type.
  • epgAlias — custom rail with programs filtered with Search aliases (configured in SmartTUBE Admin Console > Content > Search aliases > Content). The parameter feedUrl is required for this rail type.

feedUrl — URL of the content feed, specific to each type. Please, DO NOT CHANGE it, except feedUrl for custom rails (type = metaAlias or epgAlias). The value for these rails is set as follows: “feedUrl”: “sdp://userfeed/aliasMetaContent?aliasName=xxx”, where xxx is an externalId of a Search alias in the SmartTUBE Admin Console > Content > Search aliases > Content. For more details about configuring Search aliases, see the article “Configuring Content Rails on Home Screen”.

updateTimeout — period of refreshing content for the rail, in sec.

limit — max number of content items in the rail

The content with the maximum access level (age rating) specified in the SmartTUBE Admin Console > Dictionaries > Access levels dictionary is not displayed in the rails throughout app’s UI.

“My” Page

Using the my.json file you can customize the My page. The order of the rails in the UI is determined by the order in which they are described in the file.

Example Configuration

{
  “lines”: [
      {
          “layout”: {
              “episode”:
“movie”,
              “movie”:
“movie”,
              “program”:
“program”,
              “season”:
“movie”,
              “series”:
“movie”
          },
          “sources”: [
              {
                  “limit”:
40,
                  “type”:
“continueWatching”
              }
          ],
          “titles”: {
              “de”:
“Weiter schauen”,
              “en”:
“Continue watching”,
              “lv”:
“Turpiniet skatīties”,
              “es”:
“Seguir viendo”
          }
      },
      {
          “layout”: {
              “channel”:
“channel”
          },
          “sources”: [
              {
                  “type”:
“favoriteChannels”
              }
          ],
          “titles”: {
              “de”:
“Lieblingssender”,
              “en”:
“Favorite channels”,
              “lv”:
“Mīļākie kanāli”,
              “es”:
“Canales favoritos”
          }
      },
      {
          “layout”: {
              “episode”:
“movie”,
              “movie”:
“movie”,
              “season”:
“movie”,
              “series”:
“movie”
          },
          “sources”: [
              {
                  “limit”:
40,
                  “type”:
“favoriteMovies”
              }
          ],
          “titles”: {
              “de”:
“Lieblingsfilme”,
              “en”:
“Favorite movies”,
              “lv”:
“Mīļākās filmas”,
              “es”:
“Peliculas favoritas”
          }
      },
      {
          “layout”: {
              “program”:
“program”
          },
          “sources”: [
              {
                  “limit”:
40,
                  “type”:
“npvr”
              }
          ],
          “titles”: {
              “de”:
“Aufnahmen”,
              “en”:
“Recordings”,
              “lv”:
“Ieraksti”,
              “es”:
“Grabaciones”
          }
      },
      {
          “layout”: {
              “program”:
“program”
          },
          “sources”: [
              {
                  “limit”:
40,
                  “type”:
“reminders”
              }
          ],
          “titles”: {
              “de”:
“Erinnerungen”,
              “en”:
“Reminders”,
              “lv”:
“Atgādinājumi”,
              “es”:
“Recordatorios”
          }
      },
      {
          “layout”: {
              “episode”:
“movie”,
              “movie”:
“movie”,
              “program”:
“program”,
              “season”:
“movie”,
              “series”:
“movie”
          },
          “sources”: [
              {
                  “limit”:
40,
                  “type”:
“history”
              }
          ],
          “titles”: {
              “de”:
“Geschichte”,
              “en”:
“History”,
              “lv”:
“Vēsture”,
              “es”:
“Historia”
          }
      }
  ]
}

Parameter Description

lines — core section of the configuration file

layout — List of content types for the rail with corresponding IDs of layout presets (described in the layouts.json file)

titles — rail titles in accordance with the UI language. Displayed above the rail.

<language ID> — Localized rail title in the format: “en”: “Continue Watching Programs” . 2-letter language code ISO 639-1:2002 is used.

sources — Sources of content for the rail (at the moment only one source supported)

type — type of content and display style of a rail. Acceptable values:

  • continueWatching — incompletely viewed content
  • favoriteChannels — User favorite channels
  • favoriteMovies — User favorite movies
  • npvr — list of nPVR records
  • reminders — reminders for upcoming broadcasts set by the subscriber
  • history — viewing history (movies, series and programs sorted by the last viewed time)

limit — Max number of content items in the rail.

The content with the maximum access level (age rating) specified in the SmartTUBE Admin Console > Dictionaries > Access levels dictionary is not displayed in the rails throughout app’s UI.

“Profile” Page

Using the settings.json file you can customize the Profile menu. Here you can change the order of the menu items (upper level) and their visibility only.

Example Configuration

{
  “lines”: [
      {
          “titles”: {
              “en”:
“”
          },
          “sources”: [
              {
                  “type”:
“profiles”
              }
          ]
      },
      {
          “titles”: {
              “en”:
“Messages”
          },
          “sources”: [
              {
                  “type”:
“messages”
              }
          ]
      },
      {
          “titles”: {
              “en”:
“Services”
          },
          “sources”: [
              {
                  “type”:
“services”
              }
          ]
      },
      {
          “titles”: {
              “en”:
“Language”
          },
          “sources”: [
              {
                  “type”:
“languages”
              }
          ]
      },
      {
          “titles”: {
              “en”:
“Player”
          },
          “sources”: [
              {
                  “type”:
“player”
              }
          ]
      },
      {
          “titles”: {
              “en”:
“Devices”
          },
          “sources”: [
              {
                  “type”:
“devices”
              }
          ]
      },
      {
          “titles”: {
              “en”:
“App Privacy Policy”
          },
          “sources”: [
              {
                  “type”:
“appPrivacyPolicy”
              }
          ]
      },
      {
          “titles”: {
              “en”:
“About”
          },
          “sources”: [
              {
                  “type”:
“about”
              }
          ]
      },
      {
          “titles”: {
              “en”:
“Logout”
          },
          “sources”: [
              {
                  “type”:
“logout”
              }
          ]
      }
  ]
}

Parameter Description

lines — core section of the configuration file

titles — item titles in accordance with the UI language

<language ID> — Localized item title in the format: “en”: “Continue Watching” . 2-letter language code ISO 639-1:2002 is used.

sources — Sources of content for the items

type — item type:

  • profiles —  profile settings
  • messages —  list of messages received from the SmartTUBE SDP
  • services — managing subscriptions and services
  • languages — UI language settings
  • player — TV/VoD player settings
  • devices — managing devices linked to the account
  • appPrivacyPolicy — text of the Application Privacy Policy
  • about —  information about the application
  • logout —  logout from the current account

Movies/Series Page

The Movies and Series catalog in the SmartTUBE iOS app are configured using the vod.json and series.json files respectively. The format of both files is the same.

These files includes two sections:

  • “quickFilter” — allows you to customize the Quick filters panel;
  • “feeds” — allows you to customize the Default layout of the page.

Configuring the Quick Filter Panel

Along with standard filters (genre, year, country, etc.) the SmartTUBE iOS app allows you to configure custom filters — Quick filters. It makes sense to add frequently used, trending and interesting filters here.

For example, the “quickFilter” section could look like this:

{
“quickFilter”: [
  {
    “title”:
“Our choice”,
    “urlArgs”:
“sort=rating”
  },
  {
    “title”:
“2022”,
    “urlArgs”:
“year=2022”
  },
  {
    “title”:
“Xmas Comedies”,
    “urlArgs”:
“genreId=47239&text=christmas”
  },
  {
    “title”:
“Marvel”,
    “urlArgs”:
“showcaseId=41233”
  },
  {
    “title”:
“Matrix”,
    “urlArgs”:
“id=18356,20456,63214”
  }
]
}

title — quick filter name displayed

urlArgs — parameters of content filtering. You can combine several parameters using the & symbol (e.g. genreId=47239&text=christmas). Acceptable values:

  • type — content type: movies or series
  • genreId — list of genre IDs
  • providerId — list of content provider IDs
  • countryId — list of country IDs
  • accessLevelId — ID of the access level of the active profile
  • genreALevelId — ID of the access level of the genre
  • showcaseId — showcase ID
  • sort — sorting the content by:
    • name — the movie name
    • rating — the Default order field on the movie/series details page in the SmartTUBE Admin Console
    • startDate — the date when the movie became available for rental (in ascending order)
    • startDate desc (not a typo) — the date when the movie became available for rental (in descending order)
    • newRelease_desc — the movie release date
  • year — list of movie/series by production years. Examples of acceptable values: 2015 (one year), 2005,2007,2008 (several years), 2005-2015 (interval).
  • text — text for searching in the Name, Description and Original name fields
  • id — list of movie/series IDs
  • serviceId

Integration Reference

Here you can find reference information on integrating SmartTUBE Service Delivery Platform with external systems such as operator’s OSS/BSS, recording servers, EPG and VoD metadata providers, and other.

SmartTUBE OSS/BSS API

Download as PDF

Baseline

The integration of SmartTUBE SDP with an operator’s OSS/BSS system is achieved through the following API, which enables seamless management and synchronization of data pertaining to subscriber accounts, device bindings, services, pricing plans, and other relevant entities between the OSS/BSS and SDP. Each integration project is unique and tailored to the specific business processes of the operator, showcasing the flexibility provided by a comprehensive set of methods on the SmartTUBE side and optional methods on the OSS/BSS side.

On the SmartTUBE side, the implemented methods facilitate interaction when initiated by the OSS/BSS, ensuring that changes made on the OSS/BSS side are effectively communicated to the SmartTUBE SDP. Conversely, methods on the OSS/BSS side enable seamless interaction when initiated by the SmartTUBE SDP, streamlining processes such as subscriber content purchases and service subscriptions within pricing plans.

For instance, to illustrate a typical workflow:

  • The SmartTUBE App sends a request to the SmartTUBE SDP, avoiding direct communication with the OSS/BSS.
  • The SmartTUBE SDP then invokes the OSS/BSS-side method.
  • The response from the OSS/BSS-side method is relayed back to the SmartTUBE SDP, which subsequently forwards relevant information to the SmartTUBE App.

Method Invocation

API methods are called using HTTP(S) GET requests. The type of the protocol (HTTP or HTTPS) depends on the server settings.

Invocation of SmartTUBE-side Methods

The syntax of an API method call is as follows:

http[s]://<smarttube_sdp_endpoint_host>:<port>/<oss_api_prefix>/<method name>?<parameter 1>=<value 1>&<parameter 2>=<value 2>…

The <oss_api_prefix> is defined by the oss.standard.url.value parameter of the SmartTUBE SDP configuration file system.conf. The typical value is integrationapi.

Exception: The report method for creating reports has its own syntax. See the section Getting reports.

Invocation of OSS-side Methods

The syntax of an API method call using GET is as follows:

http[s]://<oss_endpoint_host>:<port>/<prefix>/<method name>?<parameter 1>=<value 1>&<parameter 2>=<value 2>…

For instance, to call method1 with the arguments param1=value1 and param2=value2 using an HTTP GET request, the syntax would appear as follows:

http://111.111.0.1:8080/smarttube_sdp_integration/method1?param1=value1&param2=value2

Authorization

In order to ensure the security of the SmartTUBE SDP and OSS/BSS interaction, you can enable the authentication mechanism.

Authorization Types

The SmartTUBE-side methods supports the following authorization mechanisms:

  • HTTP Basic Authentication
    This mechanism involves passing a login/password with each request in the HTTP Authorization header according to the HTTP Basic Authentication protocol.
  • JWT (JSON Web Token)
    The authorization of requests by this mechanism is performed as follows:

    • OSS/BSS requests the authorize method for the first time: authorize?login=<login>&password=<password>
    • SmartTUBE SDP returns the JWT token in the HTTP header.
    • OSS/BSS must send this token in the HTTP header “Authorization: Bearer <token>” with all subsequent requests to the SmartTUBE SDP. Request example:

curl –insecure -v “https://localhost:8443/sdpapi/integrationapi/listNpvrRecordInterval?accountNumber=sm” -H ‘logHeaders: true’ -H ‘Host: sdp5-dev-sdp01:8081’ -H ‘Origin: http://sdp5-dev-sdp01:8081’ -H ‘Content-Type: application/json’  -H ‘jwt:…’

The token remains valid only for a certain time (24 hours by default). Upon expiration, the token must be requested again. You can also invalidate current sessions using the invalidateAllSessions method.

The authorization is supported only for the methods with the prefix /sdpapi/ in its path. For example: https://localhost:8443/sdpapi/integrationapi/listProfile?accountNumber=sm If the /sdpapibd/ prefix is used, the authorization is not required.

You can configure both authorization methods in the SmartTUBE SDP configuration file system.conf in the integrationApi.auth section.

For the OSS/BSS-side methods, the HTTP Basic Authentication is only supported. The integration settings are managed with the SmartTUBE SDP configuration file system.conf in the oss.standard.[…] and standard-oss-[…] sections.

SmartTUBE-side Methods

The methods below are implemented and executed on the SmartTUBE side upon request from the OSS/BSS side:

Method

Purpose

Device Authorization

authorize

Authorization on the SmartTUBE server using JWT

invalidateAllSessions

Invalidate all connection sessions from the OSS / BSS side

Managing Service Accounts

createAccount

Adding a service account and a connection

createAccountByTemplate

Creating a service account from a template

updateAccount

Editing a service account

accountInfo

Getting information about a service account

deleteAccount

Deleting a service account

ServiceAccountService#hashServiceAccountPasswords

Hashing passwords on all service accounts

ServiceAccountService#hashAllPasswords

Hashing passwords on all service accounts and terminals

Managing Linked Devices

addTerminal

Adding a device

updateTerminal

Editing a connection to a device

deleteTerminal

Deleting a connection to a device

deleteTerminalHistory

Deleting the history of device UID transitions

setUidByLogin

Setting UID and serial number by login

ServiceAccountService#hashTerminalPasswords

Hashing passwords on all terminals

Managing Services

changeProductOffer

Changing the pricing plan

subscribeService

Adding or refusing from a service

accountServiceList

Getting a list of services

resetAccount

Removing purchased content and services

Messaging

sendAccountMessage

Sending a text message to all devices bounded to the specific service accounts

sendDevicesMessage

Sending a text message to the list of devices

sendAccountsMessageById

Sending a message by external ID to all devices bounded to the specific service accounts

sendDevicesMessageById

Sending a message by external ID to the list of devices

sendFilterMessageById

Sending a pre-created message to devices bound to the filtered service accounts/devices

sendControlByAccounts

Sending a control messages by account numbers

sendControlByUids

Sending a control messages by UIDs

Managing Profiles

setupContentBookmark

Content bookmarks managing

updateProfile

Editing a profile

listProfile

Getting a list of profile parameters

Managing nPVR

createNpvr

Create an order to record upcoming TV show

cancelNpvr

Remove an order to record upcoming TV show(s)

listNpvrSeries

List all orders to record upcoming TV series on the service account

createNpvrSeries

Create an order to record upcoming TV series

cancelNpvrSeries

Remove an order to record upcoming TV series

listNpvrSchedule

List all schedules to record upcoming TV broadcasts

createNpvrSchedule

Create a schedule to record upcoming TV broadcast

updateNpvrSchedule

Update a schedule to record upcoming TV broadcast

cancelNpvrSchedule

Remove schedules to record upcoming TV broadcasts

listNpvrRecordInterval

List all recorded intervals

Getting Reports

report

Getting reports on service accounts

EPG Managing

updateEpg

Update EPG for the specified programs

reloadEpgCache

Reload EPG cache for all or specified programs

sendEpgDeviceNotifications

Send notification to all devices to reload EPG for the specified programs

Device Authorization

authorize

Device authorization on the SmartTUBE SDP using JWT. The method returns a JWT token for subsequent requests to the SmartTUBE SDP. See the “Authorization types” section for details.

Method name

authorize

Call parameters

Parameter

Type

Required?

Description

login

String

yes

Login for getting the JWT token from the SmartTUBE SDP

password

String

yes

Password for getting the JWT token from the SmartTUBE SDP

Return value

In case of success, code=”0″ is returned along with the JWT token in the header.

invalidateAllSessions 

The method invalidates all connection sessions from the OSS / BSS side for the specified login. See the Authorization types section for details.

This method should be requested with the /sdpapibd/ prefix in its path.

Method name

invalidateAllSessions

Call parameters

Parameter

Type

Required?

Description

login

String

yes

Login, whose sessions are to be invalidated

Return value

code=”0″ is returned in case of success.

Managing Service Accounts

createAccount 

The method creates a service account and binds a device to this account if needed.

Method name

createAccount

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

productOffer

String

yes

An external ID of the pricing plan. You can create the pricing plan in SmartTUBE web interface; its external ID is set in the web interface as well.

name

String

yes

Name of the service account

accountState

String

yes

An external identifier of the service account state

login

String

no*

Login used for devices linking to this service account

password

String

no*

Password used for devices linking to this service account

uid

String

no

UID of a device

deviceType

String

no

Device type (see SmartTUBE object model)

location

String

no

Is taken into account only if the uid parameter is passed.

The external identifier of a region for the connection.

The value of this parameter is used at SmartTUBE SDP for filtering TV-channels, which can be streamed on the subscriber’s device

deviceLimit

String

no

An external identifier of the Device limit restriction defining the maximum number of devices of each type that could be associated with the service account

description

String

no

Comment

hdcp

Number

no

  • 1 – enable HDCP protection of content transmitted via HDMI
  • 0 – disable HDCP protection of content transmitted via HDMI

Option is supported only by a limited list of set-top boxes. Please contact the SmartLabs support team for details.

billingId

String

no

The identifier at the OSS/BSS side

sessionLimit

String

no

ExternalID of the Concurrent session limit (can be found in the SmartTUBE Admin Console — Dictionaries — Concurrent session limit)

stateSwitch

String

no

ExternalID of the Account state switch (can be found in the SmartTUBE Admin Console — Dictionaries — Account state switches)

* Notes:

  • If login and password are not specified either for the service account or for any of devices already associated with it, it will be impossible to link new devices to this service account.
  • A new connection is added to the account only if uid or deviceLogin + devicePassword are passed.
Return value

code=”0″ is returned in case of success.

createAccountByTemplate 

The method creates a service account from a template and binds a device to this account if needed.

Method name

createAccountByTemplate

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

template

String

yes

External ID of the service account template by which the accounts will be generated

name

String

no

Name of the service account. If omitted, equal to the accountNumber.

accountState

String

yes

External ID of the service account state

login

String

no*

Service account login, used for linking devices to this service account

password

String

no*

Service account password, used for linking devices to this service account

uid

String

no

UID of a device

location

String

no

External ID of a region for the device. Is taken into account only if the uid parameter is passed.

The value of this parameter is used at SmartTUBE SDP for filtering TV-channels, which can be streamed on the subscriber’s device

hdcp

Number

no

  • 1 – enable HDCP protection of content transmitted via HDMI
  • 0 – disable HDCP protection of content transmitted via HDMI

Option is supported only by a limited list of set-top boxes. Please contact the SmartLabs support team for details.

billingId

String

no

Account ID at the OSS/BSS side

generateByMask

Boolean

no

Flag to generate IDs (accountNumber, name, login, uid, deviceLogin) by mask. Each ‘*’ will be replaced with 20 random chars (e.g.: ?name=test_* -> test_fdfae171a1c7451fa2e8)

generateCount

Integer

no

The number of service accounts to be generated (typically no more than 10000). The max number is set with the createAccountByTemplate.generateByMask.generateCount.maxValue parameter in the system.conf file.

deviceLogin

String

no

Device login

devicePassword

String

no

Device password

stateSwitch

String

no

ExternalID of the Account state switch (can be found in the SmartTUBE Admin Console — Dictionaries — Account state switches)

* If login and password are not specified either for the service account or for any of devices already associated with it, it will be impossible to link new devices to this service account.

Return values

Successful execution:

{

 “code”: 0,

 “message”: “Ok”,

 “info”: {

   “errorCount”: 0, // Number of errors

   “successCount”: 2 // Number of the service accounts created successfuly

 }

}

Business logic error:

{

 “code”: 50105,

 “message”: “Template not found”,

 “info”: {

   “errorCount”: 1,

   “successCount”: 0,

   “lastErrorCode”: 50105,

   “lastErrorMessage”: “Template not found”

 }

}

Fatal error:

{

 “error”: {

   “code”: 1,

   “message”: “No current transaction for [postgresql]”

 }

}

updateAccount 

The method applies changes to a service account.

Method name

updateAccount

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

name

String

no

Name of the service account

accountState

String

no

An external identifier of the service account state

login

String

no*

The login used for devices linking to this service account

password

String

no*

The password used for devices linking to this service account

stateMessage

String

no

Reason for changing the account state

profilePin

String

no

PIN. If you specify the PIN, it will be applied to all the profiles on the service account

deviceLimit

String

no

An external identifier of the dictionary defining the maximum number of devices of each type that could be associated with the service account

newAccountNumber

String

no

If the parameter is passed the service account number will be changed to the specified one, and for all devices associated with this service account the session will be deleted and the authorization will be needed

resetTerminal

Number

no

The attribute indicating if it is needed to delete MAC-addresses and serial numbers for all connections of this account number:

0 – delete
1 – not delete

description

String

no

Comment

purchaseVodAllow

Number

no

The attribute indicating the VoD purchases allowance:

0 – denied

1 – allowed with PIN

2 – allowed

billingId

String

no

The identifier at the OSS/BSS side

sessionLimit

String

no

ExternalID of the Concurrent session limit (can be found in the SmartTUBE Admin Console — Dictionaries — Concurrent session limit). If specified without a value, the limit is reset for the account.

stateSwitch

String

no

ExternalID of the Account state switch (can be found in the SmartTUBE Admin Console — Dictionaries — Account state switches). If specified without a value, the switch is reset for the account.

isDemo

Number

no

  • 1 – set the account to the demo state
  • 0 – set the account to the non-demo state

* If login and password are not specified either for the service account or for any of devices already associated with it, it will be impossible to link new devices to this service account.

Return value

code=”0″ is returned in case of success.

accountInfo 

The method returns data on a service account.

Method name

accountInfo

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

conditionally*

Get info about a service account by its Service Account Number (SAN)

uid

String

conditionally*

Get information about a service account by UID of a device linked to it

login

String

conditionally*

Get information about a service account by the login of a service account

getEmptyTerminals

Boolean

no

List terminals linked to the account:

  • 1 — list all devices, including empty ones (without UID)
  • 0 — list only devices with UID

* When calling the method, either accountNumber or uid or login must be specified.

Return values

If executed successfully, the method returns the following data:

Field

Description

createdAt

Date of service account creation

accountNumber

Service account number

name

Name of the service account

productOffer

An external ID of the pricing plan. You can create the pricing plan and assign the external ID to it in the SmartTUBE Administration Console

state

An external ID of the service account state:

  • ACTIVE – SmartTUBE app operates normally. The user has access to service in accordance with the pricing plan set for the service account.
  • NOT ACTIVE – a new service account, no active connections. After the SmartTUBE app has loaded, the service account status changes to ACTIVE.
  • BLOCKED – SmartTUBE app is started without access to services. With this service account status the subscriber cannot watch TV or purchase movies.
  • CLOSED – SmartTUBE app will not start.
  • TRIALCLOSED — the trial period for the account has expired; the SmartTUBE app will not start.
  • DELETED – SmartTUBE app will not start.
  • SUSPENDED – a new service account with a predefined connection. After the SmartTUBE app has loaded on the predefined device, the service account status changes to ACTIVE without the need to enter a login / password.

Note: For SmartTUBE the states CLOSED and DELETED are the same. If the service account is in one of these states, services and content are not delivered and subscriptions are not available.

terminalList

List of devices connected to the service account.

Each device is defined by the following parameters:

  • uuid – unique ID of the device
  • deviceType – device type (see SmartTUBE object model)
  • terminalName – name of the connection
  • location — device location in the operator’s network according to the “Regions” dictionary
  • ip — device IP address
  • lastAuthDate — date of last authorization
  • lastAuthVersion — firmware version at the time of the last authorization
  • login – login used for devices linking to the service account
  • serialNumber – device serial number
  • lang – current language of the subscriber’s interface

billingId

Account identifier at the OSS/BSS side

deviceLimit

External ID of the Device limit restriction defining the maximum number of devices of each type that could be associated with the service account

sessionLimit

External ID of the Concurrent session limit applied to the service account

deleteAccount 

The method deletes a service account and all the information about it.

Method name

deleteAccount

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

Return value

code=”0″ is returned in case of success.

ServiceAccountService#hashServiceAccountPasswords

The method hashes passwords on all service accounts.

Method name

ServiceAccountService#hashServiceAccountPasswords

Call parameters

This method does not require any parameters.

Return value

If executed successfully, the method returns “code”: 0.

ServiceAccountService#hashAllPasswords

The method hashes passwords on all service accounts and terminals.

Method name

ServiceAccountService#hashAllPasswords

Call parameters

This method does not require any parameters.

Return value

If executed successfully, the method returns “code”: 0.

Managing Linked Devices

addTerminal 

The method links a device to a service account.

Method name

addTerminal

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

no

Device type (see SmartTUBE object model)

login

String

no

The login used for devices linking to a service account, could be used instead of the login specified for the service account

password

String

no

The password used for devices linking to a service account, could be used instead of the password specified for the service account

terminalName

String

no

Name of the connection

location

String

no

The external identifier of a region for the connection.

The value of this parameter is used at SmartTUBE SDP for filtering TV-channels, which can be streamed on the subscriber’s device

hdcp

Number

no

  • 1 – enable HDCP protection of content transmitted via HDMI
  • 0 – disable HDCP protection of content transmitted via HDMI

Option is supported only by a limited list of set-top boxes. Please contact the SmartLabs support team for details.

Return value

code=”0″ is returned in case of success.

updateTerminal 

The method applies changes to the parameters of device binding.

Method name

updateTerminal

Call parameters

Parameter

Type

Required?

Description

uid

String

yes

Unique ID of the device

newUid

String

no

New unique ID of the device

deviceType

String

no

Device type (see SmartTUBE object model). Processing details:

  • If the parameter is specified, the value is assigned to the connection and the value “Billing or API” for the “Device type data source” parameter in the “Terminals” dictionary is set too.

login

String

no

The login used for devices linking to a service account, could be used instead of the login specified for the service account

password

String

no

The password used for devices linking to a service account, could be used instead of the password specified for the service account

terminalName

String

no

Name of the device connection

location

String

no

The external identifier of a region for the connection.

The value of this parameter is used at SmartTUBE SDP for filtering TV-channels, which can be streamed on the subscriber’s device

hdcp

Number

no

  • 1 – enable HDCP protection of content transmitted via HDMI
  • 0 – disable HDCP protection of content transmitted via HDMI

Option is supported only by a limited list of set-top boxes. Please contact the SmartLabs support team for details.

lastAuthDate

Number

no

Date of last device authorization

delete

Boolean

no

Flag to search for the device by UID or login, reset its UID and edit the activationNumber by the following template: login + ‘CLOSE’ + device ID

isDemo

Number

no

  • 1 – set the device to the demo state
  • 0 – set the device to the non-demo state
Return value

code=”0″ is returned in case of success.

deleteTerminal 

The method unbounds a device from the service account.

Method name

deleteTerminal

Call parameters

Parameter

Type

Required?

Description

uid

String

no

Unique ID of the device

Return value

code=”0″ is returned in case of success.

deleteTerminalHistory 

The method deletes the history of device UID transitions.

Method name

deleteTerminalHistory

Call parameters

Parameter

Type

Required?

Description

uid

String

no

Unique ID of the device, transitions to which need to be deleted

uidOld

String

no

Unique ID of the device, transitions from which need to be deleted

isDemo

number

no

  • 1 – delete only transitions to/from demo devices
  • 0 – delete only transitions to/from non-demo devices
  • none – delete all transitions
Return value

code=”0″ is returned in case of success.

setUidByLogin 

The method sets a unique identifier (UID) and a serial number for a linked device with the specified login.

Method name

setUidByLogin

Call parameters

Parameter

Type

Required?

Description

login

String

yes

Login the connection will be searched by

uid

String

yes

UID which will be set for the connection

serialNumber

String

no

Serial number which will be set for the connection

Return value

code=”0″ is returned in case of success.

ServiceAccountService#hashTerminalPasswords

The method hashes passwords on all terminals.

Method name

ServiceAccountService#hashTerminalPasswords

Call parameters

This method does not require any parameters.

Return value

If executed successfully, the method returns “code”: 0.

Managing Services

changeProductOffer

The method changes the pricing plan of the account.

Method name

changeProductOffer

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

productOffer

String

yes

An external ID of the pricing plan. You can create the pricing plan in SmartTUBE web interface; its external ID is set in the web interface as well.

Return value

code=”0″ is returned in case of success.

subscribeService 

The method adds or removes a service bundle for the service account.

Method name

subscribeService

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

serviceEId

String

yes

An external ID of the service

state

String

yes

Action:

  • 1 – add a service
  • 0 – refuse from a service

startDate

MM/dd/yyyy HH:mm:ss

no

Date of the service delivery start

stopDate

MM/dd/yyyy HH:mm:ss

no

Date of the service delivery end

isProcessExclusive

Number

no

An attribute indicating that mutually exclusive services must be taken into account:

  • 1 – taken into account,
  • 0 – not taken into account

isProcessBundle

Number

no

An attribute indicating that dependent services must be taken into account:

  • 1 – taken into account,
  • 0 – not taken into account
Return value

code=”0″ is returned in case of success.

accountServiceList 

The method returns the list of service bundles the service account is subscribed to.

Method name

accountServiceList

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

Return value

If executed successfully, the method returns the following data for each of the services:

Field

Description

canBeSubscribed

Attribute showing whether the service is available for subscription

deviceType

Device type (see SmartTUBE object model)

startDate

Date of service delivery start

endDate

Date of service delivery end

externalid

External identifier of the service

isActive

Attribute indicating whether the service is active (true/false)

name

Name of the service

type

Service discriminator, for example CHANNELPACKAGE

isInvisibleAlways

Sign of an always invisible service

isInvisibleWhenNotActive

Sign that the service is only invisible when not active (hidden when unsubscribed)

If the request contains a nonexistent account number, the following response is returned:

oss = {

 methods.authorize.send = true # whether to send the ‘authorize_uid’ request to the OSS during client authorization (by default,

false)

 methods.authorize.extraInfo.send = true # whether to send additional data (by default,true)

 methods.authorize.extraInfo.paramList = “defaultGatewayMAC” # list of additional parameters (their names without the ‘ex_’ prefix,

separated by commas) to be sent with the ‘authorize_uid’ request

}

resetAccount 

This method removes purchased/subscribed services and/or content from the service account.

Method name

resetAccount

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

resetService

Number

no

Possible values:

  • 1 (default) – remove all services from the service account. As a result, only services included in the pricing plan will be available to the user of this service account.
  • 0 — do not remove services from this service account

resetPurchase

Number

no

Possible values:

  • 1 – remove all content from the service account. Content will become unavailable to this service account.
  • 0 (default) – do not delete content
Return value

code=”0″ is returned in case of success.

Messaging

sendAccountMessage 

The method sends a text message to all devices bounded to specific service accounts. There is the ability to insert the subscriber’s MAC, UID or SAN as variables into the text. Such messages are displayed as a regular pop-up window in the app’s UI and can be useful to identify subscribers displaying closed content in public places.

Method name

sendAccountMessage

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The list of service account numbers (SANs), separated by comma.

message

String

yes

The message text. Supports the following variables:

  • {!DEVICEID!} — unique device identifier (MAC or UID);
  • {!SAN!} — service account number.

Call example:
…/integrationapi/sendAccountMessage?accountNumber=bony_007,bony_333&message=this%20is%20message%20for%20%7B!SAN!%7D

type

String

no

Options for displaying a message on the end-user device:

  • msgDisplay — a message is typically displayed as a regular modal dialog box in the middle of the screen;
  • call — a message is displayed as a notification popping up at the top of the screen for a few seconds.
Return value

code=”0″ is returned in case of success.

sendDevicesMessage 

The method sends a text message to the list of end-user devices. There is the ability to insert the subscriber’s MAC, UID or SAN into the text. Such messages are displayed as a regular pop-up window in the app’s UI and can be useful to identify subscribers displaying closed content in public places.

Method name

sendDevicesMessage

Call parameters

Parameter

Type

Required?

Description

uid

String

yes

The list of end-user device UIDs, separated by comma.

message

String

yes

The message text. Supports the following variables:

  • {!DEVICEID!} — unique device identifier (MAC or UID);
  • {!SAN!} — service account number.

Call example:
…/integrationapi/sendDevicesMessage?uid=00:11:72:33:49:52,sempai-3865&message=this%20is%20message%20for%20%7B!DEVICEID!%7D

Return value

code=”0″ is returned in case of success.

sendAccountsMessageById 

The method sends a message created in SmartTUBE Admin Console > Messages > Messages to devices bounded to specific service accounts. Such messages can be displayed as a regular pop-up window in the app’s UI or as a PUSH notification.

Method name

sendAccountsMessageById

Call parameters

Parameter

Type

Required?

Description

accountNumbers

String

yes

The list of service account numbers (SANs), separated by comma.

messageId

String

yes

The external ID of the message pre-created in SmartTUBE Admin Console > Messages > Messages

Return value

code=”0″ is returned in case of success.

sendDevicesMessageById 

The method sends a message created in SmartTUBE Admin Console > Messages > Messages to specific end-user devices. Such messages can be displayed as a regular pop-up window in the app’s UI or as a PUSH notification.

Method name

sendDevicesMessageById

Call parameters

Parameter

Type

Required?

Description

uid

String

yes

The list of end-user device UIDs, separated by comma.

messageId

String

yes

The external ID of the message pre-created in SmartTUBE Admin Console > Messages > Messages

Return value

code=”0″ is returned in case of success.

sendFilterMessageById 

The method sends a pre-created message to end-user devices bound to the filtered service accounts/devices. The message and account/device filter must be pre-created in SmartTUBE Admin Console > Messages > Messages and Messages > Receivers’ filters, respectively. Such messages can be displayed as a regular pop-up window in the app’s UI or as a PUSH notification.

Method name

sendFilterMessageById

Call parameters

Parameter

Type

Required?

Description

filterId

String

yes

External ID of the service account/device filter pre-created in SmartTUBE Admin Console > Messages > Receivers’ filters

messageId

String

yes

The external ID of the message pre-created in SmartTUBE Admin Console > Messages > Messages

Return value

code=”0″ is returned in case of success.

sendControlByAccounts 

The method sends a control message to the account numbers list.

Method name

sendControlByAccounts

Call parameters

Parameter

Type

Required?

Description

accountNumbers

String

yes

The list of service account numbers, separated by “,”

type

String

yes

The type of message:

  • factoryReset — reset STB to factory defaults;
  • Reboot — reboot STB;
  • reloadServices — reload services’ settings.
Return value

code=”0″ is returned in case of success.

sendControlByUids 

The method sends a control message to the UIDs list.

Method name

sendControlByUids

Call parameters

Parameter

Type

Required?

Description

uids

String

yes

The list of UIDs, separated by “,”

type

String

yes

The type of message:

  • factoryReset — reset STB to factory defaults;
  • Reboot — reboot STB;
  • reloadServices — reload services’ settings.
Return value

code=”0″ is returned in case of success.

Managing Profiles

setupContentBookmark 

The method adds or removes bookmarks to the specific media positions of the content items. Such bookmarks are called “system bookmarks”. “User-defined bookmarks” are set by subscribers in the SmartTUBE app. A single content item can have multiple bookmarks.

Method name

setupContentBookmark

Call parameters

Parameter

Type

Required?

Description

action

String

yes

Action type:

  • set — adds a bookmark;
  • delete — removes a bookmark.

accountNumber

String

no

List of the service account numbers separated by comma

profileId

Integer

no

List of the profile IDs separated by comma

all

Boolean

no

Flag to apply the action to all user profiles in the system

contentId

Integer

yes

ID of the content item

type

String

yes

Type of the content item:

  • PROGRAM — TV channels;
  • VIDEOMOVIE — VoD content.

value

Integer or Unix time

yes

For type=VIDEOMOVIE — shift from the file beginning, in seconds.

For type=PROGRAM — time of the channel mediaposition saving (under Pause Live, TSTV, nPVR services), unixtime.

Call Examples
  • Set a bookmark to all profiles of the specified service accounts:
    https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=set&accountNumber=sn_account,account2,account3&contentId=12345&type=VIDEOMOVIE&value=222
  • Set a bookmark to all the specified profiles:
    https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=set&profileId=555,777&contentId=12345&type=VIDEOMOVIE&value=222
  • Set a bookmark to all profiles in the system:https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=set&all=true&contentId=12345&type=VIDEOMOVIE&value=222
  • Remove a specific bookmark for the specified accounts and profiles:https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=delete&accountNumber=sn_account,account2,account3&profileId=555,777&contentId=12345&type=VIDEOMOVIE&value=222
  • Remove a specific bookmark for the specified movie for all profiles:https://sdp_host:8443/sdpapibd/integrationapi/setupContentBookmark?action=delete&all=true&contentId=12345&type=VIDEOMOVIE&value=222
Return value

code=”0″ is returned in case of success.

updateProfile 

The method applies changes to the profile parameters.

Method name

updateProfile

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

profileName

String

yes

Profile name

newProfileName

String

no

New profile name

maxAccessLevel

Number

no

The maximum access level. The content with age restriction above maximum level will be hidden

currentAccessLevel

Number

no

The current access level. Upon attempt to launch the content with the age restriction above this level PIN-code will be required

saveCurrentAccessLevel

Number

no

The attribute indicating the necessity to increase currentAccessLevel automatically to age restriction of content after its launch and entering PIN-code:

1 – increase

0 – not increase

pin

String

no

PIN-code

pinEnabled

Number

no

The attribute indicating the PIN-code request necessity when entering profile:
1 – request
0 – not request

Note: If the request of PIN-code is disabled for master-profile, changing of parameters of profiles at the subscriber’s device will be available under any profile

vodPurchaseRights

Number

no

The attribute indicating the VoD purchases allowance:

0 – denied

1 – allowed with PIN

2 – allowed

servicesPurchaseRights

Number

no

The attribute indicating the services subscription allowance:

0 – denied

1 – allowed with PIN

2 – allowed

isMaster

Number

no

The attribute indicating the master-profile:

1 – master-profile

0 – not master-profile

isCurrent

Number

no

The attribute indicating the active profile for this account at the moment:

1 – current profile is active

0 – other profile is active

Return value

code=”0″ is returned in case of success.

listProfile 

The method returns a list of parameters for all service account profiles, that can be modified by the updateProfile method.

Method name

listProfile

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

Return value

If executed successfully, the method returns the following data for each of the profiles:

Field

Description

name

Profile name

maxAccessLevel

The maximum access level. The content with age restriction above maximum level will be hidden

currentAccessLevel

The current access level. Upon attempt to launch the content with the age restriction above this level PIN-code will be required

pin

PIN code of the profile

vodPurchaseRights

The attribute indicating the VoD purchases allowance:

0 – denied

1 – allowed with PIN

2 – allowed

servicesPurchaseRights

The attribute indicating the services subscription allowance:

0 – denied

1 – allowed with PIN

2 – allowed

isMaster

The attribute indicating the master-profile:

1 – master-profile

0 – not master-profile

isCurrent

The attribute indicating the active profile for this account at the moment:

1 – current profile is active

0 – other profile is active

Managing nPVR

createNpvr 

The method creates an order to record upcoming TV show

Method name

createNpvr

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

epgId

String

yes

TV program identifier

Return value

If executed successfully, the method returns “code”: 0.

cancelNpvr 

The method removes the order to record upcoming TV show(s)

Method name

cancelNpvr

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

epgId

String

no

TV program identifier.

If not specified, all orders to record upcoming TV shows on the account will be removed.

recordIntervalId

integer

no

ID of recorded interval

Call Examples

http://localhost:8088/sdpapibd/integrationapi/cancelNpvr?accountNumber=sn_account&recordIntervalId=1215447 — cancels the recording of a specific recording interval

http://localhost:8088/sdpapibd/integrationapi/cancelNpvr?accountNumber=sn_account&epgId=1215447 — cancels the recording of a specific TV program

http://localhost:8088/sdpapibd/integrationapi/cancelNpvr?accountNumber=sn_account — cancels the recording of all TV programs and intervals for the specified service account

Return value

If executed successfully, the method returns “code”: 0.

listNpvrSeries 

The method returns a list of orders to record upcoming TV series on the service account

Method name

listNpvrSeries

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

Return value

If executed successfully, the method returns the following data:

Field

Description

seriesId

TV series identifier

channelId

TV channel identifier. May not be present in the method response. If so, the specified TV show will be recorded on any channel, where it will be broadcasted.

createNpvrSeries 

The method creates an order to record upcoming TV series

Method name

createNpvrSeries

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

seriesId

String

yes

TV series identifier

channelId

Integer

no

TV channel identifier.

If not set, the specified TV series will be recorded on any channel, where it will be broadcasted.

Return value

If executed successfully, the method returns “code”: 0.

cancelNpvrSeries 

The method removes the order to record upcoming TV series

Method name

cancelNpvrSeries

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

seriesId

String

yes

TV series identifier

Return value

If executed successfully, the method returns “code”: 0.

listNpvrSchedule 

The method returns a list of schedules to record upcoming TV broadcasts

Method name

listNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

Return value

If executed successfully, the method returns the following data:

Field

Description

Id

Schedule identifier

channelId

TV channel identifier

beginTime

Recording start time, in UTC format.

endTime

Recording end time, in UTC format.

days

Days of the week to record the TV broadcast, in the binary form. For example: 1100011 — a set of bits to activate recording on Mondays, Tuesdays, Saturdays and Sundays.

createNpvrSchedule 

The method creates a schedule to record upcoming TV broadcast

Method name

createNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

channelId

Integer

yes

TV series identifier

beginTime

UTC

yes

Recording start time

endTime

UTC

yes

Recording end time

days

UTC

yes

Days of the week to record the TV broadcast, in the binary form. For example: 1100011 — a set of bits to activate recording on Mondays, Tuesdays, Saturdays and Sundays.

isActive

UTC

yes

Schedule status flag:

  • true — enable the schedule;
  • false — disable the schedule.
Return value

If executed successfully, the method returns “id” of the schedule.

updateNpvrSchedule 

The method edits a schedule to record upcoming TV broadcast

Method name

updateNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

Id

Integer

yes

Schedule identifier

accountNumber

String

yes

Service account number

channelId

Integer

yes

TV series identifier

beginTime

UTC

no

Recording start time

endTime

UTC

no

Recording end time

days

UTC

no

Days of the week to record the TV broadcast, in the binary form. For example: 1100011 — a set of bits to activate recording on Mondays, Tuesdays, Saturdays and Sundays.

isActive

UTC

no

Schedule status flag:

  • true — enable the schedule;
  • false — disable the schedule.
Return value

If executed successfully, the method returns “code”: 0.

updateNpvrSchedule 

The method edits a schedule to record upcoming TV broadcast

Method name

updateNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

Id

Integer

yes

Schedule identifier

accountNumber

String

yes

Service account number

channelId

Integer

yes

TV series identifier

beginTime

UTC

no

Recording start time

endTime

UTC

no

Recording end time

days

UTC

no

Days of the week to record the TV broadcast, in the binary form. For example: 1100011 — a set of bits to activate recording on Mondays, Tuesdays, Saturdays and Sundays.

isActive

UTC

no

Schedule status flag:

  • true — enable the schedule;
  • false — disable the schedule.
Return value

If executed successfully, the method returns “code”: 0.

cancelNpvrSchedule 

The method removes schedules to record upcoming TV broadcasts

Method name

cancelNpvrSchedule

Call parameters

Parameter

Type

Required?

Description

Id

Integer

yes

Schedule identifier

accountNumber

String

yes

Service account number

Return value

If executed successfully, the method returns “code”: 0.

listNpvrRecordInterval 

The method returns a list of recorded intervals

Method name

listNpvrRecordInterval

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

Return value

If executed successfully, the method returns the following data:

Field

Description

recordId

ID of the recorded interval

uid

unique ID of the subscriber device

usageTime

Date when the recording task was set

serviceId

ID of the bundle

status

Recording status:

  • 0 — the programme recording is suspended until the quota is released
  • 1 — the programme is scheduled to record
  • 2 — the programme is recorded successfully
  • 3 — the recording is canceled by the subscriber
  • 4 — the recording is canceled due to storage time exceeded
  • 5 — the recording is canceled by the system (due to a technical problem)

validToDate

Expiration date of the storage time of the recorded interval

incMin

The number of minutes that is added to the end of the TV program specified in the EPG when the TV program is scheduled to nPVR recording.

decMin

The number of minutes that is subtracted from the start of the TV program specified in the EPG when the TV program is scheduled to nPVR recording.

channelId

ID of the channel on which the interval is recorded

sdate

Start datestamp of the recording interval

fdate

End datestamp of the recording interval

EPG Managing

updateEpg 

The method updates EPG data for the specified programs

Method name

updateEpg

Call parameters

Parameter

Type

Required?

Description

channelExtId

String

yes

External ID of a channel

programExtId

String

yes (or programId)

External ID of a program or programs (comma separated)

programId

Integer

yes (or programExtId)

ID of a program or programs (comma separated)

start

String

no

Program start date, in UTC format. Example: “dd.MM.yyyy HH:mm:ss”

finish

String

no

Program finish date, in UTC format. Example: “dd.MM.yyyy HH:mm:ss”

publicNpvr

Integer

no

Flag to mark the program as for the Catch-up Library (Public nPVR):

  • 0 – do not mark
  • 1 – mark

reloadCache

Boolean

no

Flag to reload the EPG cache for the specified programs. If omitted, it is assumed as true.

notifyDevices

Boolean

no

Flag to notify all devices to reload EPG for the specified programs. If omitted, it is assumed as false.

Return value

If executed successfully, the method returns “code”: 0.

reloadEpgCache 

The method reloads EPG cache for all or specified programs

Method name

reloadEpgCache

Call parameters

Parameter

Type

Required?

Description

channelExtId

String

yes

External ID of a channel

programExtId

String

yes (or programId)

External ID of a program or programs (comma separated)

programId

Integer

yes (or programExtId)

ID of a program or programs (comma separated)

all

Boolean

no

Flag to reload the EPG cache for all programs. If omitted, it is assumed as false.

Return value

If executed successfully, the method returns “code”: 0.

sendEpgDeviceNotifications 

The method sends notification to all devices to reload EPG for the current day for the specified programs.

Method name

sendEpgDeviceNotifications

Call parameters

Parameter

Type

Required?

Description

channelExtId

String

yes

External ID of a channel

programExtId

String

yes (or programId)

External ID of a program or programs (comma separated)

programId

Integer

yes (or programExtId)

ID of a program or programs (comma separated)

Return value

If executed successfully, the method returns “code”: 0.

Getting reports

To get different information on service accounts (states, connections, purchases, etc.), content consumption, and content assets you may use the report method. The syntax of this method is as follows:

http[s]://<sdp_server_address>:<port>/<oss_api_prefix>/report?run_report_id=<value>&<parameter 2>=<value 2> …

Common parameters

Parameter

Type

Required?

Description

run_report_id

String

yes

The identifier of the report. It determines the contents of the report

accountNumber

String

no

The service account number

List of reports

Value of run_report_id

Report description

OSS_ACCOUNT_TARIF

States and pricing plan

OSS_TERMINAL

End-user Devices

OSS_PURCHASE

Purchasing content

OSS_SUBSCRIPTION

Subscriptions and dates

NPVR_LIST

nPVR items list

REP_ASSET_READY

Summary Reports on Content Assets

REP_CONTENT_AVAILABLE_DETAILED

Detailed Reports on Content Assets

REP_MC_VIEWS_COUNT

SVoD Content Consumption

DEVICE_ONLINE_INFO

Last Viewed Channels

REP_OTT_AUDITORIUM

Channel viewing statistics

CARE_CHANNEL_VIEW

Channel coverage

REP_ACCOUNT_CREATE_DELETE_HISTORY

Created/deleted accounts

REP_ACCOUNT_NOT_AUTHORIZED

Service accounts not authorized till now

REP_SERVICE_ACCOUNTS_WITHOUT_NEW_CONNECTIONS

Service accounts without new device connections

REP_ACCOUNT_WO_TERMINALS

Service account w/o bonded devices

REP_CHANGE_PO

Number of pricing plan changes

REP_TERMINAL_TYPE_GROUP_COUNT

Device combinations on service accounts

REP_ACCOUNT_BY_STATE

Percentage of accounts by state

REP_ACCOUNT_BY_PO

Percentage of users by pricing plan

REP_STBTYPE_COUNT

Statistics by device types

REP_VER_STBTYPE_COUNT

Statistics by app versions

REP_SERVICE_USAGE

Service consumption

REP_SERVICE_USAGE_DETAILED

Service consumption in detail

REP_PURCHASED_VOD

Purchased TVOD movies

REP_PURCHASED_VOD_DETAILED

Purchased TVOD movies in detail

REP_SVOD_DETAILED

SVOD content consumption

REP_TOP_10_PROGRAM_VIEW

Top 10 most viewed programs

State and pricing plan

Value of the run_report_id – OSS_ACCOUNT_TARIF

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

state

ExternalID of the service account state (see Service account states)

product

ExternalID of the pricing plan.

devicelimitation

ExternalID of the Device limit restriction defining the maximum number of devices of each type that could be associated with the service account

sessionlimitation

ExternalID of the Concurrent session limit applied to the service account

End-user Devices

Value of the run_report_id – OSS_TERMINAL

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

uid

Unique ID of the device

lastauthdate

Date of the last authorization in the “DD/MM/YYYY hh:mm:ss” format

devicetype

Device type (see SmartTUBE object model)

lastauthversion

SmartTUBE app version at the time of the last authorization

location

Name of the connection region

ip

IP address of an end-user device

defaultGatewayMAC

MAC address of the end-user device default gateway

Purchasing content

Value of the run_report_id – OSS_PURCHASE

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

no

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

no

End date of the report data range

lang

String

no

Language used in the report. If not set, English will be used.

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

usagedate

Date of the purchase in the “DD/MM/YYYY hh:mm:ss” format

stopdate

Expiration date of the purchase validity in the “DD/MM/YYYY hh:mm:ss” format. NULL, if there are no restrictions

contentid

ID of the purchased content

contentName

Content unit name

contentExtId

External ID of the purchased content (“ContentGroup uriId” field in the imported XML)

price

Price for the purchased content

duration

Duration of the movie rental in seconds

quality

Purchased content quality

orderId

Order ID

Subscriptions and dates

Value of the run_report_id – OSS_SUBSCRIPTION

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

no

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

no

End date of the report data range

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

usagedate

Date of the service subscription in the “DD/MM/YYYY hh:mm:ss” format

stopdate

Expiration date of the service validity in the “DD/MM/YYYY hh:mm:ss” format. NULL, if there are no restrictions

service

An external ID of the service

price

Price for adding the service

nPVR items list

Value of the run_report_id – NPVR_LIST

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

yes

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

yes

End date of the report data range

Return value

If executed successfully, the method returns the following data:

Field

Description

account_number

The service account number.

serviceId

An external identifier of the nPVR service.

channelId

An external identifier of the channel.

start_date

The start time of the program recording.

stop_date

The stop time of the program recording.

status

The status of the program recording:

  • QUERY_ACCEPT — the command to record was given;
  • WRITTEN — the program recording completed successfully;
  • CANCELED — the recording was cancelled;
  • TIMEOUT — the record is not available due to the storage time limit was reached.

dvr_program_url

URL to play the recorded asset.

Summary reports on content assets

Value of the run_report_id — REP_ASSET_READY

Summary reports display data on all content assets stored on the system. For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

formater

string

no

Report output format. Admissible values:

  • csv — export to CSV file.

If this parameter is not specified, the report will be returned to the console window in text format.

provider

string

no

Filter by content provider.

assetIsReady

boolean

no

Filter by downloaded and transcoded assets.

contentAvailable

boolean

no

Filter by available on SmartTUBE Admin UI assets. You can also use the following additional filter parameters:

  • isPublished — content unit is available for viewing by subscribers;
  • logoExists — content unit has a poster;
  • startDate — date and time when the content unit becomes available for rental;
  • endDate — date and time when the content unit stops being available for rental.
Return value

If executed successfully, the method returns the following data:

Field

Description

contentType

Content type: movie or episode.

count

The number of movies or episodes.

Detailed reports on content assets

Value of the run_report_id — REP_CONTENT_AVAILABLE_DETAILED

These reports display detailed data on each content asset stored on the system. For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

formater

string

no

Report output format. Admissible values:

  • csv — export to CSV file.

If this parameter is not specified, the report will be returned to the console window in text format.

provider

string

no

Filter by content provider.

creationDate_start

date

no

Filter by start date when content metadata (and its asset metadata) was imported to the SmartTUBE catalog for the first time. Specified in the following format: dd/mm/yyyy+hh:mm:ss

contentAvailable

boolean

no

Filter by available on SmartTUBE Admin UI assets. You can also use the following additional filter parameters:

  • isPublished — content unit is available for viewing by subscribers;
  • logoExists — content unit has a poster;
  • startDate — date and time when the content unit becomes available for rental;
  • endDate — date and time when the content unit stops being available for rental.

contentType

string

no

Filter by content type. Admissible values:

  • movie,
  • episode.
Return value

If executed successfully, the method returns the following data:

Field

Description

contentType

Content type: movie or episode.

name

Name of the content unit.

assetName

Name of the asset.

seasonNumber

Number of the season.

episodeNumber

Number of the episode.

episodeName

Name of the episode.

contentAvailable

Asset availability on SmartTUBE Admin UI.

isPublished

Content availability for watching by subscribers.

assetIsReady

Indicates whether the asset is downloaded and transcoded.

logoExists

Asset poster availability.

dateIntervalAvailable

Availability of a rental period for the asset.

logo

Path to the asset poster.

startDate

Date and time when the content unit becomes available for rental.

endDate

Date and time when the content unit stops being available for rental.

creationDate

Date and time when content metadata (and its asset metadata) was imported to the SmartTUBE catalog for the first time.

SVoD content consumption

Value of the run_report_id — REP_MC_VIEWS_COUNT

This report displays detailed data on SVoD content units viewed by subscribers for the specified period. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of the content units’ name to be displayed in the report (EN by default).

date_start

date

no

Filter by the start date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

no

Filter by the end date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

provider

string

no

Filter by externalId of the content provider.

package

integer

no

Filter by VoD package ID.

packageType

string

no

Filter by content monetization type. Admissible values:

  • svod
  • tvod
Return value

If executed successfully, the method returns the following data:

Field

Description

cId

ID of the content unit.

contentType

Content type: movie or episode.

cName

Name of the content unit.

seasonNumber

Number of the season.

episodeNumber

Number of the episode.

episodeName

Name of the episode.

uniqueSaViewsCount

Number of subscribers who watched the content unit.

viewsCount

Total number of views, including repeat views.

Last viewed channels

Value of the run_report_id — DEVICE_ONLINE_INFO

The report displays data about the TV channels most recently viewed on end-user devices. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of the channels’ name to be displayed in the report (EN by default).

Return value

If executed successfully, the method returns the following data:

Field

Description

uuid

Unique ID (UID) of the end-user device

san

Service account number

lastViewChannelId

ID of the last viewed channel

lastViewChannelName

Name of the last viewed channel

updateDate

Date and time of the last channel view record (i.e., the date and time of the last “keep alive” SmartCARE-message about the channel view)

ip

IP address of an end-user device

defaultGatewayMAC

MAC address of the end-user device default gateway

Channel viewing statistics

Value of the run_report_id — REP_OTT_AUDITORIUM

The report displays detailed info on the TV channels viewing (Live and not Live). For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

yes

Language of the channels’ name to be displayed in the report

period

integer

yes

Aggregation period. Divides the report into rows that reflect data about the specified period (5 min, 1 hour, 1 day, 1 month).

date_start

date

yes

Filter by the start date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Channel

channel_name

Channel name.

Note: the channel name is requested by its ID in the corresponding SmartTUBE dictionary.

Date

period_start

Start time of the data aggregation period.

period_end

End time of the data aggregation period (start time + user-defined aggregation frequency).

Number of viewers

fact_auditorium

The sum of live_auditorium (Number of viewers (live)) and catchup_auditorium (Number of viewers (DVR)) fields

Duration

total_min

The sum of live_min (Duration (live)) and catchup_min (Duration (DVR)) fields

Number of viewers (live)

live_auditorium

Number of channel views by all subscribers in Live mode.

If one device for the period played the channel stream 3 times for at least 60 seconds, the number of views will be 3, not 1.

Duration (live)

live_min (in seconds)

Duration of the channel playback in the Live mode by all subscribers (sec).

Number of viewers (not live)

catchup_auditorium

Number of subscriber devices played the channel in the DVR mode.

If one device for the period played the channel stream 3 times for at least 60 seconds, the number of views will be 3, not 1.

Duration (not live)

catchup_min

Duration of the channel playback in the DVR mode by all subscribers (sec).

@/live_rating_full_period/@

live_rating

Channel rating by subscriber devices that played it in the Live mode (% of devices that played the channel of the total device number across all channels for the current aggregation period).

@/catchup_rating_full_period/@

catchup_rating

Channel rating by subscriber devices that played it in the DVR mode (% of devices that played the channel of the total device number across all channels for the current aggregation period).

@/live_viewing_full_period/@

live_viewing

Channel rating by viewing duration in the Live mode (% of the channel viewing duration of the total viewing duration of all channels for the current aggregation period).

@/catchup_viewing_full_period/@

catchup_viewing

Channel rating by viewing duration in the DVR mode (% of the channel viewing duration of the total viewing duration of all channels for the current aggregation period).

theory_auditorium

Theoretical (potential) audience — the number of subscribers for whom the channel is available for viewing (the service is active).

devicetype_name

Name of the end-user device type

State and pricing plan

Value of the run_report_id – OSS_ACCOUNT_TARIF

Return value

If executed successfully, the method returns the following data:

End-user Devices

Value of the run_report_id – OSS_TERMINAL

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

uid

Unique ID of the device

lastauthdate

Date of the last authorization in the “DD/MM/YYYY hh:mm:ss” format

devicetype

Device type (see SmartTUBE object model)

lastauthversion

SmartTUBE app version at the time of the last authorization

location

Name of the connection region

ip

IP address of an end-user device

defaultGatewayMAC

MAC address of the end-user device default gateway

Purchasing content

Value of the run_report_id – OSS_PURCHASE

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

no

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

no

End date of the report data range

lang

String

no

Language used in the report. If not set, English will be used.

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

usagedate

Date of the purchase in the “DD/MM/YYYY hh:mm:ss” format

stopdate

Expiration date of the purchase validity in the “DD/MM/YYYY hh:mm:ss” format. NULL, if there are no restrictions

contentid

ID of the purchased content

contentName

Content unit name

contentExtId

External ID of the purchased content (“ContentGroup uriId” field in the imported XML)

price

Price for the purchased content

duration

Duration of the movie rental in seconds

quality

Purchased content quality

orderId

Order ID

Subscriptions and dates

Value of the run_report_id – OSS_SUBSCRIPTION

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

no

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

no

End date of the report data range

Return value

If executed successfully, the method returns the following data:

Field

Description

accountnumber

The service account number

usagedate

Date of the service subscription in the “DD/MM/YYYY hh:mm:ss” format

stopdate

Expiration date of the service validity in the “DD/MM/YYYY hh:mm:ss” format. NULL, if there are no restrictions

service

An external ID of the service

price

Price for adding the service

nPVR items list

Value of the run_report_id – NPVR_LIST

For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

date_start

MM/dd/yyyy HH:mm:ss

yes

Start date of the report data range

date_end

MM/dd/yyyy HH:mm:ss

yes

End date of the report data range

Return value

If executed successfully, the method returns the following data:

Field

Description

account_number

The service account number.

serviceId

An external identifier of the nPVR service.

channelId

An external identifier of the channel.

start_date

The start time of the program recording.

stop_date

The stop time of the program recording.

status

The status of the program recording:

  • QUERY_ACCEPT — the command to record was given;
  • WRITTEN — the program recording completed successfully;
  • CANCELED — the recording was cancelled;
  • TIMEOUT — the record is not available due to the storage time limit was reached.

dvr_program_url

URL to play the recorded asset.

Summary reports on content assets

Value of the run_report_id — REP_ASSET_READY

Summary reports display data on all content assets stored on the system. For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

formater

string

no

Report output format. Admissible values:

  • csv — export to CSV file.

If this parameter is not specified, the report will be returned to the console window in text format.

provider

string

no

Filter by content provider.

assetIsReady

boolean

no

Filter by downloaded and transcoded assets.

contentAvailable

boolean

no

Filter by available on SmartTUBE Admin UI assets. You can also use the following additional filter parameters:

  • isPublished — content unit is available for viewing by subscribers;
  • logoExists — content unit has a poster;
  • startDate — date and time when the content unit becomes available for rental;
  • endDate — date and time when the content unit stops being available for rental.
Return value

If executed successfully, the method returns the following data:

Field

Description

contentType

Content type: movie or episode.

count

The number of movies or episodes.

Detailed reports on content assets

Value of the run_report_id — REP_CONTENT_AVAILABLE_DETAILED

These reports display detailed data on each content asset stored on the system. For this run_report_id you may also specify the following parameters:

Parameter

Type

Required?

Description

formater

string

no

Report output format. Admissible values:

  • csv — export to CSV file.

If this parameter is not specified, the report will be returned to the console window in text format.

provider

string

no

Filter by content provider.

creationDate_start

date

no

Filter by start date when content metadata (and its asset metadata) was imported to the SmartTUBE catalog for the first time. Specified in the following format: dd/mm/yyyy+hh:mm:ss

contentAvailable

boolean

no

Filter by available on SmartTUBE Admin UI assets. You can also use the following additional filter parameters:

  • isPublished — content unit is available for viewing by subscribers;
  • logoExists — content unit has a poster;
  • startDate — date and time when the content unit becomes available for rental;
  • endDate — date and time when the content unit stops being available for rental.

contentType

string

no

Filter by content type. Admissible values:

  • movie,
  • episode.
Return value

If executed successfully, the method returns the following data:

Field

Description

contentType

Content type: movie or episode.

name

Name of the content unit.

assetName

Name of the asset.

seasonNumber

Number of the season.

episodeNumber

Number of the episode.

episodeName

Name of the episode.

contentAvailable

Asset availability on SmartTUBE Admin UI.

isPublished

Content availability for watching by subscribers.

assetIsReady

Indicates whether the asset is downloaded and transcoded.

logoExists

Asset poster availability.

dateIntervalAvailable

Availability of a rental period for the asset.

logo

Path to the asset poster.

startDate

Date and time when the content unit becomes available for rental.

endDate

Date and time when the content unit stops being available for rental.

creationDate

Date and time when content metadata (and its asset metadata) was imported to the SmartTUBE catalog for the first time.

SVoD content consumption

Value of the run_report_id — REP_MC_VIEWS_COUNT

This report displays detailed data on SVoD content units viewed by subscribers for the specified period. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of the content units’ name to be displayed in the report (EN by default).

date_start

date

no

Filter by the start date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

no

Filter by the end date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

provider

string

no

Filter by externalId of the content provider.

package

integer

no

Filter by VoD package ID.

packageType

string

no

Filter by content monetization type. Admissible values:

  • svod
  • tvod
Return value

If executed successfully, the method returns the following data:

Field

Description

cId

ID of the content unit.

contentType

Content type: movie or episode.

cName

Name of the content unit.

seasonNumber

Number of the season.

episodeNumber

Number of the episode.

episodeName

Name of the episode.

uniqueSaViewsCount

Number of subscribers who watched the content unit.

viewsCount

Total number of views, including repeat views.

Last viewed channels

Value of the run_report_id — DEVICE_ONLINE_INFO

The report displays data about the TV channels most recently viewed on end-user devices. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of the channels’ name to be displayed in the report (EN by default).

Return value

If executed successfully, the method returns the following data:

Field

Description

uuid

Unique ID (UID) of the end-user device

san

Service account number

lastViewChannelId

ID of the last viewed channel

lastViewChannelName

Name of the last viewed channel

updateDate

Date and time of the last channel view record (i.e., the date and time of the last “keep alive” SmartCARE-message about the channel view)

ip

IP address of an end-user device

defaultGatewayMAC

MAC address of the end-user device default gateway

Channel coverage

Value of the run_report_id — CARE_CHANNEL_VIEW

The report displays info on the number of live and DVR viewers of TV channels with the theoretical audience assumption. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

yes

Language of the channels’ name to be displayed in the report

period

integer

yes

Aggregation period, in seconds. Divides the report into rows that reflect data about the specified period. Allowed values: 86400 (1 day), 2592000 (1 month).

date_start

date

yes

Filter by the start date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of viewing content. Specified in the following format: mm/dd/yyyy+hh:mm:ss

channelId

integer

no

Filter by the Channel ID

deviceTypeId

integer

no

Filter by the Device type ID

tariffId

integer

no

Filter by the Pricing plan ID

report_type

string

no

Type of report: dur_range_with (with filtering by the viewing time), parameter is omitted (without filtering by the viewing time).

durRange

period

no

if report_type=dur_range_with, filter by channel viewing time. Set by periods in minutes: 3-5, 3-5, 5-10, 10 (i.e. more than 10 minutes). You can specify multiple periods separated by comma.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

channel_id

Channel ID

channel_name

Channel name.

Note: the channel name is requested by its ID in the corresponding SmartTUBE dictionary.

Date

period_start

Start time of the data aggregation period.

End date

period_end

End time of the data aggregation period (start time + user-defined aggregation frequency).

Number of viewers (live + DVR)

cnt_all

The total number of unique channel views by all subscriber devices in the Live and Catchup mode.

total_min

The sum of live_min (Duration (live)) and catchup_min (Duration (DVR)) fields

Number of viewers (live)

cnt_live

Number of unique channel views by all subscriber devices in the Live mode.

If one device for the period played the channel stream 3 times for at least 60 seconds, ​the number of views will be 1, not

duration_live_sec

Duration of the channel playback in the Live mode by all subscribers, in seconds.

duration_live

Duration of the channel playback in the Live mode by all subscribers, in the format HH:MM:SS.

Number of viewers (DVR)

cnt_nonlinear

Number of unique channel views​ by all subscriber devices in the DVR mode.

If one device for the period played the channel stream 3 times for at least 60 seconds, ​the number of views will be 1, not 3.​

duration_nonlinear_sec

Duration of the channel playback in the Catch-up mode by all subscribers, in seconds.

duration_nonlinear

Duration of the channel playback in the Catch-up mode by all subscribers, in the format HH:MM:SS.

Theoretical audience

theory_auditorium

Theoretical (potential) audience — the number of subscribers for whom the channel is available for viewing (the service is active).

devicetype_name

Name of the end-user device type

Created/deleted accounts

Value of the run_report_id — REP_ACCOUNT_CREATE_DELETE_HISTORY

The report displays the number of accounts added / deleted during the specified period. Deleted accounts — accounts that have passed to the “Closed” state. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

yes

Language of data to be displayed in the report

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Date

date

Calendar day

Created

created

The number of created service accounts

Deleted

deleted

The number of deleted service accounts (accounts that have passed to the “Closed” state)

Service accounts not authorized till now

Value of the run_report_id — REP_ACCOUNT_NOT_AUTHORIZED

The report displays a list of service accounts without any activity (authorizations) for the specified period until today. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of data to be displayed in the report

days

integer

yes

The number of days until today during which accounts should have no authorizations

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

ID

id

Service account number

Name

name

Service account name

state

Service account state

Service accounts without new connections

Value of the run_report_id — REP_SERVICE_ACCOUNTS_WITHOUT_NEW_CONNECTIONS

The report displays a list of service accounts without any activity (device connections) for the specified period until today. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of data to be displayed in the report

days

integer

yes

The number of days until today during which accounts should have no terminal connections

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

ID

id

Service account number

Name

name

Service account name

State

state

Service account state

Service account w/o linked devices

Value of the run_report_id — REP_ACCOUNT_WO_TERMINALS

The report displays a list of accounts that either do not have any bonded devices, or all devices have no UID.

This run_report_id does not require any additional parameters.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

ID

id

Service account number

Name

name

Service account name

Number of pricing plan changes

Value of the run_report_id — REP_CHANGE_PO

The report displays the number of pricing plan shifts for the period with details by plan names. For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

lang

string

no

Language of data to be displayed in the report

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

oldProductOfferId

integer

no

Filter by previous pricing plan ID

newProductOfferId

integer

no

Filter by new pricing plan ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

oldProductOfferId

Previous pricing plan ID

Previous pricing plan

oldProductOfferName

Previous pricing plan name

newProductOfferId

New pricing plan ID

New pricing plan

newProductOfferName

New pricing plan name

Quantity

count

The number of pricing plan shifts

Device combinations on service accounts

Value of the run_report_id — REP_TERMINAL_TYPE_GROUP_COUNT

The report displays all the unique combinations of devices connected to the accounts.

This run_report_id does not require any additional parameters.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service account state

STATE

Service account state

Device combinations

TYPES

Combination of end-user devices bound to the account, in the format [device_type]-[quantity]; [device_type]-[quantity], …

Service account count

CNT

Number of account with a such device combination

Device count

DEVCOUNT

Number of end-user devices total over accounts with a such device combination

Percentage of accounts by state

Value of the run_report_id — REP_ACCOUNT_BY_STATE

The report displays the number and percentage of accounts by state on the specified day.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Creation date

create_date

Report date

Name

name

Account state

Quantity

count

Number of accounts with this state

Percentage

percentage

The share of accounts with this state in relation to the total number of accounts

Percentage of users by pricing plan

Value of the run_report_id — REP_ACCOUNT_BY_PO

The report displays the number and percentage of accounts by pricing plan for the period.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Product offer

po_name

Name of the price plan

Percentage

percentage

The share of accounts with this pricing plan in relation to the total number of accounts

Count

cnt

Number of accounts with this pricing plan

full

Total number of accounts

Statistics by device types

Value of the run_report_id — REP_STBTYPE_COUNT

The report displays the number of devices of different types.

This run_report_id does not require any additional parameters.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Device type

stb_type

Device type

Quantity

count

Number of devices

Statistics by app versions

Value of the run_report_id — REP_VER_STBTYPE_COUNT

The report displays the number of devices of different SmartTUBE app versions.

This run_report_id does not require any additional parameters.

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Device type

dev_type

Device type

Version

version

SmartTUBE app version

Count

cnt

Number of devices

Service consumption

Value of the run_report_id — REP_SERVICE_USAGE

The report displays the number of accounts by consumed services (bundles).

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

serviceSpecId

integer

no

Filter by the service (bundle) ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service

name

Name of the service (bundle)

Quantity

count

Number of accounts that have subscribed on this service (bundle)

Price

sum

The sum of fees charged for subscriptions

Service consumption in detail

Value of the run_report_id — REP_SERVICE_USAGE_DETAILED

The report displays info on the consumption of services, detailed by accounts.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

serviceSpecId

integer

no

Filter by the service (bundle) ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service account number

accountNumber

Service account number

Service account name

accountName

Service account name

State of service account

accountStateExternalId

Service account state

Pricing plan of Service account

poName

Name of the pricing plan that the service account is subscribed to

poExternalId

External ID of the pricing plan

Service

name

Name of the service (bundle)  that the service account is subscribed to

Start date

start_date

Date of subscription to the service

End date

stop_date

Date of unsubscription from the service. If empty, the service is subscribed to the end date of the report.

Price

price

Price of the service

Purchased TVOD movies

Value of the run_report_id — REP_PURCHASED_VOD

The report displays the number of movie purchase facts in the specified time frame throughout the whole subscriber base.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Content

contentName

The movie or series name

Content type

contentType

Content type: video (movie) or episode

Package

packageName

TVOD bundle name

Provider

providerName

Content provider name

EST

isEst

The sign of the EST purchase (the movie is bought forever), i.e. the movie has no date_end (or stopDate = null).

Success

success

The movie purchase was successfully carried out by OSS / BSS

Quantity

count

The number of movie purchases

Price

sum

The sum of fees charged for the movie

Purchased TVOD movies in detail

Value of the run_report_id — REP_PURCHASED_VOD_DETAILED

The report displays the number of movie purchase facts in the specified time frame with account detail.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service account number

accountNumber

Service account number

Content

contentName

The movie or series name

Content type

contentType

Content type: video (movie) or episode

Episode title

episodeName

The episode name

Season number

seasonNumber

Season number

Episode number

episodeNumber

Episode number

Package

packageName

VOD bundle name

Provider

providerName

Content provider name

EST

isEst

The sign of the EST purchase (the movie is bought forever), i.e. the movie has no date_end (or stopDate = null).

Success

success

The movie purchase was successfully carried out by OSS / BSS

Date of purchase

usageDate

Date of movie purchase

Start date

startDate

Start date of the movie rental period

End date

stopDate

End date of the movie rental period

OSS

ossComment

Сomment from OSS / BSS on the failed movie purchase

Price

price

Movie price

orderId

Order ID

Detailed report by SVOD

Value of the run_report_id — REP_SVOD_DETAILED

The report displays the number of movie purchase facts in the specified time frame with account detail.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

no

Language of data to be displayed in the report

provider

string

no

Filter by externalId of the content provider

package

integer

no

Filter by VoD package ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Service account number

accountNumber

Service account number

Content

contentName

The movie or series name

Content type

contentType

Content type: video (movie) or episode

Package

packageName

VOD bundle name

Provider

providerName

Content provider name

EST

isEst

The sign of the EST purchase (the movie is bought forever), i.e. the movie has no date_end (or stopDate = null).

Success

success

The movie purchase was successfully carried out by OSS / BSS

Date of purchase

usageDate

Date of movie purchase

Start date

startDate

Start date of the movie rental period

End date

stopDate

End date of the movie rental period

OSS

ossComment

Сomment from OSS / BSS on the failed movie purchase

Price

price

Movie price

Content ID

contentId

Movie ID

Content external ID

contentExtId

Movie external ID

Season number

seasonNumber

Season number

Episode number

episodeNumber

Episode number

Episode title

episodeName

The episode name

Service external ID

serviceExtId

VOD bundle external ID

Provider external ID

providerExtId

Content provider external ID

Top 10 most viewed interactive items

Value of the run_report_id — REP_TOP_10_PROGRAM_VIEW

The report displays the number of TV program in-archive views for the specified time frame.

For this run_report_id you may specify the following parameters:

Parameter

Type

Required?

Description

date_start

date

yes

Filter by the start date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

date_end

date

yes

Filter by the end date of the report. Specified in the following format: mm/dd/yyyy+hh:mm:ss

lang

string

yes

Language of data to be displayed in the report

channelId

integer

no

Filter by channel ID

Return value

If executed successfully, the method returns the following data:

Parameter in UI

API response

Description

Channel

channel_name

Channel name

Programme name

program_name

Program name

Number of viewers

view_cnt

Number of channel views by all subscribers.

If one device for the period played the channel stream 3 times for at least 60 seconds, the number of views will be 3, not 1

OSS/BSS-side Methods

The methods below can be optionally implemented on the OSS/BSS side:

Method

Purpose

activate_uid

Device activation

deactivate_uid

Device deactivation

deactivate_account

Service account removing

authorize_uid

Device authorization

purchase

Purchasing content

subscribe_request

Adding or refusing from a service

prepare_subscribe_request

Subscription preorder

confirm_subscribe_request

Confirmation of subscription preorder

cancel_subscribe_request

Cancel the subscription preorder in case of error

prepare_purchase

Content purchase preorder

confirm_purchase

Confirmation of content purchase preorder

cancel_purchase

Cancel the content purchase preorder in case of error

device_get_info

Password-free linking of devices to an account

In order to avoid delays in SmartTUBE Apps, the answer from OSS/BSS to these methods must be returned in 5 seconds. If the transaction is delayed, it is recommended to return immediately=true as the answer to the method subscribe_request (Adding or declining a service bundle ).

Devices and Accounts

activate_uid

The method informs about device activation, i.e. UID creation for the device at the moment of the device linking to the already existing service account by login and password. The feature is controlled by the parameters multiroom.oss.relink.activate.send, multiroom.oss.relink.likeSdp4Rebind.activate.send, serviceAccount.terminal.adminUI.oss.activateIfUpdateUuid.send, oss.methods.activate.send of the SmartTUBE SDP configuration file system.conf.

Method name

activate_uid

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

serialNumber

String

no

Serial number

login

String

no

The login for device linking to the service account

terminalName

String

no

Connection name

Return values

code=”0″ is returned in case of success.

deactivate_uid 

The method informs about device unlinking from the service account. The feature is controlled by the parameters multiroom.oss.relink.deactivate.send, multiroom.oss.relink.likeSdp4Rebind.deactivate.send, serviceAccount.terminal.adminUI.oss.deactivateIfUpdateUuid.send, serviceAccount.terminal.adminUI.oss.deactivateIfClearUuid.send, serviceAccount.terminal.adminUI.oss.deactivateIfDeleteTerminal.send, serviceAccount.adminUI.oss.deactivateTerminalsIfDeleteAccount.send, oss.methods.account.deactivate.send of the SmartTUBE SDP configuration file system.conf.

Method name

deactivate_uid

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

serialNumber

String

no

Serial number

login

String

no

The login device is linked by to the service account

terminalName

String

no

Connection name

Return value

code=”0″is returned in case of success.

deactivate_account 

The method informs about the service account removal. The feature is controlled by the serviceAccount.adminUI.oss.deactivateIfDeleteAccount.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

deactivate_account

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

Return value

code=”0″is returned in case of success.

authorize_uid 

The method informs about the authorization of the end-user device. The feature is controlled by the oss.methods.authorize.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

authorize_uid

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

serialNumber

String

no

Device serial number

terminalName

String

no

Device name (connection name)

location

String

no

Name of the connection region

ip

String

no

IP address of the client device

appVersion

String

no

Version of the client application

isDemo

Boolean

no

Sign of a demo account

defaultGatewayMAC

String

no

Default gateway MAC address

ex_<param1>

ex_<paramN>

no

Additional parameters with the “ex_” prefix, received from client devices by the SmartTUBE SDP server (see the “Managing Additional Parameters” chapter below).

Return value

code=”0″ is returned in case of success.

In case of an error on the OSS side, the response is written to the log, a notification is sent to the email (if configured), and the error is ignored (so that authorization works normally and the SmartTUBE App can load).

Managing Additional Parameters

The list of additional parameters is managed in the SmartTUBE SDP configuration file system.conf:

oss = {

 methods.authorize.send = true # whether to send the ‘authorize_uid’ request to the OSS during client authorization (by default, false)

 methods.authorize.extraInfo.send = true # whether to send additional data (by default, true)

 methods.authorize.extraInfo.paramList = “defaultGatewayMAC” # list of additional parameters (their names without the ‘ex_’ prefix, separated by commas) to be sent with the ‘authorize_uid’ request

}

Services managing

The following methods are used to manage service subscriptions and content purchases. The logic and use of these methods differs for the “1-stage” and “2-stage” billing modes.

purchase 

The method purchases content. The feature is controlled by the oss.methods.purchase.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

purchase

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

contentType

String

yes

Type of the content:

  • METACONTENTBUNDLE – season,
  • METAEPISODE – episode,
  • METAMOVIE – movie,
  • METASERIES – series

contentId

Integer

yes

ID of the purchased content

contentExtId

Integer

no

External ID of the purchased content (“ContentGroup uriId” field in the imported XML).

Note: The parameter is passed in escaped form to exclude invalid for HTTP characters.

contentName

String

no

Name of the content in the language that has the highest priority in Admin UI

price

Number

yes

Price for the purchased content

stopDate

MM/dd/yyyy HH:mm:ss

no

Expiration date of purchase validity

orderId

Integer

no

Preorder or order ID

Return value

code=”0″ is returned in case of success.

subscribe_request 

The method sends data on the service that is being added or removed. Based on the reply the decision is made on the SmartTUBE side whether to add a service or not. The feature is controlled by the oss.methods.subscribe.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

subscribe_request

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

The service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type (see SmartTUBE object model)

serviceEId

Number

yes

An external ID of the service

serviceName

String

no

Name of the service in the language that has the highest priority in Admin UI

state

String

yes

Action:

  • 1 – add the service
  • 0 – refuse from the service

price

Number

yes

Price for adding the service

stopDate

MM/dd/yyyy HH:mm:ss

no

Expiration date of the service validity

orderId

Integer

no

Preorder or order ID

uiField_xxx

String

no

Optional field passed from a user-filled form in the Сlient UI for subscribing to a specific service, where xxx — a field name. For example, uiField_email, uiField_promoCode

Return value

If executed successfully, the method returns the following data:

Field

Description

immediately

An attribute indicating the necessity to add or remove a service on the side of the SmartTUBE:

  • true – the service is added or removed at once,
  • false – the service will not be added or removed until the request subscribeService is received (see Adding a service). This value is recommended if, for example, generating a reply to this method call takes more than 5 seconds
Example:

{ “code”:0, “immediately”:true }

prepare_subscribe_request 

The method informs about the pre-ordering of a service subscription. The feature is controlled by the oss.methods.subscribe.send parameter of the SmartTUBE SDP configuration file system.conf.

Method name

prepare_subscribe_request

Call parameters

Parameter

Type

Required?

Description

accountNumber

String

yes

Service account number

uid

String

yes

Unique ID of the device

deviceType

String

yes

Device type

serviceEId

Integer

yes

An external ID of the service

serviceName

String

no

Name of the service in the language that has the highest priority in Admin UI

state

String

yes

Action:

  • 1 – add the service
  • 0 – refuse from the service

price

Integer

yes

Price for adding the service

orderId

Integer

yes

Preorder ID

stopDate

MM/dd/yyyy

HH:mm:ss

no

Expiration date of the service validity

Return values

If executed successfully, the method returns the following data:

Field

Description

immediately

An attribute indicating the necessity to add or remove a service on the side of the SmartTUBE:

    <li style=”line-height: 1.0;margin

SmartTUBE nPVR API

SmartTUBE nPVR API is a set of methods allowing OTT operators to provide nPVR service to the SmartTUBE platform subscribers. This methods should be implemented on the side of recording service.

There are two possible interaction techniques:

  • HTTP(S) GET requests with JSON response
    To enable this technique on the SmartTUBE side, you need to select httpNPVRAPI in the SmartTUBE Admin Console > Dictionaries > Servers > Video servers > [server from already listed or add a new one] > Video server type field. And than assign this server to desired channels in the Channels > Channels > [desired channel] > Streams tab > [channel stream from already listed or add a new one] > Video server name field.
  • HTTP(S) POST requests with JSON-RPC response
    To use this technique, please select SmartMEDIA instead of httpNPVRAPI.

The format of requests and responses are provided below.

HTTP(S) GET requests with JSON response

Request Format

API methods are called using HTTP(S) GET requests. The type of the protocol (HTTP or HTTPS) depends on the server settings. HTTPS requests are sent over a secure SSL connection.

The syntax of an API method call using GET is as follows:

http[s]://<server address>:<server port>/<prefix>/<method name>?<parameter 1>=<value 1>&<parameter 2>=<value 2> …

The <prefix> depends on the recording server deployment settings. Typically, the prefix is /npvr/.

Example of URL for recording of some program:

https://10.65.160.160:80/npvr/CreateProgram?npvr_channel_id=CHANNEL_SPORT24&utc_start_sec=1677509735&utc_end_sec=1677513335

Response Format

If a method is executed successfully, the server returns requested data in the following JSON format:

{

 “field 1”:“field 1 value”,

 “field 2”:“field 2 value”,

 “field 3 – list”: [

   {

     “field 3.1”:“field 3.1 value for the list item 1”,

     “field 3.2”:“field 3.2 value for the list item 1”

   }

   {

   “field 3.1”:“field 3.1 value for the list item 2”,

   “field 3.2”:“field 3.2 value for the list item 2”

   }

 ]

}

or error message:

{

   “status”: “error message” 

}

For example, the ProgramStatus method can return the following data:

{

   “status”: “scheduled”,

   “url”: “http://10.65.50.60/pvr/prog16736”

}

or error message:

{

   “status”=“not_found” 

}

HTTP(S) POST requests with JSON-RPC response

This technique is used by the SmartMEDIA SmartPVR service, but it can be implemented on the side of any other recording service. A description on how to use it and supported methods is provided in the following articles:

API Methods

Schedule a Program Recording

The method creates a job to generate a program from the content aired in the period between the utc_start_sec and utc_end_sec timestamps on the npvr_channel_id channel. The content from the specified time interval is combined into a single asset.

Method Name

CreateProgram

Example of Method URL

http://10.65.193.70:80/npvr/CreateProgram?npvr_channel_id=CHANNEL_SPORT24&utc_start_sec=1677509735&utc_end_sec=1677513335

Query Parameters

npvr_channel_id, string

Unique channel ID (to recognize a channel on the video server)

utc_start_sec, number

Recorded program start time (UTC in seconds)

utc_end_sec, number

Recorded program end time (UTC in seconds)

The set of parameters npvr_channel_id, utc_start_sec, utc_end_sec must be unique. If you try to regenerate the program with parameters that match the already generated program, the method will return an error.

Note for the SmartMEDIA SmartPVR service: the program duration (the difference between utc_end_sec and utc_start_sec) must fit in the interval between the configuration parameters min_program_duration and max_program_duration, otherwise the method will return an error.

Response

If executed successfully, the method returns the following data:

status, string

Status of program recording job. Allowable values:

  • scheduled — the program recording is scheduled
  • in_progress — the program recording is already started and in progress now
  • complete — the program recording is completed successfully
  • not_found — the program or channel is not found on the recording server
  • failed — other error

program_id, number

Unique ID of a recorded program

url, string

URL to view the recorded program on the end-user devices

utc_start_sec, number

Recorded program start time (UTC in seconds)

utc_end_sec, number

Recorded program end time (UTC in seconds)

Example of Successful Response

{

   “status”: “scheduled”,

   “program_id”: “16736”,

   “url”: “http://10.65.50.60/pvr/prog16736”,

   “npvr_channel_id”: “CHANNEL_SPORT24”,

   “utc_start_sec”: “1677509735”,

   “utc_end_sec”: “1677513335”

}

Delete a Recorded Program

The method deletes either an already created program or a scheduled job for program creation.

Method Name

RemoveProgram

Example of Method URL

http://10.65.193.70:80/npvr/RemoveProgram?program_id=16736

Query Parameters

program_id, number

Unique ID of a recorded program

Response

If executed successfully, the method returns an empty response, which means that the requested program was successfully deleted.

If an error occurs, the method returns the following data:

status, string

Result of program removal. Allowable values:

  • not_found — the program is not found on the recording server
  • failed — other error

program_id, number

Unique ID of a recorded program

Example of Successful Response

{

}

Example of Failed Response

{

   “status”: “not_found” 

}

Program Status

The method returns the status and other properties of the program generated using the CreateProgram method.

Method Name

ProgramStatus

Example of Method URL

http://10.65.193.70:80/npvr/ProgramStatus?program_id=16736

Query Parameters

program_id, number

Unique ID of a recorded program (from the CreateProgram response)

Response

If executed successfully, the method returns the following data:

status, string

Status of program recording job. Allowable values:

  • scheduled — the program recording is scheduled
  • in_progress — the program recording is already started and in progress now
  • complete — the program recording is completed successfully
  • not_found — the program or channel is not found on the recording server
  • failed — other error

program_id, number

Unique ID of a recorded program

url, string

URL to view the recorded program on the end-user devices

Example of Successful Response

{

   “status”: “scheduled”,

   “url”: “http://10.65.50.60/pvr/prog16736”

}

EPG Import Format

Download as PDF

The SmartTUBE SDP supports two EPG import formats:

  • XMLTV
    XMLTV is a popular modern standard for describing TV listings. One file contains EPG for all channels. You can find a description and example of this format on the official XMLTV Wiki.
  • SmartLabs EPG XML
    Simplified XML format developed by SmartLabs. One file contains EPG for one channel. All subsequent chapters of this section describe this format. You can use this  for XML validation.

Regardless of your choice only HTTP(S) is supported as the EPG delivery protocol.

Program Identification

The TV programs are identified and matched by <id> field. Programs with unknown IDs are treated as new. The action which will be performed to the TV show is specified by the following logic:

  1. If the <status> field have the following values:
    • delete — the TV show will be unpublished. It is enough to specify only <id>, <status> and <channel_id> for this action (in this case, the other fields will be ignored, and no changes will be made to these fields);
    • update — the TV show attributes will be updated with metadata from the import file.
  1. If the <status> field is not specified or have another value:
    • if the TV show does not exist — a new TV show with metadata from the import file will be created;
    • if the TV show exists and <change_date> is equal to its previous value — no actions will be performed (the TV show will be ignored).
    • if the TV show exists and <change_date> is not equal to its previous value — TV show attributes will be updated with the specified data, including saving current <change_date> value.

Genres, Categories and Countries Identification

  • The content Genres, Categories and Countries are determined by the <dictionaries> section, as shown below (see “Example of SmartLabs EPG XML Format”). Once imported, they are stored in the corresponding dictionaries of the SmartTUBE SDP.
  • Multilanguage values are supported.
  • If the <event> section contains unknown Genres, Categories or Countries, the SmartTUBE SDP creates them anyway. In such cases they are created only for the default language (determined by the default-profile-language parameter in the SmartTUBE SDP configuration file system.conf).

Image Identification

The identification of image type (<image> tag) is performed as follows:

  1. By the header Content-Type: image/jpeg or Content-Type: image/png;
  2. If the header was not recognized, by the file extension in the URL (e.g. http://image.storage/imagename.png);
  3. If the file extension was not recognized, the error is logged.

Failure Notifications

In order to control the EPG import process result, you can configure email alerts in the SmartTUBE Admin Console > Administration > Email Alerts. You can also find useful information in the smarttube service log.

You can also call the import externally and get back results of such process the following way:

$ curl –H “Content-Type: application/json” -X POST –d ‘{“method”: “epgimport#doheapimport”, “params”: {“epg-import.url”: “http://epg_source_host_ip:port/epg.xml”}, “id”: 1 }’ http://smarttube_sdp_ip:port/sdpapibd

// Return Example

{
“result”: {
“ok”:681, // Number of successfuly imported events
    “errors”:0 // Number of events with errors
  },
“id”:1
}

Recommendations for Optimizing EPG Import

  • To reduce the load on the server and speed up the EPG data processing, we recommend you to make the daily import affect only 2-3 days, and re-import all programs and create new ones only once a week.
  • To ensure that EPG is displayed correctly in the SmartTUBE apps and that nPVR services work correctly, it is recommended to maintain a database of program IDs and, before importing, only check whether programs have been removed from the EPG. This way you can <update> all programs every time, and <delete> only if it is really necessary.
  • The | and * characters should be avoided in the import file, since they can be used as internal string separators. As a result, imported strings may not be displayed on end-user devices. We recommend replacing the separators as follows:
    * -> ”
    | -> /

Maximum Field Length

Please see the table below for the maximum field lengths in the SmartLabs EPG XML format:

Name of Field

Default Max Length, symbols

title

300

details/subtitle

300

details/description

4000

dictionaries/genres/genre/id

300

dictionaries/genres/genre/name

300

dictionaries/categories/category/id

300

dictionaries/categories/category/name

300

dictionaries/countries/country/id

300

dictionaries/countries/country/name

300

details/genre

300

details/category

300

details/country

300

details/team/member/name

300

details/team/member/role

300

Example of SmartLabs EPG XML Format

<?xml version=“1.0” encoding=“UTF-8”?>
<schedule>
    <!– Values in several languages for the Name field of Content genres (<genres>), Content categories (<categories>) and Countries (<countries>) dictionaries. Specify in the id attribute the external ID of dictionary element (e.g. of the genre), in the lang_id attribute – the language ID–>
    <dictionaries>
        <genres>
            <genre id=“Melodrama”>
                <name lang_id=“131”>Мелодрама</name>
                <name lang_id=“111”>Melodrama</name>
            </genre>
            <genre id=“Comedy”>
                <name lang_id=“131”>Комедия</name>
                <name lang_id=“111”>Comedy</name>
            </genre>
        </genres>
        <categories>
            <category id=“New”>
                <name lang_id=“131”>Новинки</name>
                <name lang_id=“111”>New</name>
            </category>
            <category id=“Classic”>
                <name lang_id=“131”>Классика</name>
                <name lang_id=“111”>Classic</name>
            </category>
        </categories>
        <countries>
            <country id=“Slovenia”>
                <name lang_id=“131”>Словения</name>
                <name lang_id=“111”>Slovenia</name>
            </country>
            <country id=“USA”>
                <name lang_id=“131”>США</name>
                <name lang_id=“111”>USA</name>
            </country>
        </countries>
    </dictionaries>
    <!– Information about the TV program–>
    <event>
        <!– Unique ID of the TV program. Two <event> elements with the same ID are not allowed –>
        <id>10001</id>
        <!– Action –>
        <status>update</status>
        <!– The date and time the TV program was created or last edited (UTC). This value is stored as an internal SDP field. When you re-import a TV program with the same <id>, the new <change_date> value is compared to the previous one. Depending on the result of the comparison, the action described above is performed. –>
        <change_date>20.12.2016 13:00:00</change_date>
        <!– Date and time, when the TV program starts (UTC). To display the EPG grid correctly in the SmartTUBE app, please avoid duplicating the start and finish times of events. –>
        <start>21.12.2016 14:30:00</start>
        <!– Date and time, when the TV program finishes (UTC). To display the EPG grid correctly in the SmartTUBE app, the finish date of the TV program must be equal to the start of the next TV program on this channel (i.e, it is necessary to avoid overlaps and holes in the program guide.) –>
        <finish>21.12.2016 15:00:00</finish>
        <!– Flag indicating that the episode is being aired for the first time (not a repeat). Possible values: 1 or 0. The tag is optional. If not set, it is assumed to be “0”. –>
        <first_showing>1</first_showing>
        <!– Original air date (first broadcast (UTC), not repeat) –>
        <original_air_date>21.12.2016 09:00:00</original_air_date>
        <!– External ID of the channel –>
        <channel_id>1</channel_id>
        <!– Not used –>
        <recomended>0</recomended>
        <!– Flag to prohibit the TSTV service for the program: 0 – disallow; 1 – allow.
If the current program has recordable=0, it can only be viewed in Live mode, with rewind disabled.
If the previous program has recordable=1 and the user rewinds to the current program using the “Right” button on the remote, the progress bar will automatically rewind to the Live moment when program switching. This flag does not impact the nPVR service and is ignored for test service accounts. –>
        <recordable>0</recordable>
        <!– Flag to prohibit the Pause Live service for the program: 0 — disallow, 1 — allow. This flag does not impact the nPVR service and is ignored for test service accounts. –>
        <pausable>1</pausable>
        <!– TV program name. The attribute lang_id is a language ID. If it is not set, then the default lang_id value is used.–>
        <title lang_id=“131”>Безумцы</title>
        <title>Mad Men</title>
        <details>
            <!– Original title of a movie, TV show, episode, etc. –>
            <title_original>Holby City</title_original>
            <!– Episode name for the series (in several languages if needed, see lang_id description above) –>
            <subtitle lang_id=“131”>Листья чая</subtitle>
            <subtitle>Tea Leaves</subtitle>
            <!– Description (in several languages if needed, see lang_id description above) –>
            <description lang_id=“131”>Пегги проводит собеседование с неприятным молодым копирайтером…</description>
            <description>Peggy interviews an obnoxious young copywriter for a job, the firm tries to get…</description>
            <!– TV program genre, comma-separated lists are supported (list of comma-separated “external ids”) –>
            <genre>Drama,Adventure</genre>
            <!– Category, comma-separated lists are supported (list of comma-separated “external ids”) –>
            <category>New,New_Series</category>
            <!– Production сompany (not used) –>
            <company>Lionsgate Television</company>
            <!– Country, comma-separated lists are supported (list of comma-separated “external ids”) –>
            <country>Slovenia,USA</country>
            <!– Year –>
            <year>2007</year>
            <!–
Age rating.
Can take the following values:
0+ – no restrictions
6+ – the content is allowed for the 6-year-old children and older
12+ – the content is allowed for the 12-year-old children and older
16+ – the content is allowed for the 16-year-old children and older
18+ – not allowed for people under 18 years old
If omitted, the channel’s age rating is applied.
–>
            <age_restriction>16+</age_restriction>
            <!– Program poster. Absolute URL to the image (size not less than 350×200 pixels; proportions-insensitive, since SmartTUBE resizes images according to the SmartTUBE app requests). If missing or omitted, apps use an image from the program genre. If also missing, the image from the channel subject is used. If it is also missing, the placeholder is used.–>
            <image>http://xmltv.tv-company.com/loadimage.php?id=3201776&width=400&height=300</image>
            <!– URL of the additional logo overlaid on top of the stream –>
            <logo_for_stream>http://xmltv.tv-company.com/some-image.png</logo_for_stream>
            <!– X coordinate of the upper-left corner of the logo. Specified in pixels from the upper-left corner of the video image. This URL must be accessible to SmartMEDIA Recorder performing the logo overlay. –>
            <logo_for_stream_x>155</logo_for_stream_x>
            <!– Y coordinate of the upper-left corner of the logo. Specified in pixels from the upper-left corner of the video image. –>
            <logo_for_stream_y>255</logo_for_stream_y>
            <!– Cast and crew –>
            <team>
                <!– First personality –>
                <member>
                    <!– Full name of the personality –>
                    <name>Phil Abraham</name>
                    <!– Role in the production. Possible values: actor, director, screenplay, operator, composer, producer, host, designer, montage –>
                    <role>director</role>
                </member>
                <!– Second personality –>
                <member>
                    <name>Tony Smith</name>
                    <role>composer</role>
                </member>
                <!– Third personality –>
                <member>
                    <name>Elisabeth Moss</name>
                    <role>actor</role>
                </member>
                <!– Others –>
            </team>
            <!– Identifier of a series for recording all its episodes. Must be unique over the channels. –>
            <series_id>x123y456</series_id>
            <!– Season and episode numbers of a program. Comma-separated enumeration of season/episode numbers is not supported. –>
            <season_number>1</season_number>
            <episode_number>10</episode_number>
            <!– External price category ID of the PPV TV program –>
            <ppv_ext_id>DSX4869D</ppv_ext_id>
            <!– Device types that cannot watch this program as an nPVR –>
            <npvr_unsupported_device_type>IPHONE</npvr_unsupported_device_type>
            <npvr_unsupported_device_type>IPAD</npvr_unsupported_device_type>
            <!– Flag to record the program to the Catch-up Content Library, i.e. accessible via content rails on the Home screen of SmartTUBE Apps: 1 — enabled; 0 — dissabled. –>
            <public_npvr>0</public_npvr>
            <!– Flag to blackout (overlap) the program with the <black_out_image> image: 1 – blackout the program, 0 (or omitted) – do not blackout –>
            <black_out>0</black_out>
            <!– URL of the image to blackout (overlap) the program –>
            <black_out_image>http://some-image.png</black_out_image>
        </details>
        <!– More images (screenshots); absolute URLs to the images (size not less than 350×200 pixels; if bigger, consider the proportions) –>
        <gallery>
            <image>http://img.xprsdata.com/images/ac_series_1762__SLF3995.png</image>
            <image>http://img.xprsdata.com/images/ac_series_1762__SLF3996.png</image>
        </gallery>
    </event>
    <!–Information on the next TV program –>
    <event>
        <id>10002</id>
        <status>update</status>
        <change_date>20.12.2016 13:00:00</change_date>
        <start>21.12.2016 15:00:00</start>
        <finish>21.12.2016 15:30:00</finish>
        <first_showing>1</first_showing>
        <original_air_date>07.07.2016 09:00:00</original_air_date>
        <channel_id>1</channel_id>
        <recomended>0</recomended>
        <recordable>0</recordable>
        <pausable>1</pausable>
        <title lang_id=“131”>Кот по имени Мурзик</title>
        <title>The cat named Murzik</title>
        <details>
            <subtitle lang_id=“131”>Новые приключения</subtitle>
            <subtitle>New Adventures</subtitle>
            <description lang_id=“131”>Кот Мурзик отправляется на поиски новых приключений</description>
            <description>Murzik the cat goes in search of new adventures</description>
            <genre>Comedy,Cartoon</genre>
            <category>New,New_Cartoons</category>
            <company>Lionsgate Television</company>
            <country>Slovenia,USA</country>
            <year>2017</year>
            <age_restriction>0+</age_restriction>
            <image>http://xmltv.tv-company.com/loadimage.php?id=3201778&width=400&height=300</image>
            <logo_for_stream>http://xmltv.tv-company.com/some-image2.png</logo_for_stream>
            <logo_for_stream_x>155</logo_for_stream_x>
            <logo_for_stream_y>255</logo_for_stream_y>
            <team>
                <member>
                    <name>Phil Abraham</name>
                    <role>director</role>
                </member>
                <member>
                    <name>Tony Smith</name>
                    <role>composer</role>
                </member>
                <member>
                    <name>Elisabeth Moss</name>
                    <role>actor</role>
                </member>
            </team>
            <series_id>x123y457</series_id>
            <season_number>2</season_number>
            <episode_number>1</episode_number>
            <ppv_ext_id>DSX4868D</ppv_ext_id>
            <npvr_unsupported_device_type>IPHONE</npvr_unsupported_device_type>
            <npvr_unsupported_device_type>IPAD</npvr_unsupported_device_type>
            <public_npvr>1</public_npvr>
        </details>
        <gallery>
            <image>http://img.xprsdata.com/images/ac_series_1762__SLF3997.png</image>
            <image>http://img.xprsdata.com/images/ac_series_1762__SLF3998.png</image>
        </gallery>
    </event>
</schedule>

Change Log

SmartTUBE 8.4

  • Support for the <public_npvr> tag added for the SmartLabs EPG XML format added

SmartTUBE 7.10

  • Support for the <title_original> tag added for the SmartLabs EPG XML format added

VoD Metadata Import Format

Download as PDF

SmartTUBE supports two VoD metadata formats:

  • SmartLabs format — based on CableLabs 3.0 with extensions, additional fields, and provides improved support for multiple languages.
  • HBO format — based on CableLabs 3.0 with discarding some XML fields. HBO importer processes only data specified in the chapter “HBO Format Example.”

Setting up automatic regular content import is described in the “Configuring Regular VOD Import” topic.

SmartLabs VoD Metadata Format

Basic Concepts

  • All movies are imported from one XML file with the <ADI3>root. The file is downloaded via HTTP.
  • One movie is represented by a set of elements: Movie (1 or more),  PreviewPosterTitle and ContentGroupContentGroup links together all metadata blocks related to the movie.
  • The licensing window start and end are individually specified for each movie as the <ContentGroup> attributes.
  • In contrast to CableLabs 3.0, any number of genres can be specified for a movie (0 and more).
  • You can specify several genres, rubrics (content type), countries and persons (actors, directors, producers) by using several xml tags. Each tag has a string uriId (or externalId) attribute and String value (name). Attribute uriId/externalId corresponds to the object’s external ID in the SDP DB. SDP uses this identifier to search this object (genre/country/etc.) in its DB when importing. If there is no object with such an external ID in SDP, the platform adds the new object with the defined name and external ID. If the object with such an external ID exists, SDP leaves the existing object or replaces its name with the new one, depending on the SDP configuration setting.     
  • In contrast to CableLabs 3.0, terms:SuggestedPriceoffer:PromotionalContentGroupoffer:BillingIdtitle:TitleBrieftitle:TitleMediumfirstName are not mandatory (minOccurs=”0″optional).
  • Optional <content:posterType> field allows you to import different pictures for a movie. SDP supports importing ‘Poster’ (default) and ‘Screenshot’ movie pictures. You can import one Poster and several Screenshots (max 16) for a movie. All images are downloaded during import.
  • New title:generic-metadata field requested by Provider is added for additional textual information.   
  • When importing movies, SDP tries to find the specified title:Genre and offer:CategoryRef among the ‘Genres’ and ‘Rubrics’ (content type) in the SDP database. If no matching entries are found, SDP adds a new genre and/or rubric to the database and links the movie to the new ones.  CategoryRef also have uriId attribute to search in SDP database.
  • In contrast to CableLabs 3.0, title:CountryOfOrigin is not an ISO-3166-1 country code (xsd type changed to type=”xsd:string”). Now CountryOfOrigin is an arbitrary string containing the country name, which is imported to SDP, if missing. You can import several countries using several CountryOfOrigin fields. You should use externalId attribute to determine country external id. SDP uses this identifier to search this country in its database when importing. If there is no country with such externalId in SDP, the platform adds the new country with the defined name and uriId. You do not need to define the country dictionary in SDP before import.
  • Use title:AccessLevel field to specify movie access level (age rating, for example 0+, 3+, 18+, etc.). If not specified – min access level will be used for movie. The value should be taken from SDP pre-installed AccessLevel dictionary external ID.
  • JPG and PNG files are supported for poster and screenshot images. The recommended size for posters — not less than 296×450 pixels, for screenshots — not less than 500×280 pixels. The specified proportions must be observed.

 The identification of image type is performed as follows:

  1. By the header Content-Type: image/jpeg or Content-Type: image/png;
  2. If the header was not recognized, by the file extension in the URL (e.g. http://image_storage/imagename.jpg);
  3. If the file extension was not recognized, the error is logged.

Series Import

To import series with the corresponding episodes and seasons designation use the contentType argument in the <ContentGroup> field. It can take the following values:

  • contentType=”series”
    Example:

<ContentGroup uriId=“CGROUP_SD_VOD_129821_thecrucifixion_series” startDateTime=“2018-09-18T00:00:00” endDateTime=“2019-03-18T00:00:00” contentType=“series”>
<offer:TitleRef uriId=“TTL_SD_VOD_129821_thecrucifixion” />
<offer:MovieRef uriId=“MOV_SD_VOD_129821_thecrucifixion” />
<offer:PosterRef uriId=“POST_SD_VOD_129821_thecrucifixion_636733813107639486” />
<offer:PreviewRef uriId=“TRA_SD_VOD_129821_thecrucifixion” /> <!– The trailer is only supported for the series, not for seasons and / or episodes –>

</ContentGroup>

  • contentType=”season”
    Example:

<ContentGroup uriId=“CGROUP_SD_VOD_129821_thecrucifixion_season_1” startDateTime=“2018-09-18T00:00:00” endDateTime=“2019-03-18T00:00:00” contentType=“season”>
<offer:TitleRef uriId=“TTL_SD_VOD_129821_thecrucifixion” />
<offer:MovieRef uriId=“MOV_SD_VOD_129821_thecrucifixion” />
<offer:PosterRef uriId=“POST_SD_VOD_129821_thecrucifixion_636733813107639486” />
<offer:ParentRef uriId=“CGROUP_SD_VOD_129821_thecrucifixion_series” /> <!– link to the series –>
</ContentGroup>

  • contentType=”episode”
    Example:

<ContentGroup uriId=“CGROUP_SD_VOD_129821_thecrucifixion” startDateTime=“2018-09-18T00:00:00” endDateTime=“2019-03-18T00:00:00” contentType=“episode”>
<offer:TitleRef uriId=“TTL_SD_VOD_129821_thecrucifixion” />
<offer:MovieRef uriId=“MOV_SD_VOD_129821_thecrucifixion” />
<offer:PosterRef uriId=“POST_SD_VOD_129821_thecrucifixion_636733813107639486” />
<offer:ParentRef uriId=“CGROUP_SD_VOD_129821_thecrucifixion_season_1” /> <!– link to the season –>
</ContentGroup>

If the contentType argument is not specified, the <ContentGroup> field is considered to contain the movie description (i.e. contentType = “movie”).

When importing serials, it is important to follow the sequence of descriptions in XML: first there should be a description of the series, then the season and only then the episode. Otherwise, an error on the series/season absence with the specified externalId will be displayed.

If the series/season is already present in the SmartTUBE SDP database, you can import individual episodes (with reference to the season by externalId) without adding the season information into the XML.

Inside the <title> section for the episode and season there are fields for specifying the season / episode number and the series title.

Example:

<Title uriId=“TTL_SD_VOD_129821_thecrucifixion”>
<title:LocalizableTitle>
<title:TitleLong>
Cuckoo
</title:TitleLong>
<!– Series title –>
<title:EpisodeName>
Cuckoo, ep. 2
</title:EpisodeName>
<!– Episode title. It can also be used for a season. –>
</title:LocalizableTitle>
<title:SeasonNumber>
1
</title:SeasonNumber>
<!– Season number –>
<title:EpisodeNumber>
10
</title:EpisodeNumber>
<!– Episode number –>
</Title>

All other fields related to the description of the series / episode (poster, genres, actors of the year) are similar to the fields described above for movies, and can be set separately for each episode.

Packaging

  • In order to include one movie in several packages (bundles), add the appropriate <ContentGroupRef> to <Offer> elements corresponding to these packages.
  • A movie is imported, no matter if it is included in the <Offer> section or not.
  • The <Offer> section may link several movies to a set of rubrics and packages.
  • Specified VOD bundle should exist before XML import. It should be created from AdminUI, for example.
  • The <content:EncryptionInfo> section should be specified for each encrypted asset.
  • If a movie asset is encrypted, specify true in the <content:Encryption> field nested within the <content:EncryptionInfo> section. Otherwise SDP will treat the asset as non-encrypted.
  • You can set the alternative mapping for the assets’ encryption type specified by the content:EncryptionInfo section.
  • The <content:EncryptionSystemInfo> field contains the asset identifier of the DRM system.
  • The <content:DrmType> parameter contains the DRM type of which the asset is encrypted (securemedia, widevine, etc.) Value is constant and should be taken from the SDP DB, from the pre-configured SmartTUBE Admin Console > Administration > Encryption types dictionary.
  • In contrast to CableLabs 3.0, ReceiverType (EncryptionInfoType) is not a mandatory field (minOccurs=”0″).
  • Unencrypted previews (trailers) are only supported.

Metadata dictionaries (countries, content genres, content categories, personalities) are added to the system automatically, if no such value has been added previously. The comparison is performed by the externalID argument.

Multilanguage Support

  • The following fields can be represented and displayed in several languages in the SmartTUBE apps (the fields are agreed between Provider and SmartLabs):
    • title:TitleLong
    • title:SummaryShort
    • title:Genre
    • title:CountryOfOrigin
    • offer:CategoryRef
    • title:Actor
    • title:Director
    • title:Producer

The list of localizable fields can be extended by an additional Operator request.

  • In order to provide several translations, specify each variant in the field value separated by the appropriate language separator (see the Example 2):

Language

Separator*

English

@@en=

Czech

@@cz=

Greek

@@el=

* Language denotation is a lower-case, two-letter ISO 639 language code.

Example:

<title:Genre uriId=“Romance”>
@@en=Romance@@ru=Романтическая история
</
title:Genre>

  • If no language separator is specified, the whole value is attributed to the default language. The default language is specified in the SmartTUBE SDP configuration file system.conf (system-properties > metacontent > defaultLangForProvidersExternalIds).
  • To avoid duplicates and exactly determine which object has to be updated in the SDP DB, it also needed to specify uriId or externalId attribute (see the Example 2) within the <Title> section fields. These IDs are used to compare parameters during import.

SmartLabs Format Examples

Example 1

One-language description of ‘Harry Potter And The Deathly Hallows: Part 2’ with one encrypted HD media file. SDP will imply the default language for this data.

For XML validation, you can download the XSD schemas of the SmartLabs format.

<?xml version=“1.0” encoding=“UTF-8”?>
<ADI3
xmlns=“https://smartlabs.tv/static/share/xsd/”
xmlns:content=“https://smartlabs.tv/static/share/xsd/content/1”
xmlns:offer=“https://smartlabs.tv/static/share/xsd/offer/1”
xmlns:title=“https://smartlabs.tv/static/share/xsd/title/1”
>

<!– start of the ”Harry Potter And The Deathly Hallows: Part 2″ movie metadata –>
<Movie uriId=“PAID000413282ASST00513862”>
<!– HD content asset in SDP. UriId corresponds to asset External ID in SDP database –>
<content:SourceUrl>ODG00513862M42.mpg</content:SourceUrl>
<!– relative path or full asset URL–>
<content:Resolution>private:HD</content:Resolution>
<!– asset type preceded by the ‘private:’ prefix–>
<content:Duration>PT02H05M02S</content:Duration>
<!– asset Duration in cablelabs format –>
<content:EncryptionInfo>
<!– For encrypted assets only. Skip this element if the asset is non-encrypted–>
<content:Encryption>true</content:Encryption>
<!– Specify this value if the asset is encrypted–>
<content:EncryptionSystemInfo>XTV-123456789</content:EncryptionSystemInfo>
<!– String asset id associated to the DRM side –>
<content:DrmType>securemedia</content:DrmType>
<!– Encryption type of which asset is encrypted (securemedia, widevine. playready, etc.) –>
</content:EncryptionInfo>
</Movie>
<Preview uriId=“PAID000413282PREV00513888”>
<!– Preview asset in SDP. Only unencrypted previews (trailers) are supported in the current implementation –>
<content:SourceUrl>ODG00513888P42.mpg</content:SourceUrl>
<!– relative path or full asset URL –>
</Preview>
<Poster uriId=“PAID000413282POST00513861”>
<content:SourceUrl>http://provider.location/images/ODG00513861I42.jpg</content:SourceUrl>
<!–full image URL –>
<content:posterType>Poster</content:posterType>
<!– ‘Poster’ means that the picture is a movie poster. More possible posterType values can be added in future. It can be ‘Screenshot’ for example–>
</Poster>
<Poster uriId=“PAID000413282POST00513862”>
<content:SourceUrl>http://provider.location/images/ODG00513861I43.jpg</content:SourceUrl>
<content:posterType>Screenshot</content:posterType>
<!– ‘Screenshot’ type picture –>
</Poster>
<Poster uriId=“PAID000413282POST00513863”>
<content:SourceUrl>http://provider.location/images/ODG00513861I44.jpg</content:SourceUrl>
<content:posterType>Screenshot</content:posterType>
<!– one more ‘Screenshot’. Max 16 screenshots –>
</Poster>
<Title uriId=“PAID000413282PROD00374006”>
<title:LocalizableTitle>
<!– the xml:lang attribute is not used –>
<title:TitleLong>Harry Potter And The Deathly Hallows: Part 2</title:TitleLong>
<!– the movie name imported to SDP –>
<title:SummaryShort>
Harry, Ron and Hermione search for Voldemort’s remaining Horcruxes in their effort to destroy the Dark Lord.
</title:SummaryShort>
<!– the movie description imported to SDP –>
<title:Actor fullName=“Daniel Radcliffe” externalId=“Daniel Radcliffe” />
<title:Actor fullName=“Emma Watson” externalId=“Emma Watson” />
<title:Actor fullName=“Rupert Grint” externalId=“Rupert Grint” />
<title:Director fullName=“David Yates” externalId=“David Yates” />
<title:Producer fullName=“David Barron” externalId=“David Barron” />
<title:Producer fullName=“David Heyman” externalId=“David Heyman” />
<title:Producer fullName=“J.K. Rowling” externalId=“J.K. Rowling” />
<title:EpisodeName>
Cuckoo, ep. 2
</title:EpisodeName>
</title:LocalizableTitle>
<title:Rating ratingSystem=“MPAA”>PG</title:Rating>
<title:Year>2011</title:Year>
<title:CountryOfOrigin externalId=“us”>USA</title:CountryOfOrigin>
<!– country –>
<title:CountryOfOrigin externalId=“ca”>Canada</title:CountryOfOrigin>
<!– another country–>
<title:Genre uriId=“ADVENTURE”>Adventure-Περιπέτεια</title:Genre>
<!– movie genre in SDP–>
<title:Genre uriId=“FANTASY”>Fantasy</title:Genre>
<!– another genre –>
<title:AccessLevel>12+</title:AccessLevel>
<title:ShowcaseId>16700877</title:ShowcaseId>
<!– showcase identifier, which should contains the movie –>
<title:IsPublished>false</title:IsPublished>
<!– is media file published or not –>
<title:ShowAsVod>true</title:ShowAsVod>
<!– is episode should be shown as vod –>
<!–
<title:SeasonNumber>1</title:SeasonNumber>
–>

<!– Season number (for episodes/seasons only) –>
<!–
<title:EpisodeNumber>10</title:EpisodeNumber>
–>

<!– Episode number  (for episodes/seasons only) –>
<title:generic-metadata>
Any custom string. Optional.
</title:generic-metadata>
</Title>
<ContentGroup uriId=“PAID000413282” startDateTime=“2012-03-11T00:00:00Z” endDateTime=“2012-06-11T00:00:00Z”>
<!– uriId – movie externalId in SDP; startDateTime corresponds to Licensing_Window_Start, endDateTime – to Licensing_Window_End–>
<offer:TitleRef uriId=”  PAID000413282PROD00374006″ />
<!– Movie title reference –>
<offer:MovieRef uriId=“PAID000413282ASST00513862” />
<!– Asset reference –>
<offer:PreviewRef uriId=“PAID000413282PREV00513888” />
<!– Preview asset reference –>
<offer:PosterRef uriId=“PAID000413282POST00513861” />
<!– Poster reference –>
<offer:PosterRef uriId=“PAID000413282POST00513862” />
<!– Screenshot 1 reference –>
<offer:PosterRef uriId=“PAID000413282POST00513863” />
<!– Screenshot 2 reference –>
<!–<offer:ParentRef uriId=”CGROUP_SD_VOD_129821_thecrucifixion_season_1″ />–>
<!– link to the season/series. For episodes/seasons only –>
</ContentGroup>
<Offer uriId=“”>
<offer:Presentation>
<offer:CategoryRef uriId=“VOD_Movies_EN_G-L” name=“VOD_Movies_EN_G-L” />
<!– movie rubrics imported to SDP –>
</offer:Presentation>
<offer:TermsRef uriId=“VOD bundle 1”>
<!– VoD bundle externalId in SDP. The required parameter — to specify which VoD bundle (package) must include imported movie –>
<offer:TvodPriceList>
<!– OPTIONAL (for tvod bundles only, if needed) – list of tvod prices to use (instead of default prices, managed on tvod bundle in AdminUI)  –>
<offer:TvodPrice>
<offer:Price>100</offer:Price>
<!– full price (cents) –>
<offer:Duration>172800</offer:Duration>
<!– Rental duration (in seconds) –>
<offer:Quality>HD</offer:Quality>
<!– OPTIONAL, if needed, content asset quality –>
</offer:TvodPrice>
</offer:TvodPriceList>
</offer:TermsRef>
<offer:ContentGroupRef uriId=“PAID000413282” />
<!– Link to movie (ContentGroup field). Either ContentGroupRef or MovieRef is required — to specify which movie must be included to the specified (in TermsRef) VoD bundle. If ContentGroupRef is specified, all assets of this movie are added to the VoD bundle. –>
<offer:MovieRef uriId=“PAID000413282ASST00513862”  />
<!– Link to asset (Movie field). OPTIONAL, if needed to set prices not to all movie assets, but to separate assets. In most cases ContentGroupRef is enough. Either ContentGroupRef or MovieRef is required — to specify which movie must be included to the specified (in TermsRef) VoD bundle. If MovieRef is specified, the asset is added to the VoD bundle. –>
</Offer>
<!– end of the ”Harry Potter And The Deathly Hallows: Part 2″ movie metadata –>
</ADI3>

Example 2

Here is a two-language valid example. In this case there are two video files, SD and HD, for the same movie. Both files are non-encrypted, so the EncryptionInfo section is omitted.

<?xml version=“1.0” encoding=“UTF-8”?>
<ADI3
xmlns=“https://smartlabs.tv/static/share/xsd/”
xmlns:content=“https://smartlabs.tv/static/share/xsd/content/1”
xmlns:offer=“https://smartlabs.tv/static/share/xsd/offer/1”
xmlns:title=“https://smartlabs.tv/static/share/xsd/title/1”
>

<Movie uriId=“PAID000413282ASST00513862” >
<content:SourceUrl>ODG00513862M42.mpg</content:SourceUrl>
<content:Resolution>private:HD</content:Resolution>
<content:Duration>PT02H05M02S</content:Duration>
</Movie>
<Movie uriId=“PAID000413282ASST00513863” >
<content:SourceUrl>ODG00513862M43.mpg</content:SourceUrl>
<content:Resolution>private:SD</content:Resolution>
<content:Duration>PT02H05M02S</content:Duration>
</Movie>
<Preview uriId=“PAID000413282PREV00513888”>
<content:SourceUrl>ODG00513888P42.mpg</content:SourceUrl>
</Preview>
<Poster uriId=“PAID000413282POST00513861”>
<content:SourceUrl>http://provider.location/images/ODG00513861I42en.jpg</content:SourceUrl>
<content:posterType>Poster</content:posterType>
</Poster>
<Title uriId=“PAID000413282PROD00374006”>
<title:LocalizableTitle >
<!– the xml:lang attribute is not used –>
<title:TitleLong>@@en=Harry Potter And The Deathly Hallows: Part 2@@ru=Гарри Поттер и дары смерти: Часть II</title:TitleLong>
<title:SummaryShort>
@@en=Harry, Ron and Hermione search for Voldemort’s remaining Horcruxes in their effort to destroy the Dark Lord.@@ru=В грандиозной последней главе битва между добрыми и злыми силами мира волшебников перерастает во всеобщую войну. Ставки ещё никогда не были так высоки, а поиск убежища — столь сложен. И быть может именно Гарри Поттеру придется пожертвовать всем в финальном сражении с Волан-де-Мортом. Способен ли наш герой спасти мир? И всё закончится здесь.
</title:SummaryShort>
<title:Actor fullName=“@@en=Daniel Radcliffe@@ru=Дэниел Рэдклифф” externalId=“Daniel Radcliffe”/>
<title:Actor fullName=“@@en=Emma Watson@@ru=Эмма Уотсон” externalId=“Emma Watson”/>
<title:Actor fullName=“@@en=Rupert Grint@@ru=Руперт Гринт” externalId=“Rupert Grint”/>
<title:Director fullName=“@@en=David Yates@@ru=Дэвид Ейтс” externalId=“David Yates”/>
<title:Producer fullName=“@@en=David Barron@@ru=Дэвид Бэрон” externalId=“David Barron”/>
<title:Producer fullName=“@@en=David Heyman@@ru=Дэвид Хьюмэн” externalId=“David Heyman”/>
<title:Producer fullName=“@@en=J.K. Rowling@@ru=J.K. Rowling”  externalId=“J.K. Rowling”/>
</title:LocalizableTitle>
<title:Rating ratingSystem=“MPAA”>PG</title:Rating>
<title:Year>2011</title:Year>
<title:CountryOfOrigin externalId=“us”>@@en=USA@@ru=США</title:CountryOfOrigin>
<!– country  –>
<title:CountryOfOrigin externalId=“ca”>@@en=Canada@@ru=Канада</title:CountryOfOrigin>
<!– another country  –>
<title:Genre uriId=“ADVENTURE”>@@en=Adventure-Περιπέτεια@@ru=Приключения</title:Genre>
<title:AccessLevel>12+</title:AccessLevel>
<title:ShowcaseId>16700877</title:ShowcaseId>
<!– showcase identifier –>
<title:IsPublished>false</title:IsPublished>
<!– is media file published or not –>
<title:ShowAsVod>true</title:ShowAsVod>
<!– is episode should be shown as vod –>
<title:generic-metadata>
Any custom string. Optional.
</title:generic-metadata>
</Title>
<ContentGroup uriId=“PAID000413282” startDateTime=“2012-03-11T00:00:00Z” endDateTime=“2012-06-11T00:00:00Z”>
<!– uriId — movie externalId in SDP; startDateTime corresponds to Licensing_Window_Start, endDateTime — to Licensing_Window_End–>
<offer:TitleRef uriId=“PAID000413282PROD00374006”/>
<offer:MovieRef uriId=“PAID000413282ASST00513862”/>
<offer:MovieRef uriId=“PAID000413282ASST00513863”/>
<offer:PreviewRef uriId=“PAID000413282PREV00513888”/>
<offer:PosterRef uriId=“PAID000413282POST00513861”/>
<offer:PosterRef uriId=“PAID000413282POST00513862”/>
<offer:PosterRef uriId=“PAID000413282POST00513863”/>
</ContentGroup>
<Offer uriId=“”>
<offer:Presentation>
<offer:CategoryRef name=“@@en=VOD_Movies_EN_G-L@@ru=Фильмы от А до Я” uriId=“VOD_Movies_EN_G-L”/>
</offer:Presentation>
<offer:Presentation>
<offer:CategoryRef name=“@@en=VOD_Movies_Adventure@@ru=Приключенческие фильмы” uriId=“VOD_Movies_Adventure”/>
</offer:Presentation>
<offer:Presentation>
<offer:CategoryRef name=“@@en=VOD_Movies_Premieres@@ru=Премьеры” uriId=“VOD_Movies_Premieres”/>
</offer:Presentation>
<offer:TermsRef uriId=“VOD bundle 1”>
<!– VoD bundle externalId in SDP –>
<offer:TvodPriceList>
<!– OPTIONAL (for tvod bundles only, if needed) – list of tvod prices to use (instead of default prices, managed on tvod bundle in AdminUI)  –>
<offer:TvodPrice>
<offer:Price>100</offer:Price>
<!– full price (cents) –>
<offer:Duration>172800</offer:Duration>
<!– Rental duration (in seconds) –>
<offer:Quality>HD</offer:Quality>
<!– OPTIONAL, if needed, content asset quality –>
</offer:TvodPrice>
</offer:TvodPriceList>
</offer:TermsRef>
<offer:ContentGroupRef uriId=“PAID000413282”/>
</Offer>
</ADI3>

HBO VoD Metadata Format

Basic Concepts

  • Movie assets and metadata files are downloaded via FTP. The location and naming of files on the provider’s FTP server must comply with the following rules:.
    • The movies on FTP should be located in individual directories (ex. /HBO_M70675_GAME_OF_THRONES_EP.01-_WINTER_IS_COMING/). The directory name is treated as the movie File name parameter in the SmartTUBE Admin Console.
    • Inside each movie folder, there should be the /metadata folder with the ADI3.xml file (ex. /HBO_M70675_GAME_OF_THRONES_EP.01-_WINTER_IS_COMING/metadata/ADI3.XML) containing movie metadata.
    • Poster filename should be as follows: “assetName” + “_poster_portrait.jpg” (ex. /HBO_M70675_GAME_OF_THRONES_EP.01-_WINTER_IS_COMING/HBO_M70675_GAME_OF_THRONES_EP._01_WINTER_IS_COMING_poster_portrait.jpg)
    • Screenshot filename should be as follows: “assetName” + “_poster_landscape.jpg” (ex. /HBO_M70675_GAME_OF_THRONES_EP.01-_WINTER_IS_COMING/HBO_M70675_GAME_OF_THRONES_EP._01_WINTER_IS_COMING_poster_landscape.jpg)
  • Setting up automatic regular content import is described in the Configuring Regular VOD Import article.
  • During import, two parallel processes are executed:
    • SDP imports metadata from the /metadata/ADI3.xml files to the DB. The full path to the movie playlist (manifest) requested by end-user devices is formed as described in the Configuring Movie Assets article.
    • The transcoder imports assets from the FTP, transcodes them (if needed), stores in the operator’s CDN, and sends a notification to the SDP upon the transcoding competition. Until this notification is received, SDP does not publish the movie to end-user devices.
  • Each time the import job is run, the importer compares the availability of movies on FTP and in the SDP DB:
    • If the assets of some movie are not available on FTP at the time of import, these assets are also deleted from the operator’s CDN. To prevent this, add the following setting to the SDP configuration file system.conf:

system-properties = {
metacontent = {
hbo.dropUnusedProviderLinks =
0 // where “hbo” is the provider name from the SmartTUBE Admin Console > Administration > Content providers dictionary
}
}

  • By default, once imported metadata is not updated on subsequent runs of the import job. To have metadata updated on every import, add the following setting to the system.conf:

system-properties = {
metacontent = {
hbo.overrideContentFields.do = 1
}
}

  • All images are downloaded at the time of import. JPG and PNG files are supported. The recommended size for posters — not less than 296×450 pixels, for screenshots — not less than 500×280 pixels. The specified proportions must be observed.

The identification of image type is performed as follows:
1. By the header Content-Type: image/jpeg or Content-Type: image/png;
2. If the header was not recognized, by the file extension in the URL (e.x. http://image_storage/imagename.jpg);
3. If the file extension was not recognized, the error is logged.

  • Movies can be also deleted via SmartTUBE Admin Console (see the Deleting Content article).

Movie Parameters

  • All considered metadata fields are specified in the example below. Other fields are ignored. Example contains detailed comments of used fields.
  • One movie is represented by a set of elements: <Asset xsi:type=”content:MovieType”> (1 or more), <Asset xsi:type=”content:PosterType”>, <Asset xsi:type=”title:TitleType”> and <Asset xsi:type=”offer:ContentGroupType”>. The <Asset xsi:type=”offer:ContentGroupType”> section links together all metadata blocks related to the movie.
  • All movies are imported in published state. As soon the movies are imported, they immediately become visible to users, if the corresponding packages are available to users.
  • The licensing window start and end are individually specified for each movie as the <Asset xsi:type=”content:MovieType” startDateTime=”YYYY-MM-DDTHH:MM:SSZ” endDateTime=”YYYY-MM-DDTHH:MM:SSZ“> attributes.
  • You can specify any number of genres, rubrics (content type), countries and persons (actors, directors, producers) using corresponding xml tags.
  • All the <Asset xsi:type=”content:PosterType”> tags are ignored, as images are downloaded from FTP using the directory naming specified in the “Basic Concepts” chapter.
  • In contrast to CableLabs 3.0, <title:CountryOfOrigin> is not an ISO-3166-1 country code (xsd type changed to type=”xsd:string”). This is an arbitrary string containing the country name, which is imported to SDP, if missing. You can import several countries using several <title:CountryOfOrigin> tags.
  • Use the <title:Rating> tag to specify the movie access level (age rating, for example 0+, 3+, 18+, etc.). If not specified, the minimal access level is used for the movie. Only the <title:Rating> tags with the ratingSystem=”TV” attribute are taken into account. The value must match the External ID field of the pre-configured Access levels dictionary.

Series Import

To import series use the <title:ShowType>Series</title:ShowType> construction. The episode, season and series are created in the SmartTUBE catalog automatically using data from the <Asset xsi:type=”title:TitleType”> section (see the example below).

All other fields related to the description of the series / episode (poster, genres, actors of the year) are similar to the fields described above for movies, and can be set separately for each episode.

To avoid doubling series, seasons, and episodes, the following mapping is used:

  • The mapping is performed by the name of a series in the default language.For example: <title:LocalizableTitle xml:lang=”en”><title:TitleLong>Dora the Explorer</title:TitleLong></title:LocalizableTitle>
  • The series name is converted to uppercase, spaces are removed:Dora the Explorer –> DORATHEEXPLORER
  • The season and episode number is added to the result, as in the example:DORATHEEXPLORER — mapping unique ID of the series
    DORATHEEXPLORER_2_3 — mapping unique ID of the third episode of the second season

Packaging

All the imported movies are placed in a single SVoD bundle created automatically with the following settings:

  • Name: fake nonFree svod-package (SVOD) for provider = {Provider name}
  • Content provider: HBO (configurable with the import job settings)
  • Content delivery rule: SVOD
  • External ID: DEFAULT_SVOD

The bundle configuring is performed via SmartTUBE Admin Console.

Automatic Dictionaries Updating

Metadata (movie titles, countries, content genres, content categories, personalities, etc.) are added to the corresponding SDP dictionaries automatically, if no such value has been added previously. Mapping the imported values to the existing ones in the corresponding SmartTUBE dictionaries uses the values enclosed in the movie description tags. For example, the value Drama of the <title:Genre>Drama</title:Genre> construction will be used for mapping as a genre External ID and as a name of a genre in default language.

Multilanguage Support

  • The following fields can be represented and displayed in several languages in the SmartTUBE apps:
    • title:TitleLong
    • title:SummaryShort
    • title:SummaryLong
    • title:Genre
    • title:CountryOfOrigin
    • title:Actor
    • title:Director
    • title:Producer
    • title:EpisodeName

The list of localizable fields can be extended by an additional Operator request.

  • In order to provide several translations, specify each variant inside the <title:LocalizableTitle xml:lang=”xx“> tag, where xx is a language ID (a lower-case, two-letter ISO 639 language code). See the example below.
  • If no <title:LocalizableTitle> section with the language ID is specified, the <title:…> tags are attributed to the default language. The default language is specified in the SmartTUBE SDP configuration parameters (system.conf > system-properties > metacontent > defaultLangForProvidersExternalIds)

HBO Format Example

An example below is an XML description of an episode of a series and differs from the movie description by having the series related tags.

<?xml version=“1.0” encoding=“utf-8”?>

<ADI3
xmlns=“urn:cablelabs:md:xsd:core:3.0”
xmlns:xs=“http://www.w3.org/2001/XMLSchema”
xmlns:content=“urn:cablelabs:md:xsd:content:3.0”
xmlns:core=“urn:cablelabs:md:xsd:core:3.0”
xmlns:offer=“urn:cablelabs:md:xsd:offer:3.0”
xmlns:title=“urn:cablelabs:md:xsd:title:3.0”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:xml=“http://www.w3.org/XML/1998/namespace”>

<Asset  xsi:type=“offer:OfferType” uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE” providerVersionNum=“1” creationDateTime=“2021-03-26T00:00:00Z” startDateTime=“2021-04-02T00:00:00Z” endDateTime=“2022-09-30T23:59:00Z”>
<core:AssetName deprecated=“true”>DORA THE EXPLORER VIII. EP. 05 – DORA AND PERRITO TO THE RESCUE</core:AssetName>
<!– Ignored –>
<core:Provider>HBO</core:Provider>
<!– Ignored –>
<core:Ext>
<!– Ignored –>
<App_Data App=“VOD” Name=“Asset_ID” Value=“HBO_210329_M95221”/>
<!– Ignored –>
</core:Ext>
<offer:BillingId>HBO01</offer:BillingId>
<!– Ignored –>
<offer:ContentGroupRef uriId=“mediahub.hbo.hu/ContentGroup/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE”/>
<!– Ignored –>
</Asset>

<Asset xsi:type=“title:TitleType” uriId=“mediahub.hbo.hu/Title/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE” providerVersionNum=“1” creationDateTime=“2021-03-26T00:00:00Z” startDateTime=“2021-04-02T00:00:00Z” endDateTime=“2022-09-30T23:59:00Z”>
<!– The providerVersionNum and creationDateTime attributes are ignored –>
<core:Ext>
<!– Entire section is ignored –>
<App_Data App=“VOD” Name=“SeasonNumber” Value=“8”/>
<App_Data App=“VOD” Name=“TotalEpisodeNumber” Value=“19”/>
<App_Data App=“VOD” Name=“OriginalLanguage” Value=“en”/>
</core:Ext>
<title:LocalizableTitle xml:lang=“en”>
<title:TitleLong>
Dora the Explorer
</title:TitleLong>
<!– Series name –>
<title:SummaryShort>
Join Dora for adventures in an imaginative tropical world filled with jungles, beaches and rainforests. Dora is bilingual and uses her knowledge of English and Spanish to communicate with her friends, overcome obstacles and reach her goals.
</title:SummaryShort>
<!– Series short description –>
<title:SummaryLong>
Armed with her trusty backpack and friend Boots the monkey, Dora is off on adventures in her imaginative, tropical world filled with jungles, beaches and rainforests. Using her knowledge of English and Spanish to communicate with her friends, she overcomes obstacles to reach her goals in each episode.
</title:SummaryLong>
<!– Series long description –>
<title:ActorDisplay>
Fatima Ptacek, Koda Gursoy, Alexandria Suarez, Skai Jackson
</title:ActorDisplay>
<!– Ignored –>
<title:Actor fullName=“Fatima Ptacek”/>
<!– Episode, season and series actors –>
<title:Actor fullName=“Koda Gursoy”/>
<title:Actor fullName=“Alexandria Suarez”/>
<title:Actor fullName=“Skai Jackson”/>
<title:DirectorDisplay>
</title:DirectorDisplay>
<!– Ignored –>
<title:Director fullName=“”/>
<!– Episode, season and series director –>
<title:Producer fullName=“Shrimp Roll”/>
<!– Episode, season and series producer –>
<title:StudioDisplay>
TURNER BROADCASTING SYSTEM EUROP
</title:StudioDisplay>
<!– Ignored –>
<title:EpisodeName>
Dora and Perrito to the Rescue
</title:EpisodeName>
<!– Episode name –>
<title:EpisodeID>
5
</title:EpisodeID>
<!– Episode number –>
</title:LocalizableTitle>
<title:LocalizableTitle xml:lang=“cs”>
<title:TitleLong>
Dora průzkumnice
</title:TitleLong>
<title:SummaryShort>
Vydejte se s Dorou na dobrodružství do tropického světa plného džunglí a deštných pralesů. Dora mluví dvěma jazyky a své znalosti angličtiny a španělštiny využívá k tomu, aby se dorozuměla s přáteli, překonala překážky a dosáhla svých cílů.
</title:SummaryShort>
<title:SummaryLong>
Se svým batůžkem a opičím kamarádem Botičkou se Dora vydá na dobrodružství do nápaditého tropického světa plného džunglí, pláží a deštných pralesů. Dora mluví dvěma jazyky a své znalosti angličtiny a španělštiny využívá v každé epizodě k tomu, aby se dorozuměla s přáteli, překonala překážky a dosáhla svých cílů.
</title:SummaryLong>
<title:ActorDisplay>
Fatima Ptacek, Koda Gursoy, Alexandria Suarez, Skai Jackson
</title:ActorDisplay>
<title:Actor fullName=“Fatima Ptacek”/>
<title:Actor fullName=“Koda Gursoy”/>
<title:Actor fullName=“Alexandria Suarez”/>
<title:Actor fullName=“Skai Jackson”/>
<title:DirectorDisplay>
</title:DirectorDisplay>
<title:Director fullName=“”/>
<title:Producer fullName=“Shrimp Roll”/>
<title:StudioDisplay>
TURNER BROADCASTING SYSTEM EUROP
</title:StudioDisplay>
<title:EpisodeID>
5
</title:EpisodeID>
</title:LocalizableTitle>
<title:Rating ratingSystem=“TV”>
All
</title:Rating>
<!– Episode, season and series age rating –>
<title:IsClosedCaptioning>
false
</title:IsClosedCaptioning>
<!– Ignored –>
<title:DisplayRunTime>
00:23:08
</title:DisplayRunTime>
<!– Episode duration. Only taken into account if the <Asset xsi:type=”content:MovieType”><content:Duration> tag is omitted. –>
<title:Year>
2013
</title:Year>
<!– Episode release year –>
<title:CountryOfOrigin>
US
</title:CountryOfOrigin>
<title:Genre>
Animation
</title:Genre>
<title:Genre>
Kids
</title:Genre>
<title:ShowType>
Series
</title:ShowType>
<!– Content rubrics. If the value is not “Series”, the metadata is processed as a movie. –>
</Asset>

<Asset xsi:type=“offer:ContentGroupType” uriId=“mediahub.hbo.hu/ContentGroup/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE” providerVersionNum=“1” creationDateTime=“2021-03-26T00:00:00Z” startDateTime=“2021-04-02T00:00:00Z” endDateTime=“2022-09-30T23:59:00Z”>
<offer:TitleRef uriId=“mediahub.hbo.hu/Title/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE”/>
<offer:MovieRef uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE.ts”/>
<offer:PosterRef uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/metadata/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE_poster_portrait.jpg”/>
<offer:PosterRef uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/metadata/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE_poster_landscape.jpg”/>
<offer:PosterRef uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/metadata/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE_season_poster_portrait.jpg”/>
<offer:PosterRef uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/metadata/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE_season_poster_landscape.jpg”/>
</Asset>

<Asset xsi:type=“content:MovieType” uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE.ts” providerVersionNum=“1” creationDateTime=“2021-03-26T00:00:00Z” startDateTime=“2021-04-02T00:00:00Z” endDateTime=“2022-09-30T23:59:00Z”>
<!– startDateTime and endDateTime — the start and end date of the movie license period. –>
<core:Provider>HBO</core:Provider>
<content:ContentFileSize>2194272080</content:ContentFileSize>
<content:ContentCheckSum>E64B75A86418E69D977091834AD26072</content:ContentCheckSum>
<content:Duration>PT00H23M08S</content:Duration>
<content:Language>en</content:Language>
<content:DubbedLanguage>cs</content:DubbedLanguage>
</Asset>

<Asset  xsi:type=“content:PosterType” uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/metadata/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE_poster_portrait.jpg” providerVersionNum=“1” creationDateTime=“2021-03-26T00:00:00Z” startDateTime=“2021-04-02T00:00:00Z” endDateTime=“2022-09-30T23:59:00Z”>
<!– All the <Asset xsi:type=”content:PosterType”> tags are ignored, as in the case of HBO import, images are uploaded from FTP using the specified directory naming. –>
<content:ContentFileSize>180134</content:ContentFileSize>
<content:ContentCheckSum>5EE76232B46E925E9E1899AC5C7C560E</content:ContentCheckSum>
<content:X_Resolution>700</content:X_Resolution>
<content:Y_Resolution>1000</content:Y_Resolution>
<content:Codec>JPG</content:Codec>
</Asset>

<Asset xsi:type=“content:PosterType” uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/metadata/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE_poster_landscape.jpg” providerVersionNum=“1” creationDateTime=“2021-03-26T00:00:00Z” startDateTime=“2021-04-02T00:00:00Z” endDateTime=“2022-09-30T23:59:00Z”>
<content:ContentFileSize>466725</content:ContentFileSize>
<content:ContentCheckSum>2B1F0C285C4D287168E6E75E698BD022</content:ContentCheckSum>
<content:X_Resolution>1920</content:X_Resolution>
<content:Y_Resolution>1080</content:Y_Resolution>
<content:Codec>JPG</content:Codec>
</Asset>

<Asset xsi:type=“content:PosterType” uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/metadata/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE_season_poster_portrait.jpg” providerVersionNum=“1” creationDateTime=“2021-03-26T00:00:00Z” startDateTime=“2021-04-02T00:00:00Z” endDateTime=“2022-09-30T23:59:00Z”>
<content:ContentFileSize>123634</content:ContentFileSize>
<content:ContentCheckSum>F94AD7A9CC77DA9ABF2C8A2B278C4783</content:ContentCheckSum>
<content:X_Resolution>700</content:X_Resolution>
<content:Y_Resolution>1000</content:Y_Resolution>
<content:Codec>JPG</content:Codec>
</Asset>

<Asset xsi:type=“content:PosterType” uriId=“mediahub.hbo.hu/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE/metadata/HBO_M95221_DORA_THE_EXPLORER_VIII._EP._05_-_DORA_AND_PERRITO_TO_THE_RESCUE_season_poster_landscape.jpg” providerVersionNum=“1” creationDateTime=“2021-03-26T00:00:00Z” startDateTime=“2021-04-02T00:00:00Z” endDateTime=“2022-09-30T23:59:00Z”>
<content:ContentFileSize>279904</content:ContentFileSize>
<content:ContentCheckSum>11D0EE4F716D60B4DCE8D75BA6F593B6</content:ContentCheckSum>
<content:X_Resolution>1920</content:X_Resolution>
<content:Y_Resolution>1080</content:Y_Resolution>
<content:Codec>JPG</content:Codec>
</Asset>
</ADI3>

Auxiliary Data Import Format

Currency Rate Import Format

The SmartTUBE solution supports the import of exchange rates in the XML format of the European Central Bank (ECB). Dynamically updated rates from ECB could be obtained here, but you can use any other source with the same format.

Example

<gesmes:Envelope xmlns:gesmes=“http://www.gesmes.org/xml/2002-08-01” xmlns=“http://www.ecb.int/vocabulary/2002-08-01/eurofxref”>

 <gesmes:subject>Reference rates</gesmes:subject>

 <gesmes:Sender>

   <gesmes:name>European Central Bank</gesmes:name>

 </gesmes:Sender>

 <Cube>

   <Cube time=“2022-04-26”>

     <Cube currency=“USD” rate=“1.0674”/>

     <Cube currency=“JPY” rate=“136.15”/>

     <Cube currency=“BGN” rate=“1.9558”/>

     <Cube currency=“CZK” rate=“24.423”/>

     <Cube currency=“DKK” rate=“7.4393”/>

     <Cube currency=“GBP” rate=“0.84135”/>

     <Cube currency=“HUF” rate=“374.46”/>

     <Cube currency=“PLN” rate=“4.6466”/>

     <Cube currency=“RON” rate=“4.9458”/>

     <Cube currency=“SEK” rate=“10.3935”/>

     <Cube currency=“CHF” rate=“1.0229”/>

     <Cube currency=“ISK” rate=“138.40”/>

     <Cube currency=“NOK” rate=“9.7943”/>

     <Cube currency=“HRK” rate=“7.5625”/>

     <Cube currency=“TRY” rate=“15.7944”/>

     <Cube currency=“AUD” rate=“1.4828”/>

     <Cube currency=“BRL” rate=“5.2490”/>

     <Cube currency=“CAD” rate=“1.3613”/>

     <Cube currency=“CNY” rate=“6.9837”/>

     <Cube currency=“HKD” rate=“8.3735”/>

     <Cube currency=“IDR” rate=“15365.76”/>

     <Cube currency=“ILS” rate=“3.5147”/>

     <Cube currency=“INR” rate=“81.7265”/>

     <Cube currency=“KRW” rate=“1340.02”/>

     <Cube currency=“MXN” rate=“21.6538”/>

     <Cube currency=“MYR” rate=“4.6485”/>

     <Cube currency=“NZD” rate=“1.6102”/>

     <Cube currency=“PHP” rate=“55.681”/>

     <Cube currency=“SGD” rate=“1.4666”/>

     <Cube currency=“THB” rate=“36.596”/>

     <Cube currency=“ZAR” rate=“16.7787”/>

   </Cube>

 </Cube>

</gesmes:Envelope>

Weather Forecast Import

SmartTUBE apps allow you to provide your subscribers with a weather forecast. The Openweather service is used as the data source. If you do not know whether the corresponding module is installed on your system, please contact the SmartLabs Technical Support . Then create a job for regularly updating weather data:

  1. Register on the website Openweathermap.org and get your unique API key {appid=} by following the instructions on the “Guide” page.
  2. Create a new job using the weatherforecastsimport#doimport method in the Method field.
  3. In the Method parameters > appid field, specify your Openweather API key.
  4. In the Dictionaries > Cities > [desired city] > External ID field, specify the corresponding city ID on the Openweather website. You can find it on the https://openweathermap.org/city page after searching by the desired city. The last parameter in the URL is the city ID. Example for Moscow:
Image2

You can also specify the city geo coordinates in the Coordinates field. Example:

Image1

Please note that this field has a lower priority than the External ID.

Maintenance and Troubleshooting

This section provides a detailed description of the SmartTUBE Server components, their configuration options, and instructions on how to configure the messaging service.

Baselines

General Description

The SmartTUBE SDP server includes a number of components, like Data Server, Cache Server, Reporting Module, etc. Components are located in the Components Container (see SmartSDPCompcontainer Components Container) controlled by ccadmin utility (see Control through ccadmin utility).

The Components are:

  • SmartSDPDataModelCore – the component serves as a container for main entities and services of SmartTUBE SDP server.
  • SmartSDPDataServer – the component performs the functions of JSON RPC server for handling entities and services of SmartTUBE SDP server.
  • SmartSDPCacheServer – the component performs the functions of a server providing access to data and services via API.
  • SmartSDPReport – the component performs the functions designed for receiving reports.

Operation and Interaction of Components

Components of SmartTUBE SDP server operate within Components Container (CC) as modules. Each of these components must:

  • Implement system interfaces and some of the functional interfaces. The main class of the component must implement ISDPComponent and ISDPPropertiesOwner interfaces described in smartsdp.components package of SmartSDPCommon module (smartsdp-common.jar). Besides the two specified interfaces the main class of the component may inherit from any class and implement any other interfaces. For example, the main class of the component may inherit from HttpServlet class and therefore be a servlet.
  • Be prepared for deployment as a JAR file.
  • Have a configuration file describing the sequence of component deployment and the data for installing the initial values of its properties and connections. The component is created, initialized and launched based on this file.

Component configuration file is a text file in JSON format containing component’s metadata and settings. During component deployment the configuration file is placed in CC directory /conf/modules and read from there during CC launch (the configuration file of CC itself is placed in the root of /conf directory).

The name of the configuration file must have <ComponentName>.config format. The name of the configuration file (without the suffix) in fact serves as a component identifier within this CC; one can use it to refer to the component from other components’ configuration files. More than one copy of the same component can be launched in this way with different identifiers and settings.

The configuration file must have the common part which is the same for all configuration files and a part relevant only for a specific component (described in the Component Configuration Settings sub-topics.

The most frequently used SmartTUBE business logic settings are located in the system.conf file.

Interaction of components via message exchange

Remote interaction of SmartTUBE server components in most cases is based on exchanging messages, which is implemented via Akka Framework (http://akka.io).

Akka implements ideas and principles of the Actor Model. In Akka, an addressee or a source of the message is Actor. It is defined by an Akka address with the following format:

akka.tcp://akka_system_name@host:port/user/actor_name, where

  • akka_system_name is the name of the Akka system (application).
  • host is the host where this node of Akka system is deployed.
  • port is the port where this node of Akka system is “listening”.
  • actor_name is the name of the addressee / source.

If a component is implemented as a node of the Akka system the configuration file sets the values of parameters describing such a node.

See details at http://akka.io/docs/

Configuration Reloading

The most frequently used SmartTUBE business logic settings are located in the system.conf file. And most of these settings are retrieved by components “on the fly” (without constant saving to Java variables). After making changes to the file, you may need to update it on the SmartTUBE nodes (data-servers and cache-servers) without restarting them. To do this you can use one of the following ways:

  1. Using SmartTUBE Admin Console:
    Click the
     Reload configs button in the lower-right corner of the Administration > Cache Servers page.
  2. Using HTTP method:

    Request the following method in any convenient way (for example, using a web browser):

    http://[sdp_host]:8089/api/admin/reloadConfigAllNodes

  3. Using local console (updates the configuration only on the current node):
    1. If the SmartTUBE is running as a daemon, you can use the ccadmin utility:

# usage: java jar ccadmin.jar -h<host> -p<port> -c<command> -t<timeoutSec>

java -jar ccadmin.jar -hlocalhost -p4440 -creloadConfigOneNode -t20

  1. If the SmartTUBE is running as a command line, use the console in/out:

… Input ‘quit’ for exit …

reloadConfigOneNode

SmartSDPCompcontainer Components Container

Purpose

Components Container (CC) of SmartTUBE server is designed for:

  • Dynamic uploading and downloading of server components.
  • Providing interaction of server components by establishing inter-component connections.

After loading and connection the components can interact with each other via program interfaces provided by them. CC also provides components with access to services of its level via program interfaces.

CC can be controlled with ccadmin utility, see the Control through ccadmin utility section.

The following terms are used below:

  • Container-Install-Directory – directory for installing CC.
  • Component-Install-Directory – directory for installing the component.

Use

CC is a JAR file launched with the command:

java -jar smartsdp-comp-cont.jar

Configuration file

container.conf

The file is located in the root of Container-Install-Directory/conf directory.

The configuration file reference is provided in the Components Container section.

Initialization and operation

Configuration files of all components designed for deployment under the control of this Components Container (CC) must be located in Container-Install-Directory/conf/modules directory. The composition of components that are going to operate under control of this CC is in fact determined by configuration files found in this directory.

JAR file of each component must be placed in Component-Install-Directory/bin directory.

JAR files of external libraries the component is dependent on must be placed in the Component-Install-Directory/lib library.

During the launch CC:

  1. Reads configuration files of components in sequence from the Container-Install-Directory/conf/modules directory.
  2. Analyzes each file.
  3. Based on the acquired data, creates the structure of component meta-data, the list of features and links.
  4. Checks the presence of the component’s JAR file in the Component-Install-Directory/bin directory specified in the configuration file of the component and JAR files of external libraries the component is dependent on in the Component-Install-Directory/lib directory.
  5. If all checks have been successful, component metadata is included in the list.
  6. The list is sorted by value of loadOnStartup components field.
  7. Components are created, initialized (values of requested features and connections are installed) and launched in sequence, according to the list. Initialization is performed according to the data from the configuration file of each component.
  8. If component launch was successful it is included in the list of launched components.

The link (for setting up connection between components) may be installed only on the already launched component. That is why it is required to set the value of the component’s loadOnStartup feature where the link is created so that it is greater than the value of this feature of the component referenced in the link.

After launching all components CC goes to command waiting cycle. Commands can be given via command line.

Control through commands via command line

CC recognizes the following commands:

run config-file-name-without-ext

run command launches the component whose configuration file’s name is reflected in the command parameter. At this moment the configuration file, component’s JAR file and JAR files of external libraries the component is dependent on must be located in the respective directories (see above).

stop launched-component-name

stop command stops the component whose name is reflected in the command parameter. Important: links installed on this component become invalid; CC does not track this.

list (ls)

list command displays the list of launched components in the console, specifying for each of them the name of the component, JAR file, main class and list of components referencing it.

Example of output:

     1) Redirector:   JAR: SmartRedirector.jar, MAIN CLASS: smartlabs.redirector.main.SmartRedirector,

     2) ContentDBManager:   JAR: SmartContentDBManager.jar, MAIN CLASS: smartlabs.contentdbmanager.main.SmartContentDBManager,

            REF: Redirector by prop ‘contentDBManager’ 

     …

quit (q)

quit command launches the process of stopping CC: each launched component is sent a quit signal after which CC stops.

Control through ccadmin utility

Purpose

This utility is designed to control the Components Container (CC) through commands received by CC via TCP/IP.

Usage

The utility is provided as a JAR file and launched by the command:

java -jar ccadmin.jar -h<host> -p<port> -c<command> -t<timeout>, where:

  • host is the IP address of the host where CC is launched (by default localhost).
  • port is the TCP/IP port where CC receives commands via TCP/IP.
  • command are commands received by CC. Possible commands:
    • q | quit – stopping CC.
    • ls | list – recording the list of launched components into the logbook (level of record itemization must be INFO or higher).
    • run:<Component> – launching component with the name of “Component” (the name of component’s configuration file is used as a name).
    • stop:<Component> – stopping component with the name of “Component” (the name of component’s configuration file is used as a name).
    • timeout – CC response waiting time (by default 30 seconds). Timeout is registered when the time runs out.

If the command is executed successfully, ccadmin returns Exit Code equal to 0. Otherwise ccadmin returns:

  • 1 – if timeout of waiting for a response was exceeded,
  • 2 and more – if another error occurred when running the program.

SmartSDPDataModelCore Component

Purpose

This component defines the business model for controlling entities and services with SmartSDPDataServer component. Entities of SmartTUBE server are entities in terms of JPA (Java Persistence API).

Deployment

The component is essentially an sdp-datamodel-core.jar JAR file placed in the Components Container (CC) in its modules directory.

Usage

The services of this component are not used by other components of the SmartTUBE server.

Dependencies

This component has no dependencies on the services of other components of the SmartTUBE server.

Configuration File

data-model-core.conf

See more details on components’ configuration files in the Operation and Interaction of Components section.

The configuration file reference is provided in the Data Model Core section.

SmartSDPDataServer Component

Purpose

This component (Java HttpServlet) performs the functions of JSON RPC (Remote Procedure Call) server for handling entities and services of SmartTUBE server.

The server makes it possible to:

  1. Identify and authorize the user.
  2. Request meta-data of server objects (entities and services).
  3. Execute pre-defined (implemented by the server) methods of handling entities (create, update, delete, list, find, count, page).
  4. Perform additional (implemented “manually”) methods of entities and services.

Implemented Interfaces

The component provides integration with IPTV/OTT end-user devices according to the SmartTUBE End-User Device API.

Usage

The services of this component are not used by other components of the SmartTUBE server.

Dependencies

This component has no dependencies on the services of other components of the SmartTUBE server.

Configuration File

data-server.conf

See more details on components’ configuration files in the Operation and Interaction of Components section.

The configuration file reference is provided in the SmartTUBE JSON Data Server section.

SmartSDPCacheServer Component

Purpose

This component performs the functions of a server providing access to data and services via API.

Deployment

The component is essentially an sdp-cache-server.jar JAR file placed in the Components Container (CC) in its modules directory.

Implemented Interfaces

The component provides integration with IPTV/OTT end-user devices according to the SmartTUBE End-User Device API.

Usage

The services of this component are not used by other components of the SmartTUBE server.

Dependencies

This component has no dependencies on the services of other components of the SmartTUBE server.

Configuration File

cache-server.conf

See more details on components’ configuration files in the Operation and Interaction of Components section.

The configuration file reference is provided in the Cache Server section.

SmartSDPReport Component

Purpose

This component performs the functions designed for receiving reports.

Implementation

The library is developed in Java, version 8.

Deployment

The component is essentially an sdp-report.jar JAR file placed in the Components Container (CC) in its modules directory.

Usage

The services of this component are not used by other components of the SmartTUBE server.

Dependencies

This component has dependencies on the SmartSDPDataServer services.

Configuration File

report.conf

See more details on components’ configuration files in the Operation and Interaction of Components chapter.

The configuration file reference is provided in the Reporting Module subsection.

Server Component Configuration Reference

Settings Common to all Components

A number of configuration files have the following common parameters:

description, string

Component description.

install-path, string

Full path to the directory, where a SmartTUBE component is installed. The jar file of the component must be stored in the {Component-Install-Directory}/bin directory. The {Component-Install-Directory}/lib directory contains jar files of external libraries that affect the component’s work.

jar, string

Name of the components jar file. For example, SmartBGPTableAggregator.jar

class, string

Full name (including the Java package name) of the main class of the component. For example, smartlabs.bgptableaggregator.main.SmartBGPTableAggregator

singleton, boolean

Flag to make the component work as a single instance (“true”), otherwise multiple instances can be launched (“false”).

load-on-startup, integer

Priority of running the component: components with a smaller value are started earlier than the components with a bigger value.

servlet-context-path, string

Only for servlet components: context of HTTP requests.

properties, {object}

Initial values of the component properties and links with other components. Properties can be simple properties (e.g., load-on-startup = 12) or collections (e.g., sdp-dataservers = [ “10.25.190.11:8084”, “10.25.190.12:8084” ]).

cache.thread.pool.http.workers.maximumPoolSize, integer

Maximum HTTP thread pool size

cache.thread.pool.http.workers.queueCapacity, integer

Queue size if no free thread is found in the HTTP thread pool

cache.thread.pool.http.workers.keepAliveTimeSec, integer

Thread keepalive time (in seconds), i.e. how long idle threads live in the pool and wait for new tasks.

sdp-properties-file-path, string 

Path to the file with SmartTUBE server settings

number-of-http-get-handlers, integer

Number of worker streams processing HTTP GET requests

http-client-connection-timeout-millis, integer  

HTTP client connection timeout, in ms.

http-client-socket-timeout-millis, integer  

HTTP client socket timeout, in ms.

number-of-http-post-handlers, integer  

Number of worker streams processing HTTP POST requests

number-of-notification-handlers, integer  

Number of notification processors

trace-notification, boolean

Flag to trace notifications in the log

trace-http-requests, boolean 

Flag to trace HTTP requests in the log

akka-local, {object}

Settings for the Akka system local for the current component

host, string

Host of the Akka system

port, integer

Port of the Akka system

General Configuration Settings

The system.conf file contains the general configuration settings for the SmartTUBE SDP server.

Parameter Description

system-properties, {object}

Core section of system settings

advLimitImport.ftp.ip, string

IP of the FTP for importing data on ad rewind limits

advLimitImport.ftp.port, integer

Port of the FTP for importing data on ad rewind limits

advLimitImport.ftp.dir, string

FTP directory containing data on ad rewind limits

advLimitImport.ftp.login, string

Login to FTP for importing data on ad rewind limits

advLimitImport.ftp.password, string

Password to FTP for importing data on ad rewind limits

advLimitImport.mongodb.uri,string

URI of MongoDB storing data on ad rewind limits

advLimitImport.mongodb.databaseName,string

Name of MongoDB database storing data on ad rewind limits

advLimitImport.mongodb.collection,string

Name of MongoDB database collection storing data on ad rewind limits

advLimitImport.scheme.id.uri, string

Data scheme used to import inband event messages (data on ad rewind limits)

default-profile-language, string

Code of the default profile language

default-profile-currency, string

Code of the default currency

createAccountByTemplate.generateByMask.generateCount.maxValue, integer

Default value: 10000

Max number of service accounts that can be automatically generated by template via Admin Console (Service accounts –> Service account templates –> [any template] –> “Service account generator” button) or OSS/BSS API.

user-accounts.store-days,integer

Number of days the data about the user account are kept in cache

pending-notifications.store-hours,integer

Number of hours notifications for STBs are kept

media-positions.store-days,integer

Number of days data on media positions are kept in cache

upload-path, string

Directory, where images are loaded to

images-store-days,integer

EPG image storage period in days, used for the garbagecollector#deleteexpiredepg job

channel-list-generate-drmtoken, integer

Flag to pass DRM tokens in the channel list to devices.

use-session-cache-in-memory,

Flag to use the in-memory session caching mechanism

send-media-position-notify,

Flag to send notifications when receiving a media position change command

sdp-dataservers,

Host and port of data servers. The port must match tomcat-attributes.port port in container.conf on the servers with installed SmartSDPDataServer component

cache-servers,

Host and port of Cache servers. The port must match tomcat-attributes.port port in container.conf on the servers with installed SmartSDPCacheServer component

relogin-notification,

Flag to prohibit concurrent client sessions. Used when the operator is not using the DRM token mechanism.

subscription-timeout,

Timeout after the device subscribes to Comet notification channel used by the server to close the old channel socket, ms

drm-widevine-getToken-expirationDurationSeconds,

Widevine DRM token validity period in seconds

drm-widevine-getToken-signer,

Widevine DRM signer ID (configurable backend or operator ID)

drm-widevine-getToken-signer-secret,

Configurable secret of a specific Widevine DRM signer

drm-widevine-getToken-licenseServer-url,

URL of the Widevine DRM license server

listContentOrderByName,

Flag to sort VoD content in the Client UI by name only. Takes priority over the metacontent.defaultSortExpression setting.

userfeed.filterAvailableProgram,

Flag to show only the programs available to the subscriber in the “Top viewed programs” feed in the Client UI

userfeed.topPrograms.fetch.size,

Fetch size of “Top viewed programs”

userfeed.topPrograms.list.size,

The number of programs to show in the “Top viewed programs” in the Client UI

purchaseOffer.skipDuplicateOffers,

Flag to ignore duplicate offers from different price lists (for example, SVOD and TVOD) for the same content item

use_http_connection_pool,

Flag to use HTTP connection pool for sockets

default-authorize-login-priority,

Login return priority when client authorization:

  • “ACCOUNT_TERMINAL”: first — from the account, second — from the connection
  • “TERMINAL_ACCOUNT”: first — from the connection, second — from the account
  • “TERMINAL”: from the connection only
  • “ACCOUNT”: from the account only

ppv-minus-hours,

Period during which PPV programs can be viewed using the TSTV service, in hours

same.site.cookie, {object}

Settings of same-site cookies

adminUI.use,

Flag to use the same-site cookies when logging in from SmartTUBE Admin Console

adminUI.direct.value,

Sets the same-site value in explicit constant form for requests from SmartTUBE Admin Console. For example: “SameSite=Strict”

device.use,

Flag to use the same-site cookies when authorization from client devices

value.setByHeaders,

Flag to calculate the value for the SameSite based on the request headers. Otherwise, it will always be SameSite=Strict (for both Admin Console and client devices). Calculation is performed using the following logic:

  • if the header Origin = host from the URL, it will be SameSite=Strict
  • if the header X-Forwarded-Proto = http, it will be SameSite=None
  • if the header X-Forwarded-Proto = https, it will be SameSite=None; Secure
  • if scheme from URL = http, it will be SameSite=None
  • if scheme from URL = https, it will be SameSite=None; Secure

device.direct.value,

Sets the SameSite value in explicit constant form for requests from client devices. For example: “SameSite=None; Secure”

epg-search-fields,string

Fields used for EPG search with prioritization. Example: “name^2, description” — search results for the program name are two times more weight in comparison with the results of the search by description. Allowable fields to search: name, description, episodeName, oName (original name).

scheduled.jobs.notificationsService.tick.try.count

Default value: 6

Total number of attempts to perform the notificationsservice#tick job

scheduled.jobs.notificationsService.tick.try.timeoutMillisec

Default value: 10000

Timeout between attempts to perform the notificationsservice#tick job

scheduled.jobs.notificationsService.tick.generateSqlErr.count

Default value: 0

For debugging only. The number of attempts with SQL errors to generate. For example, if the value is 2, the tick job will only be executed on 3 attempts.

scheduled.jobs.setFinishStatus.try.count

Default value: 30

Total number of attempts to set the “Completed” status for the job

scheduled.jobs.setFinishStatus.try.timeoutMillisec

Default value: 10000

Timeout between attempts to set the “Completed” status for the job

scheduled.jobs.setFinishedInStatus.generateSqlErr.count

Default value: 0

For debugging only. The number of attempts with SQL errors to generate. For example, if the value is 2, the “Completed” status for the tick job will only be set on 3 attempts.

userfeed.topPrograms.method, string

Method used by client devices to retrieve the Top10 rail feed:

  • topprogramlistv1 — the /api/v1/userfeed/topPrograms? method
  • topprogramlistv2 — the /api/v1/userfeed/topProgramsV2? method

metacontent.search.fields,string

Default value: “name^4, originalName^3, tag^2, description”

Fields used for VoD search with prioritization. Example: “name^2, description” — search results for the movie name are two times more weight in comparison with the results of the search by description. Allowable fields to search: name, description, episodeName, originalName, tag.

metacontent.defaultSortExpression

Default sequence of sorting VoD content by metadata fields, used when the client device does not send the sort parameter in the request. The field names can be retrieved using the metacontent/list? method of SmartTUBE End-User Device API. For example, “defaultRating,defaultOrder,-startDate,+nameSort.#lang”,

where

  • defaultRating, defaultOrder, startDate, etc.  — searchable field names,
  •  — descending sorting order,
  • + — ascending sorting order,
  • #lang — an instruction to search the specified field by the current Client UI language

metacontent.load.queryFetchSize

Default value: 10000

The size of the data fetch from the DBMS in one iteration when the metacontent cache is fully reloaded

metacontent,{object}

Settings for processing metadata and sending it to client devices.

providers, string

List of providers to import and process separated by comma (optional). If not set, the import job performs import sequentially for all active providers in the SmartTUBE Admin Console > Administration  > Content providers dictionary.

purchaseAvailable-ignoreForDeviceTypes

Type of devices to which is needed to return an empty response to the /api/v1/metacontent/purchaseAvailable method request (this method returns the purchased content which is available for the service account at the moment).

defaultLangForProvidersExternalIds

Language for searching and comparing movies/directories when importing (“en” by default). For example, the system has more than one external provider. The importer compares the movie from Provider 1 and Provider 2 in the specified language. If the name of the movie and the year are the same for both providers, it is considered to be the same movie. Thus, only 1 movie with two links (for each provider) is created in the database.

importNotActive, boolean

Flag to import content for an inactive provider (i.e. a provider with the “Display on device” checkbox not checked in the SmartTUBE Admin Console > Administration > Content providers dictionary)

job, {object}

Metadata import jobs settings

doimport-enabled

Flag to perform a scheduled metacontent import job on the current SDP node. Important: if the job is performed on several SDP nodes, content duplication is possible.

{external provider ID in lowerCase}, {object}

Parameters used by the multiprovider import job for the content of specified provider

providerSupportedLangsMap

Languages of the imported MEGOGO metadata with the correspondence of their IDs to SmartTUBE IDs. Default value: “ru=ru, en=en”. The left value — MEGOGO language ID; the right value — SmartTUBE language ID.

use.provider.logic, string

Metadata processing logic used during import. The “logic” here means a set of settings and rules for processing metadata specific to each provider. Thus, in the example below, the FBOD provider will download content from the FTP server, with the same folder naming rules, using the same logic and in the same XML format as the HBO provider. Example: fbod.use.provider.logic = “HBO”

ftpErrLog, boolean

Flag to log the FTP errors

ftpErrLogDirectory

Directory for the FTP error log of the HBO metadata import

ftpErrLogSaveToMainLog, boolean

Flag to log FTP errors in the main log

ftpErrLogDirectoryRemoveAfterDays

FTP error log storage period, in days

ftp.server, string

Content provider’s FTP server hostname

ftp.login, string

Content provider’s FTP server login

ftp.password, string

Content provider’s FTP server password

ftp.contentRootPath, string

Path to the content root directory on the provider’s FTP server

accessLevelRemoveAllButDigits, boolean

Flag to ignore all characters except digits in incoming metadata about the content access level

accessLevelPrefix, string

Prefix that is inserted before the number specified in the incoming metadata about the content access level. For example, if “TV-15+” is specified in the incoming metadata, parameter accessLevelRemoveAllButDigits is enabled, and the value of this parameter is “PEGI-”, then the value “PEGI-15″ is written to the SDP DB.

providerAccessLevelMap, string

For example, “All=PEGI-3,15+=PEGI-12,15=PEGI-12”,

checkOtherProvLinkExists, boolean

Flag to hide movies from this provider if they already exist from others (to avoid overlapping content)

doUnpublishCorrects, boolean

Flag to unpublish the content in the end of import process if there is not enough data to publish the content

dropUnusedProviderLinks, boolean

Flag to not delete assets if they are missing from the provider’s FTP

overrideContentFields.do, boolean

Flag to override the content metadata fields each time the re-import job is run

megogo, {object}

Settings specific to the MEGOGO content import

public.key, string

Public key for interacting with MEGOGO services

private.key, string

Private key for interacting with MEGOGO services

billing.partnerId, string

Partner ID for interacting with MEGOGO services

content-sortBy

Type of MEGOGO content sorting. Default value: “popular”. Other valid values: “recommended” — sort by recommended movies, “add” — sort by date of adding a movie to the database (in descending order).

saveFreeAndNonFreeSvodInSinglePackage

Flag to combine AVOD and SVOD MEGOGO content into one bundle

ivi, {object}

Settings specific to the IVI content import

appVersion, integer

ID of the IVI app version. Allows to get a catalog containing content that is available for watching on a specific version of the app.

purchase.partnerId, string

IVI partner ID

purchase.psKey.toUse, string

Payment system

getPurchaseInfo.skipTestPrices, boolean

Flag to ignore test price plans

device, {object}

Client device settings

notifications, {object}

Settings for notifications sent to client devices

comet.nginx, {object}

Comet server settings

use

Flag to redirect comet messages to the Nginx Nchan server

urls

List of comet Nginx Nchan servers, comma separated. For example, [“http://10.65.2.63/nchan/pub1”, “http://10.65.2.63/nchan/pub2”]. Messages are sent to each specified server.

httpPooling, {object}

HTTP pooling settings

use

Flag to use HTTP pooling (keep HTTP connections in keep-alive and reuse them for sending messages)

keepAliveMillisec

Connection lifetime. If 0, the connection will not be closed from the client side.

defaultMaxPerRoute

Max. number of simultaneous connections for a single host

maxTotalConnections

Max. total number of connections

connectionTimeoutMillis

Connection timeout

soTimeoutMillis

Socket timeout

authorize.linkByLoginFromOss.do,boolean

Flag to enable linking of client devices to accounts without a password via the device_get_info request to OSS/BSS.

http-proxy, {object}

HTTP proxy server settings

host

HTTP proxy host address. Leave the field empty, if proxy is not used

port

HTTP proxy server port

formats, {object}

Format of date and time for incoming and outgoing data

date-incoming

Format of date for incoming data

date-outgoing

Format of date for outgoing data

time-incoming

Format of time for incoming data

time-outgoing

Format of time for outgoing data

datetime-incoming

Format of date and time for incoming data

datetime-outgoing

Format of date and time for outgoing data

auth.jwt, {object}

Settings for the JWT authorization used for secure interaction between end-user devices and the SDP through the SmartTUBE End-User Device API, as well as for restricting access to OTT TV channel streams and VOD streams.

use, boolean

Default value: true

Flag to enable JWT authorization

key.private.path, string

Private key path. Example: “/opt/smartlabs/smarttube5/jwt/keys/jwtRS256.key”

key.public.path, string

Public key path. Example: “/opt/smartlabs/smarttube5/jwt/keys//jwtRS256.key.pub”

exp.sec, integer

Default value: 86400

Token expiration period, in seconds.

integrationApi.auth,{object}

Settings for the OSS/BSS API authorization

basic,{object}

Settings for the HTTP Basic Authorization

use,boolean

Default value: false

Flag to use the HTTP Basic Authorization

jwt,{object}

Settings for the JWT (JSON Web Token) authorization

use,boolean

Default value: false

Flag to use the JWT authorization

key.private.path, string

Path for the private key for the JWT sign/check. Initialized only on SmartTUBE startup. Cannot be reloaded by the configuration files reloading.

key.public.path, string

Path for the public key for the JWT sign/check. Initialized only on SmartTUBE startup. Cannot be reloaded by the configuration files reloading.

exp.sec, integer

Default value: 86400

Token expiration period, in sec

kid,string

Default value: none

JWT key ID

oss.standard.url.value, string

URL of the OSS/BSS endpoint

oss.standard.auth.basic.login.value, string

Login for accessing OSS/BSS

oss.standard.auth.basic.password.value, string

Password for accessing OSS/BSS

standard-oss-url,string

URL of the OSS/BSS endpoint. Obsolete parameter.

standard-oss-login,string

Login for accessing OSS/BSS. Obsolete parameter.

standard-oss-password, string

Password for accessing OSS/BSS. Obsolete parameter.

oss-send-activate, boolean

Flag to inform OSS/BSS about new client device activation

use-oss,boolean

Flag to interact with OSS / BSS when performing purchases / subscriptions

subscribe.recursive.notify.oss,boolean

Flag to send OSS/BSS notifications on subscription to dependent bundles (if the SVoD bundle has dependent bundles).

dictionary.update.device.notification.delay.sec, integer

Default value: 3600

Period during which notifications about dictionary data updates should be sent to devices at random times.

dictionary.update.device.notification.hold.sec, integer

Default value: 600

Period until the first notification on dictionary data updates is sent to the devices. It is necessary in order to be sure that the data has time to be updated on the SmartTUBE Cache servers.

dictionary.update.device.notification.hold.cache.plus.sec, integer

Default value: 600

Additional period until the first notification on dictionary data updates is sent to the devices. It is necessary in order to be sure that the data has time to be updated on other caches (i.e. nginx).

auditing.on, boolean

Default value: true

Flag to enable monitoring of the Admin Console users’ activity.

auditing.shelfLife, integer

Storage time of the Admin Console user activity log. If omitted, the default value of 60 days is used.

license,{object}

Settings for calculating “Licenses for the number of client devices of a certain type”

calcCountsAggInfo.do, boolean

Default value: true

Flag to cache in memory the last calculated total number of client devices by type

calcCountsAggInfo.period.sec, integer

Default value: 600

Period between calculations, in sec

countActiveDevice.filter.byLastAuthDateNotNull.do, boolean

Default value: true

Flag to consider only devices with at least one authorization

countActiveDevice.[device type].filter.byLastAuthDateNotNull.do, boolean

Similar to license.countActiveDevice.filter.byLastAuthDateNotNull.do, but specific to the specified [device type]. Valid values for [device type] — entities of the Device types dictionary in lowerCase.

countActiveDevice.filter.byLastAuthDateInterval.period.days, integer

Default value: 0

Flag to consider when calculating only devices that were last logged in no earlier than N days ago

countActiveDevice.[device type].filter.byLastAuthDateInterval.period.days, integer

Similar to license.countActiveDevice.filter.byLastAuthDateInterval.period.days, but specific to the specified [device type]. Valid values for [device type] — entities of the Device types dictionary in lowerCase.

action.authorize.changeDeviceType.check.do, boolean

Default value: false

Flag to check the license during authorization, if the device type for the client device has been changed.

metacontent.remove.asset.removeFromStorage.forProviders, {object}

list, string

List of content providers (separated by commas) whose content assets should be removed from the video server when content is deleted from the SmartTUBE catalog

[content provider name in lowercase].http.url.value, string

URL of the video server for the specified content provider

[content provider name in lowercase].http.useProxy, boolean

Default value: false

Flag to use HTTP proxy

[content provider name in lowercase].http.retryCount, integer

Default value: 2

Number of attempts to send a request to the video server

[content provider name in lowercase].http.retryTimeoutMillis, integer

Default value: 500

Time between attempts to send a request to the video server

[content provider name in lowercase].http.connectionTimeoutMillis, integer

Default value: 1000

Video server connection timeout

[content provider name in lowercase].http.socketTimeoutMillis,integer

Default value: 10000

Video server socket connection timeout

serviceAccount.deleteInactive.removeAlreadyDeletedAccountsFromArchive.do, boolean

Flag to remove deleted service accounts from archive

serviceAccount.deleteInactive.removeAlreadyDeletedAccountsFromArchive.storeDays, number

Days to store deleted service accounts in the archive

serviceAccount.terminal.adminUI.oss.deactivateIfUpdateUuid.send, boolean

Default value: false

Flag to send the deactivate_uid request to the OSS/BSS when the terminal’s UUID is being edited via the SmartTUBE Admin Console

serviceAccount.terminal.adminUI.oss.deactivateIfClearUuid.send, boolean

Default value: false

Flag to send the deactivate_uid request to the OSS/BSS when the terminal’s UUID is being cleared via the SmartTUBE Admin Console

serviceAccount.terminal.adminUI.oss.activateIfUpdateUuid.send, boolean

Default value: false

Flag to send the  request to the OSS/BSS when the terminal’s UUID is being edited via the SmartTUBE Admin Console

serviceAccount.terminal.adminUI.oss.deactivateIfDeleteTerminal.send, boolean

Default value: false

Flag to send the deactivate_uid request to the OSS/BSS when the terminal is being deleted via the SmartTUBE Admin Console

serviceAccount.adminUI.oss.deactivateTerminalsIfDeleteAccount.send, boolean

Default value: false

Flag to send the deactivate_uid requests to the OSS/BSS for all terminals of the service account when it is being deleted via the SmartTUBE Admin Console

serviceAccount.adminUI.oss.deactivateIfDeleteAccount.send, boolean

Default value: false

Flag to send the deactivate_account requests to the OSS/BSS if the service account is being deleted via the SmartTUBE Admin Console

multiroom-link-accept-rebind, boolean

Flag to allow to link the STB device to another terminal, even if some UUID is already registered on this terminal. The UUID is replaced with a new one, and so the device is bound to the new terminal. May be used within the multiroom functionality.

multiroom.link.uuidOverride.deviceType.list, [array of strings]

Default value: empty

DEPRECATED! See instead multiroom.link.uuidOverride.bySession.deviceType.list below.

List of device types for which the UUID should be overridden when linking to a service account (multiroom group). Device activation logics:

  • when activation by the terminal login/password — the UUID is overridden and the device is linked to the terminal found by the login/password;
  • when activation by the service account login/password and if the account has only 1 terminal of the specified device type — the UUID is overridden and the device is linked to this terminal;
  • when activation by the service account login/password and if the account has 0 or more than 1 terminal of the specified device type — the standart device linking logics is applied (i.e. with checking device limits).

multiroom.oss.relink.deactivate.send, boolean

Default value: false

Flag to send the deactivate_uid request to the OSS/BSS when the existing service account (already activated, with the specified UUID) is being re-linked to another account.

multiroom.oss.relink.activate.send, boolean

Default value: false

Flag to send the activate_uid request to the OSS/BSS when the existing service account (already activated, with the specified UUID) is being re-linked to another account.

multiroom.oss.relink.likeSdp4Rebind.deactivate.send, boolean

Default value: false

Flag to send the deactivate_uid request to the OSS/BSS when the existing service account (already activated, with the specified UUID) is being re-linked to another account. Only for the case if “multiroom-link-accept-rebind”: true

multiroom.oss.relink.likeSdp4Rebind.activate.send, boolean

Default value: true

Flag to send the activate_uid request to the OSS/BSS when the existing service account (already activated, with the specified UUID) is being re-linked to another account. Only for the case if “multiroom-link-accept-rebind”: true 

multiroom.oss.relink.uuidOverride.deactivate.send, boolean

Default value: true

DEPRECATED! Flag to send the deactivate_uid request to the OSS/BSS for the overridden UUID (see the multiroom.link.uuidOverride.deviceType.list parameter above). May be used within the multiroom functionality.

multiroom.oss.relink.uuidOverride.activate.send, boolean

Default value: true

DEPRECATED! Flag to send the activate_uid request to the OSS/BSS for the new UUID (see the multiroom.link.uuidOverride.deviceType.list parameter above). May be used within the multiroom functionality.

multiroom.link.uuidOverride.bySession.deviceType.list, [array of strings]

Default value: [“WEB”]

Currently used instead of multiroom.link.uuidOverride.deviceType.list.

List of device types for which the “UUID overriding logics” should be applied when linking a new device to a service account (multiroom group). The feature logics:

  1. Check whether a device can be linked using standard logic (based on device limits).
  2. If unsuccessful, the linking based on existing session information is applied (i.e. sessions’ keep alive data is checked).
  3. Already linked devices are analyzed, excluding those currently in an active “online” session. These devices become candidates for re-linking to the same terminal, with their UUID replaced by a new one.
  4. Selection of suitable terminal for UUID replacement is based on the absence of a session (due to expired keep alive or its absence), with priority given to older devices in terms of last authentication date.
  5. If a suitable terminal is not found, offline sessions with keepalive are assessed, starting from the oldest sessions. A session is considered offline if no activity is detected within 5 minutes (by default, see device.session.keepalive.consider.online.period.sec.value). Keepalive time is updated for each session request (e.g. SmartTUBE End-user Device API requests epg/list, metacontent/list, mediaposition requests, etc., except for requests for non-session related metadata and multiroom/link).

multiroom.link.uuidOverride.bySession.replacesUuid.dropSession.do, boolean

Default value: true

Flag to reset the old session after a new device is re-linked to it. See the multiroom.link.uuidOverride.bySession.deviceType.list feature logics.

multiroom.link.uuidOverride.bySession.replacesUuid.notification.sendReboot.do, boolean

Default value: true

Flag to sent the SmartTUBE End-user Device API notification commandName=Reboot (for device/app reboot) to the device whose UUID has been replaced with the UUID of the new device. See the multiroom.link.uuidOverride.bySession.deviceType.list feature logics.

multiroom.unlink.goToPreviousAccount.nonDemo.do, boolean

Default value: true

Flag to return the client device to the previous logged-in “non-demo” account, when unlinking from the current “non-demo” one. If false, the device exits to the login form. “Demo” statuses that cannot be returned to are described in the parameter multiroom.unlink.goToPreviousAccount.nonDemo.disallowedStates. May be used within the multiroom functionality.

multiroom.unlink.goToPreviousAccount.nonDemo.disallowedStates, string

List of the “demo” account statuses the return to which from the “non-demo” account is prohibbited, separated by comma. For example: “TRIALCLOSED, SUSPENDED”. See the multiroom.unlink.goToPreviousAccount.nonDemo.do parameter. May be used within the multiroom functionality.

multiroom.unlink.goToPreviousAccount.demo.do, boolean

Default value: true

Flag to return the client device to the previous logged-in “non-demo” account, when unlinking from the current “demo” one. If false, the device exits to the login form. “Demo” statuses that cannot be returned to are described in the parameter multiroom.unlink.goToPreviousAccount.demo.disallowedStates. May be used within the multiroom functionality.

multiroom.unlink.goToPreviousAccount.demo.disallowedStates, string

List of the “demo” account statuses the return to which from the “demo” account is prohibbited, separated by comma. For example: “TRIALCLOSED, SUSPENDED”. See the multiroom.unlink.goToPreviousAccount.demo.do parameter. May be used within the multiroom functionality.

device.authorize.accountState.suspended.changeTo.active.do, boolean

Default value: true

Flag to change the SUSPENDED status to ACTIVE upon authorization

device.authorize.accountState.suspended.return.active.do, boolean

Default value: false

Flag to respond with the status ACTIVE upon authorization, but leave the SUSPENDED status in the DB.

device.authorize.generateFromTemplate.checkTrialPeriodAlreadyUsed.do, boolean

Default value: true

Flag to check the terminal for the completed trial period when trying to authorize by template

device.authorize.generateFromTemplate.checkTrialPeriodAlreadyUsed.demoAvailable.block.do, boolean

Default value: true

Flag to check the terminal for the completed trial period when trying to authorize by demo template. If true and the trial period has expired, than the demoAvailable=true sign will not be returned to the device.

device.notifications.log.notification.listdevice.notifications.log.notification.list, array[string]

List of notifications to log. For example: [“updateDictionary”, “reloadEpg”, “reloadChannelsModifyTime

device.notifications.log.notification.listdevice.notifications.log.notification.list, array[string]

List of notifications to log. For example: [“updateDictionary”, “reloadEpg”, “reloadChannelsModifyTime”]

device.session.keepalive.save.period.millisec.value, integer

Default value: 10000

Period of resetting keepalive time in Elastic with a special job, in msec.

device.session.keepalive.consider.online.period.sec.value, integer

Default value: 300

Consider a session online, if actions were performed within the specified time period, in sec.

account.state.suspended.change.unsubscribeAllServices.do, boolean

Default value: false

Flag to unsubscribe the service account from all services when the status changes to SUSPENDED (without reporting to OSS/BSS)

account.state.suspended.change.toActive.subscribeUnsubscribedDefaultActiveServices.do, boolean

Default value: false

Flag to subscribe the service account to default services when the status changes from SUSPENDED to ACTIVE

account.state.suspended.listServices.returnEmpty.do, boolean

Default value: false

Flag to respond with an empty list to the services/list request if the service account has the SUSPENDED status

userfeed.aliasMetaContent.elements.cached.count, integer

Default value: 100

Default number of meta content units requested by end-user devices for search aliases and cached on the SmartTUBE Cache server. The response to the device is filtered according to the subscriber’s settings. Thus, the max number of units in the rail in the SmartTUBE app ⩽ max number of cached units. It is used when there is an increased load on the data server for alias-requests.

userfeed.aliasMetaContent.elements.cached.max.count, integer

Default value: 500

Max value that can be entered in the field SmartTUBE Admin Console > Content > Search aliases > Content > Units to be cached

userfeed.aliasEpg.elements.cached.count, integer

Default value: 100

Default number of EPG units (programs) requested by end-user devices for search aliases and cached on the SmartTUBE Cache server. The response to the device is filtered according to the subscriber’s settings. Thus, the max number of units in the rail in the SmartTUBE app ⩽ max number of cached units. It is used when there is an increased load on the data server for alias-requests.

userfeed.aliasEpg.elements.cached.max.count, integer

Default value: 500

Max value that can be entered in the field SmartTUBE Admin Console > Content > Search aliases > EPG > Units to be cached

userfeed.aliasEpg.toDate.limit.hours, integer

If no date filters are configured on EPG aliases, SmartTUBE SDP will pass to devices all past programs up to userfeed.aliasEpg.toDate.limit.hours hours.

userfeed.aliasEpg.sort.value, string

Default value: sdate desc

Default sort order for a rail, if no sorts is applied to it in the SmartTUBE Admin Console > Content > Search aliases > EPG > [some alias] > Sort parameters section.

npvr.add.delta.decMin, integer

The number of minutes that is subtracted from the start of the TV program specified in the EPG when the TV program is scheduled to nPVR recording.

npvr.add.delta.incMin, integer 

The number of minutes that is added to the end of the TV program specified in the EPG when the TV program is scheduled to nPVR recording.

npvr.create.dataServer.httpClient.single.use, boolean

Default value: false

Flag to use override the system HTTP connection timeout (http-client-connection-timeout-millis) and socket timeout (http-client-socket-timeout-millis) with npvr.create.dataServer.httpClient.single.connectionTimeoutMillis and npvr.create.dataServer.httpClient.single.soTimeoutMillis respectively for the npvr/create method of the SmartTUBE End-User Device API.

npvr.create.dataServer.httpClient.single.connectionTimeoutMillis,integer

Default value: 500

HTTP client connection timeout for the npvr/create method of the SmartTUBE End-User Device API, in ms.

npvr.create.dataServer.httpClient.single.soTimeoutMillis,integer

Default value: 5000

HTTP client socket timeout for the npvr/create method of the SmartTUBE End-User Device API, in ms.

npvr.schedule.create.epgId.online.record.do, boolean

Default value: true

For the interval nPVR recording. Flag to record the first program (interval), if an end-user device passed to the SmartTUBE server the epgId parameter with the npvr/createSchedule method.

npvr.schedule.create.epgId.online.record.devices.notifyAll.do, boolean

Default value: false

For the interval nPVR recording. Flag to send the reloadNpvrListRecordInterval notification to all devices in the multiroom group, including the current one (from which the the npvr/createSchedule request was sent). The default value is false, so this notification is sent to other devices in the group. The current device is received the list of recorded intervals with the response of the npvr/createSchedule method.

npvr.schedule.create.epgId.online.record.listRecord.return, boolean

Default value: true

For the interval nPVR recording. Flag to return the list of recorded programs (intervals) with the response of the npvr/createSchedule method.

npvr.schedule.listRecordInterval.epgInfo.accessLevel.consider.do, boolean

Default value: true

Flag to filter the npvr/listRecordInterval method’s response by the Access Level bounded to the program (epg.al)

npvr.series.create.epgId.online.record.do, boolean

Default value: true

For the series nPVR recording. Flag to record the first program, if an end-user device passed to the SmartTUBE server the epgId parameter with the npvr/createSeries method.

npvr.series.create.epgId.online.record.devices.notifyAll.do, boolean

Default value: false

For the series nPVR recording. Flag to send the reloadNpvrList notification to all devices in the multiroom group, including the current one (from which the the npvr/createSeries request was sent). The default value is false, so this notification is sent to other devices in the group. The current device is received the list of recorded intervals with the response of the npvr/createSeries method.

npvr.series.create.epgId.online.record.listRecord.return, boolean

Default value: true

For the series nPVR recording. Flag to return the list of recorded programs with the response of the npvr/createSeries method.

npvr.public.accountNumber, string

Default value: ACCOUNT_FOR_PUBLIC_NPVR

Number of the service account (san) used to initiate the recording of TV programs within the ‘Time Shift as VoD‘ feature.

recordseries.job.record.newEpisodesOnly.do, boolean

Default value: true

Flag to record only new episodes, i.e. record the same episode of a TV show only once if it has aired more than once (regardless of the /api/v1/npvr/createSeries request with the newEpisodesOnly=true argument from the end-user device).

recordseries.job.record.newEpisodesOnly.useAccountSettings.do, boolean

Default value: false

Flag to record only new episodes (i.e. record the same episode of a TV show only once if it has aired more than once), when the end-user device requests the /api/v1/npvr/createSeries method with the newEpisodesOnly=true argument set.

recordseries.job.record.newEpisodesOnly.byEpisodeNumber.do, boolean

Default value: true

Flag to record new episodes of TV shows, fetching them by season and episode number.

recordseries.job.skipSameEpisode.byFirstShowingFlag.do, boolean

Default value: false

Flag to record new episodes of TV shows, fetching them by the first_showing tag in the imported EPG file (the SmartLabs EPG XML format is supported only).

cache.http.options.cors.accessControlAllowHeaders.set, string

Default value: “X-Requested-With, Content-Type, Cookie, Accept-Encoding, Accept, Accept-Language, Connection, Host, Origin, Referer, User-Agent, X-Smartlabs-Request-ID, Authorization, jwt, Range, SoapAction, If-Modified-Since, If-None-Match”

A list of hiders to be passed by the SmartTUBE App for Web to the backend

cache.http.options.cors.accessControlExposeHeaders.add, string

A list of additional hiders to be passed by the SmartTUBE App for Web to the backend

epg.logoForStream.urlForVideoServer.value, string

URL prefix (HTTP or HTTPS) of the additional logo overlaid on top of the stream. The full URL is obtained by concatenation of the prefix and relative part taken when importing the EPG.

epg.list.fetchPublicNpvr.enabled, boolean

Flag to enable responding with recorded Public nPVR (Time Shift as VoD) programs to requests from devices.

oss.use, boolean

Flag to send SmartTUBE OSS/BSS API requests to the OSS/BSS.

oss.methods.activate.send, boolean

Flag to send the SmartTUBE OSS/BSS API request activate_uid to the OSS/BSS.

oss.methods.account.deactivate.send, boolean

Flag to send the SmartTUBE OSS/BSS API request deactivate_uid to the OSS/BSS.

oss.methods.purchase.send, boolean

Flag to send the SmartTUBE OSS/BSS API requests purchase, prepare_purchase, confirm_purchase to the OSS/BSS.

oss.methods.subscribe.send, boolean

Flag to send the SmartTUBE OSS/BSS API requests subscribe, prepare_subscribe, confirm_subscribe to the OSS/BSS.

oss.methods.authorize.send, boolean

Flag to send the SmartTUBE OSS/BSS API request authorize_uid to the OSS/BSS.

channels.list.serverType.default.value, string

Default value for the server type intended for the live streams (the serverType property of the channels/list method response of the SmartTUBE End-User device API)

channels.list.dvrServerType.default.value, string

Default value for the server type intended for the DVR streams (the dvrServerType property of the channels/list method response of the SmartTUBE End-User device API)

npvr.serverType.default.value, string

Default value for the server type intended for the nPVR streams (the serverType property of the npvr/list method response of the SmartTUBE End-User device API)

profile.watchingLimit.inMemory.removeUnused.job.run.period.sec, integer

Default value: 86400

Period of relaunch of the internal SDP job responsible for resetting content watching limits on kids profiles

profile.watchingLimit.inMemory.removeUnused.sec, integer

Default value: 86400

Amount of time (in seconds) of absence of content watching limit update on kids profile, after which the limit should be reset by internal SDP job. See also the parameter profile.watchingLimit.inMemory.removeUnused.job.run.period.sec 

Change Log

SmartTUBE SDP 9.2

  • New parameters profile.watchingLimit.inMemory.removeUnused.job.run.period.sec, profile.watchingLimit.inMemory.removeUnused.sec supported.

SmartTUBE SDP 9.1

  • New parameters multiroom.link.uuidOverride.bySession.replacesUuid.dropSession.do, multiroom.link.uuidOverride.bySession.replacesUuid.notification.sendReboot.do, device.session.keepalive.save.period.millisec.value, device.session.keepalive.consider.online.period.sec.value, epg.list.fetchPublicNpvr.enabled, channels.list.serverType.default.value, channels.list.dvrServerType.default.value, npvr.serverType.default.value supported

SmartTUBE SDP 8.4

  • New parameters npvr.public.accountNumber, epg.list.fetchPublicNpvr.enabled supported

SmartTUBE SDP 8.2

  • New parameters userfeed.aliasEpg.toDate.limit.hours, userfeed.aliasEpg.elements.cached.count, userfeed.aliasEpg.elements.cached.max.count, userfeed.aliasEpg.sort.value, npvr.create.dataServer.httpClient.single.use, npvr.create.dataServer.httpClient.single.connectionTimeoutMillis, npvr.create.dataServer.httpClient.single.soTimeoutMillis,recordseries.job.record.newEpisodesOnly.do, recordseries.job.record.newEpisodesOnly.useAccountSettings.do, recordseries.job.record.newEpisodesOnly.byEpisodeNumber.do, recordseries.job.skipSameEpisode.byFirstShowingFlag.do

Components Container

The container.conf file contains settings of the Components Container (CC) of the SmartTUBE server.  

Default Configuration

component-container = {

   logback.use = true

   check-dependences = true

   cli-enabled = false

   container-name = “CC on HOST”

   control-port = 4440

   log-file-path = “/var/log/smartlabs/smarttube5/”

   log-level = INFO

   pause-before-notify-tomcat-runned = 5000

   stop-on-component-error = false

   tomcat-attributes {

       keepAliveTimeout = 10

       maxConnections = 10000

       maxThreads = 20

       port = 8084

       protocol = “org.apache.coyote.http11.Http11NioProtocol”

   }

   web-interface-enabled = true

}

Parameter Description

component-container, {object}

Core section of settings

check-dependences

Flag to check the versions of jar libraries when starting the component

logback.use

Flag to use the Logback logging. The logging configuration is specified in the /conf/logback.xml file.

container-name

Name of the components container (CC) that is used to create the logger name for debugging (by default the name of the host is used, where CC is deployed)

cli-enabled

Managing the CC in a command line or by sending ccadmin utility commands over the socket.

If you install the container as a Linux daemon, this parameter must be set to false.

control-port

The port for managing the CC; commands from the ccadmin utility are accepted at this port. By default the value is 4440

log-file-path

Log file directory with the file SmartSDPCompContainer.log

log-level

Minimum level of detail for the log

log-delete-timeout-days

Timeout for deleting logs, in days. If not specified, the default is 30.

check-dependencies

Indicator of the requirement to check when loading the component of libraries JAR files versions: true | false

web-interface-enabled

Indicator of the web interface permission through built-in Apache Tomcat servlet container: true | false

If web-interface-enabled equals true, Apache Tomcat servlet container is going to launch, which is going to create Contaner_Install_Directory/work directory for its operation. This requires that the launcher has the respective rights.

stop-on-component-error

Indicator of the requirement to stop if an error occurs when creating / initializing / launching components. If it equals false, the specified errors are ignored (but recorded in the log).

pause-before-notify-tomcat-runned

Pause after which the components are notified on the successful launch of Tomcat, in ms.

tomcat-attributes, {object}

Tomcat server settings

keepAliveTimeout

Keep-alive timeout for connections to the integrated Apache Tomcat

port

Port number for the integrated Apache Tomcat

maxConnections

Maximum number of connections for integrated Apache Tomcat

maxThreads

Maximum number of streams served for integrated Apache Tomcat

protocol

The connector protocol used

connectionTimeout

Timeout of Apache Tomcat connection

socket-soKeepAlive

Value of the keep-alive socket setting (Apache Tomcat): true/false

remote-logging-server, {object}

Remote logging server settings

host

Host, where the remote log server is deployed

port

Port of the remote log server. To disable remote logging, delete the remote-logging-server section

Cache Server

The cache-server.conf file contains the configuration settings for the SmartTUBE Cache server.

Default Configuration

component = {

   class = “smartsdp.cacheserver.main.SmartSDPCacheServer”

   description = “SmartTUBE Cache Server”

   install-path = “/opt/smartlabs/smarttube5/modules/cache-server”

   jar =”sdp-cache-server.jar”

   load-on-startup = 12

   properties {

       akka-local {

           host = “127.0.0.1”

           port = 5060

       }

       cache-server-id = “demo-helpdesk”

       elasticsearch {

           auth.password = “sfgsfrsvq3ds”

           auth.username = “lapopumpo”

           cluster-name = “smtube_cache_client”

           connectTimeoutMillisec = 1000

           lang-analyzer-char-filters = [

               “Á => A”,”á => a”,

               “Č => C”,”č => c”,

               “Ć => C”,”ć => c”,

               “Đ => D”,”đ => d”,

               “Ď => D”,”ď => d”,

               “É => E”,”é => e”,

               “Ě => E”,”ě => e”,

               “Ё => Е”,”ё => е”,

               “Í => I”,”í => i”,

               “Ň => N”,”ň => n”,

               “Ó => O”,”ó => o”,

               “Ř => R”,”ř => r”,

               “Š => S”,”š => s”,

               “Ť => T”,”ť => t”,

               “Ú => U”,”ú => u”,

               “Ů => U”,”ů => u”,

               “Ý => Y”,”ý => y”,

               “Ž => Z”,”ž => z”

           ]

           lang-analyzer-stopwords = [

               _english_,

               _russian_,

               _czech_

           ]

           nodes = [

               “127.0.0.1:9200”

           ]

           socketTimeoutMillisec = 30000

       }

       http-client-connection-timeout-millis = 500

       http-client-socket-timeout-millis = 5000

       http-requests-dispatch-batch-size = 100

       http-requests-dispatch-period = 0

       number-of-http-get-handlers = 500

       number-of-http-post-handlers = 10

       number-of-notification-handlers = 100

       recreate-indices-on-startup = false

       request-inprogress-size-threshold = 256

       request-queue-size-threshold = 100

       trace-http-requests = true

       trace-notification = false

   }

   servlet-context-path = “/api/*;/cmds/*”

   singleton = true

}

Parameters description

component, {object}

Core section of settings. A number of settings are described in the “Common parameters” chapter.

properties, {object}

cache.thread.pool.http.workers.corePoolSize, integer

Initial HTTP thread pool size

cache-server-id

ID of the current cache server. Must match the cache server Name in the SmartTUBE Admin Console > Administration > Cache servers dictionary.

recreate-indices-on-startup

Indicator of the requirement to recreate all caches when reloading the component

epg-import.minusDays

EPG storage depth in days

elasticsearch, {object}

Settings of the Elasticsearch

auth.password

Authentication password

auth.username

Authentication username

cluster-name

Name of Elasticsearch server cluster. Must be unique for the local network.

nodes, [array]

Elasticsearch servers, combined into a cluster.

connectTimeoutMillisec

Connection timeout, in ms.

socketTimeoutMillisec

Socket timeout, in ms.

lang-analyzer-char-filters

List of characters to be replaced in the query text during search and analysis. Each letter must be defined by a pair of uppercase and lowercase characters. If the setting is omitted, the default value is [“ё => е”, “Ё => E”]

lang-analyzer-stopwords

List of languages for which a general list of stop words is formed. These words are excluded from the query text during search and analysis. If the setting is omitted, the default value is [“english”]. Reserved language names and stop words see here.

Data Model Core

The data-model-core.conf file contains the configuration setting for the Data Model Core component of the SmartTUBE server.

Default Configuration

component = {

   description = “Core Data Model”

   jar = “sdp-datamodel-core.jar”

   class = “smartsdp.datamodelcore.main.SmartSDPDataModelCore”

   singleton = true

   load-on-startup = 1

   install-path = “/opt/smartlabs/smarttube5/modules/data-core”

}

For parameter description see the “Common parameters” chapter.

This component does not require any special settings.

Reporting Module

The report.conf file contains the configuration settings for the SmartTUBE reporting module.

Default Configuration

component = {

   class = “smartsdp.report.main.SmartSDPReport”

   description = “SDP Report”

   install-path = “/opt/smartlabs/smarttube5/modules/reports”

   jar = “sdp-report.jar”

   load-on-startup = 14

   number-of-http-get-handlers = 20

   properties {

       akka-local {

           host = “127.0.0.1”

           port = 5054

       }

       datasources = [

           {

               connection-string = “JDBC_POSTGRES_URL”

               ds-name = “jdbc/sdp”

               login = report_user

               max-connections = 5

               password = report_password

               server = postgresql

           }

       ]

   }

   servlet-context-path = “/report/*”

   singleton = true

}

Parameter Description

component, {object}

Core section of settings. A number of settings are described in the “Common parameters” chapter.

datasources, {object}

Settings of the DBMS used as a data source for the reporting service

server

Type of the database server

connection-string

Connection string to the DB server

login

Login of the DB user

password

Password of the DB user

max-connections

Max number of connections to the DB

SmartTUBE JSON Data Server

The data-server.conf file contains the configuration settings for the SmartTUBE JSON Data Server.

Default Configuration

component ={

   class =”smartsdp.dataserver.main.SmartSDPDataServer”

   description =”SmartTUBE JSON Data Server”

   install-path =”/opt/smartlabs/smarttube5/modules/data-server”

   jar =”sdp-data-server.jar”

   load-on-startup =10

   properties {

       akka-local {

           host =”127.0.0.1″

           port =5050

       }

       database {

           connection-string =”jdbc:postgresql://127.0.0.1:5432/master?tcpKeepAlive=true&ApplicationName=sdp5_application”

           login = master

           max-connections =50

           password = master38

           server = postgresql

       }

       http-request-handlers =2000

       log-generated-sql =false

       logValidationErrors =true

       messaging {

           watermark {

               default_autohide_timeout =3600

           }

       }

       notifications {

           database-path =”/var/smartlabs/smarttube5/data-server/db”

           database-type = mem

           receptionists =[

               “127.0.0.1:5060”

           ]

       }

       removeAbandoned =true

       sdp-properties-file-path =”/opt/smartlabs/smarttube5/conf/”

       trace-http-requests =true

   }

   servlet-context-path =”/sdpapi/*;/sdpapibd/*”

   singleton =true

}

Parameter Description

component, {object}

Core section of settings. A number of settings are described in the “Common parameters” chapter.

sdp.thread.pool.http.workers.corePoolSize, integer

Initial HTTP thread pool size

properties, {object}

http-request-handlers

Number of the HTTP request processors

trace-http-requests

Flag to trace HTTP requests in the log

database, {object}

server

Type of database server

connection-string

Database server connection string

login

Database user login

password

Database user password

max-connections

Maximum number of connections to the database

messaging, {object}

watermark, {object}

Settings of Watermark messages

default_autohide_timeout, integer

Default duration of watermark message display

notifications, {object}

database-path

Path to the database notifications folder

database-type

Type of the database

scheduled-jobs, {object}

JSON array of objects describing jobs that are run periodically

name

Job name

enabled

Flag enabling to run this job

runWhen, string

Time / period of running the job. Please see the format description here.

method, string

Name of the service and method to run in “service#method” format.

params

Parameters passed to the methods during the launch. For example:

for EPG import from the file:

  • epg-import.url — URL of a file with EPG
  • epg-import.login — login to access the EPG file
  • epg-import.password — password to access the EPG file

for importing a weather forecast from an external system:

  • appid — identifier of the application from which the forecast is going to be imported

cryptPasswords, object

Settings of terminal password encryption

on, boolean

Flag to enable terminal password encryption. If , all data passed via SmartTUBE OSS API or SmartTUBE End-User Device API is encrypted/decrypted.

storeUnhashed, boolean

Flag to store unencrypted passwords along with encrypted ones

checkUncrypted, boolean

Flag to check the unencrypted password if the encrypted password verification failed

defaultHashMethod, string

Default encryption method. Accepted values: .

SmartTUBE Device Manager JSON Data Server

The manager-data-server.conf file contains the configuration settings for the SmartTUBE Device Manager JSON Data Server.

Default Configuration

component = {

   description = “SmartTUBE Device Manager JSON Data Server”

   jar = “manager-data-server.jar”

   # class = “smartmanager.dataserver.main.SmartManagerDataServer”

   singleton = true

   load-on-startup = 10

   servlet-context-path = “/managerapi/*;/managerapibd/*”

   install-path = “/smartlabs/sdp/api/SmartSDP/SmartManagerDataServer/target”

   properties = {

       firmwareManagement = {

           uploadPathFirmwares = “/tmp/smartlabs/firmwares/”

           uploadPathAndroidApps = “/tmp/smartlabs/android-apps/”

           uploadPathSettings = “/tmp/smartlabs/manager/settings/”

           httpBaseRoot = “http://some.server:12345/some/path/”

           httpBaseAndroidRoot = “http://some.android.server:12345/some/path/”

           httpBaseSettingsRoot = “http://some.android.server:12345/some/path/”

           maxIncrementChainLength = 3

           fileStoragePath = “/tmp/smartlabs/manager/filestorage”

           fileStorageRoot = “http://someurl/”

       }

       multicast = {

           enabled = true

           normServerUrl = “http://qtbuild01:8180/”

           normServerBaseRoot = “/home/norm/”

       }

       server = {

           clearUidCacheTimout = 10

       }

       databases = {

           default = {

               server = “postgresql”

               connection-string = “jdbc:postgresql://10.65.50.71:5433/master”

               login = “vandam”

               password = “vandam”

               max-connections = 10

               max-wait = 100000

           }

           RO = {

               server = “postgresql”

               connection-string = “jdbc:postgresql://10.65.50.71:5433/master”

               login = “bamboleo”

               password = “bamboleo”

               max-connections = 10

               max-wait = 100000

           }

       }

       sdpProxy = {

           enabled = true

       }

   }

}

Parameter description

component, {object}

Core section of settings. A number of settings are described in the “Common parameters” chapter.

firmwareManagement, {object}

Configuration of the storage and the paths by which files are returned from the storage

uploadPathFirmwares, string

Local directory for storing firmware files

uploadPathAndroidApps , string

Local directory for storing Android apps

uploadPathSettings, string

Local directory for storing configuration files

httpBaseRoot, string

URL prefix for getting firmware files

httpBaseAndroidRoot, string

URL prefix for getting Android apps

httpBaseSettingsRoot, string

URL prefix for getting configuration files

maxIncrementChainLength, integer

Maximum number of incremental updates between target and source firmware versions. If this number is exceeded, the entire firmware is updated. If less than or equal and incremental updates are available, an incremental update is performed.

fileStoragePath, string

Local directory where the files managed by the file manager are located

fileStorageRoot, string

URL prefix for getting files from the file storage

multicast, {object}

Settings for the multicast firmware broadcasting (for the Linux-based SmartLabs STBs only)

enabled, boolean

Flag to enable the multicast firmware broadcasting: true — enabled; false — disabled.

normServerUrl, string

URL of the utility that manages the norm-server

normServerBaseRoot, string

Local path with the firmwares broadcasted by the norm-server

server, {object}

Server settings

clearUidCacheTimout, integer

Timer for clearing the cache of devices in staging groups, in seconds.

databases, {object}  

Setting for the DB access pools

default, {object}  

Settings for the first (default) DB access pool. Read-write operations are permitted. Used by the admin console.

server, string 

Type of the DB server

connection-string, string 

DB server connection string

login, string 

DB user login

password, string 

DB user password

max-connections, integer 

Maximum number of connections to the DB

RO, {object}  

Settings for the second DB access pool. Write operations are permitted only. Used for requests from end-user devices. Settings set is equal to the default section above.

sdpProxy, {object}  

Settings for proxy to the SmartTUBE SDP. The first versions of the Device Manager worked autonomously (login was local). Now the Device Manager only works with the SmartTUBE SDP.

enabled, boolean

Flag to enable the proxy to the SmartTUBE SDP. URL of the SmartTUBE SDP server is set in the system.conf file in sdp-dataservers property.

Messaging Configuring

The SmartTUBE is able to send Information Messages and Event-driven Notifications to the end-user devices using Long Polling or Push methods. From the user side, they differ in that Push notifications can be displayed on the device regardless of whether the SmartTUBE app is running or not. The Long Polling method displays messages only when the SmartTUBE application is open.

How the Long Polling Notifications Work

  1. The SmartTUBE front-end server and the app support a special set of notification commands (including commands for displaying the Simple and Watermark messages)
  2. The SmartTUBE app maintains a permanent session with the front-end server on which Long Polling is configured and subscribes to notifications (using the SmartTUBE End-User Device API method notifications/subscribe).
  3. When you submit the message sending in the SmartTUBE Admin Console > Messages menu, the SmartTUBE SDP server generates a notification to the Long Polling server in the following format: http[s]://[long_polling_server_host]:[port]/api/v1/notifications/notify?notification=command?uuid=[device_UID]&[notification_string]
  4. The Long Polling server passes the notification to the SmartTUBE apps subscribed to this notification.
  5. Upon the notification receipt, the SmartTUBE app displays the message text on a screen.
  6. Devices that were offline when the message sending occurred receive actual messages at startup using the messages/list method.

Configuring the Long Polling Notifications

Typically, the Long Polling technique is used by default and available to the SmartTUBE operator out of the box.

How the Push Notifications Work

The implementation of Push notifications for Android and iOS platforms is illustrated below:

Image1

Image2

Configuring the Push Notifications

To enable the Push notifications:

  1. Add the following settings to the configuration file /opt/smartlabs/smarttube5/conf/data-server.conf on the SmartTUBE data-server, adapting them to your case:

component ={

   properties {

       # PUSH notification settings for Apple devices

       applePush = {
           use = true # Flag to use the PUSH notifications for Apple devices. Default – false.
           productionMode = true # True – use the Production APNS mode; false – use the Sandbox APNS mode. Default – true.
           appIdCommon = “some.app.ID” # App ID, Bundle ID for all devices. Default – null.
           connectionUseProxy = false # Flag to use a proxy. Default – false.
           connectionProxyHost = “192.168.0.1” # Proxy host
           connectionProxyPort = 111 # Proxy port
           # Token-based connection (XOR) – by default
           tokenFilePath = “./notification/apns/token/auth_key.p8” # Authentication token signing key (text file)
           tokenTeamId = “ISS” # ISS
           tokenKeyId = “KID” # KID
           tokenAppIdSeparate = false # Flag to use separate app ID for iPhones and iPads. If true, must be filled any or both tokenAppIdIphone/tokenAppIdIpad. Default – false.
           tokenAppIdIphone = “tv.test.smartlabs.Lime.Iphone” # App ID, Bundle ID for iPhones
           tokenAppIdIpad = “tv.test.smartlabs.Lime.Ipad” # App ID, Bundle ID for iPads
           # Certificate-based connection (XOR)
           certificateUse = false # Flag to use the certificate-based connection. Default – false.
           certificateFilePath = “./notification/apns/cert/push_service.p12” # Password protected PKCS#12 file
           certificatePassword = “XYZ-PASS” # Password for the PKCS#12 file
       }
       # PUSH notification settings for Android devices
       androidPush = {
           use = true # Flag to use the PUSH notifications for Android devices. Default – false.
           serviceAccountFilePath = “~./notification/fcm/service-account-file.json” # Firebase service account JSON file
       }
   }
}

  1. SmartTUBE apps, when launched, download a configuration file from the SmartTUBE cache-server containing settings common to all subscribers of the operator. So you need to add the following parameter to the configuration file /opt/smartlabs/nginx/html/srv-pub/networkConfig/config.cfg of the SmartTUBE cache-server:

pushNotificationsEnabled = true // Flag to enable the Push notifications for the Simple and Event-driven notifications by default

Another option is to add this parameter to the setup.json file for specific devices using the SmartTUBE Device Manager.

  1. Please also check with a SmartLabs representative if the version of your SmartTUBE apps support Push notifications.

Principles

This part describes how some complex SmartTUBE functions work, such as EPG caching, content recommendation engine, ad skip ban feature, and others.

How Device Type is Defined

Interaction between end-user devices and SmartTUBE SDP is implemented by using the SmartTUBE End-User Device API. And the type of user device plays an important role in this interaction. By invoking any API method, the devices pass their type to the platform via the following two parameters:

  • deviceType (STB, ANDROID, IPAD, WEB, SMARTTVSAMSUNG, etc.) — the main device attribute used to identify the device class. deviceType is used to filter the composition of services in a tariff plan, the selection of a channel stream URL, etc.
  • stbType — a device model name from Android API.

Depending on the platform, the device type is defined as described below.

Operator’s Devices

The operator devices (STBs) return the values of the deviceType parameter according to the following rules:

  • If the app’s config file has the non-empty androidDeviceType property in the [Server] section of setup.json configuration file, then the device returns its value;
  • If the app’s config file has the supportDeviceTypeChange property in the [UI] section
  • as true, then the Device Type option with the following values is available for users in the app’s Settings menu:
  • IPTV (default) — returns STB;
  • OTT — returns OTTSTB.
  • as false, then the device returns STB.

3rd-party Devices

The SmartTUBE app can also run on Smart TVs, mobile devices and in web browsers. In this case, the following rules are applied to determine the deviceType value:

  • If the app’s config file has the useUHDDeviceType property in the [UI] section, then the My service option with the following values is available for users in the app’s Settings menu:
    • Multi-Screen TV — returns ANDROIDTVUHD. Can be overridden using the androidUHDDeviceType property in the [Server] section.
    • Multi-Screen Lite — returns ANDROIDTV.

The app tries to detect UHD support for the device when it first starts up and sets Multi-Screen TV as the default setting.

Ad Skip Ban. Principles

SmartTUBE offers a feature that allows you to control and restrict subscribers from skipping ads while watching or fast-forwarding TSTV/Pause Live/nPVR content. This article shedding light on the under-the-hood logic — from the import of start/end marks of ad blocks to the application of feature settings within the SmartTUBE apps.

Detailed instructions on configuring this feature can be found in the “Ad Skip Ban. Configuring” article.

Processing Logic

The feature relies on ad timestamps provided by a third-party program provider. The data undergoes processing through the following sequence of SmartLabs platform components:

Image1
  1. The program provider publishes on his FTP server the CSV files with the start/end marks of ad blocks for each channel for the current day. CSV files must be located in symlinks with names equal to the External ID of the channel in the SmartTUBE database (see the field SmartTUBE Admin Console > Channels > Channels > [channel details] > External ID). The name of the CSV files can be arbitrary — only the newest files in the symlinks are downloaded.Example of file format with 3 marks:

RB1;14:01:17;14:09:46

RB2;14:40:42;14:48:55

RB3;15:19:05;15:32:49

where

    • RBx: ID of the ad block
    • First timestamp: Start of the ad block (UTC)
    • Second timestamp: End of the ad block (UTC)
  1. Files are collected from the server at specified intervals using a job configured on the SmartTUBE SDP side.
  2. Ads data is written to DB.
  3. SmartMEDIA server retrieves ads data from DB and adds it into the channel metadata file (metadata.json).
  4. The SmartTUBE app, when initiating playback of TSTV/Pause Live/nPVR content, requests a metadata file (typical URI: http[s]://mfe_host/protocol_name/channel_ID/metadata.json) and implements the following logic:
    • Prohibition of ad skipping during stream watching or fast-forwarding.
    • Enable/disable ad processing for specified channels.
    • Displaying the timer indicating the remaining seconds during ad playback in the full-screen player.
    • Displaying notifications about the inability to skip ads in the full-screen player.
    • Disabling the “Ad Skip Ban” feature:
    • For 5 minutes or less before the Live broadcast.
    • For N minutes after each ad block.
    • During backwinding.
    • For test accounts.

Depending on your business objectives and content broadcasting conditions, you can propose changes to this logic. The SmartLabs Development Team is open to discussion and aims to meet your specific requirements.

How the Playback Buffer Size is Determined

What is a Playback Buffer?

First of all, let’s understand what video streaming is. When you want to watch a movie stored on your computer’s hard drive, the player opens its file and plays it instantly. In the case of video streaming, the movie file is stored on a remote server and must first be downloaded to your device’s local storage. Only then will the device be able to start playing it back. What happens if the movie is stored on the server as a single file? You’ll have to wait a good while for the movie to start. That’s why in streaming large video files are divided into small chunks of a few seconds, recorded as separate files, and players request and download them sequentially from a video server. In this way you can start playback by downloading only the first segment of the movie. Information about the chunks (their URLs, duration, binding to real time, etc.) is stored in the manifest, a special file that is downloaded by the player when the video is opened.

This approach also solves the problem of live TV broadcasting. The studios continuously record the footage in small chunks and then stream them to the IPTV/OTT operator’s video servers. The video server then re-saves these streams into chunks whose length is adapted for playback on end-user devices. The devices download these chunks to the local storage, in a buffer. The number of chunks to be stored in a buffer is always limited. In this way, fresh chunks are continuously written to this buffer and already played chunks are deleted.

If the max buffer size is set too small, the player may not have time to load the next chunk before it finishes playing the current one (due to insufficient network speed, for example). In this case playback will stop until the next chunk is loaded. If the device does not have enough free memory, and the buffer is too large, the application may crash when it is close to full or other negative effects may occur.

How the Buffer Size is Determined

The max buffer size is calculated taking into account many parameters: stream bitrate, network speed, available free memory, stream type (Live or DVR), protocol (HLS or MPEG-DASH), and chunk size.

Media players of the SmartTUBE applications are configured to load as many chunks into the buffer so that they are sufficient for stable stream playback. Under normal conditions, 15–20 seconds of content in the buffer is enough. Frequent drops in network speed for more than 15–20 seconds are not normal and in this case the subscriber or IPTV/OTT operator should solve the network connection problem.

In case of live TV broadcasting, the buffer volume used (i.e. how much content is currently available for playback on the device) depends directly on the player’s parameter offset. Depending on the device type, the logic of a player used, type of a stream (HLS/DASH) and its manifest, this parameter defines the offset of the playhead from the end of the manifest when playback starts. For example, the player may set the offset to 10 seconds. However, it can start a stream with only 2.5 seconds of content in the buffer.

In order to protect low-memory Android devices from playback problems and application stability, especially when playing nDVR and VoD, the maximum buffer size is additionally limited to 70% of the Java Heap Limit. This way, operators can be calm for the trouble-free app performance on various devices in any playback modes.

EPG Delivery and Caching

This topic describes the EPG (Electronic Program Guide) processing from import to the SmartTUBE database to delivery to client devices, EPG caching levels, and managing caching parameters.

Levels of Caching

The source EPG data is provided by third-party systems as a single XML file containing information for all channels. The file format supported by SmartTUBE is described in the chapter “EPG file format“.

Multi-level caching is used to reduce the load on various nodes of the broadcast platform and speed up EPG data processing. The purpose of each level in the EPG processing chain (in order from highest to lowest) is described below.

Image3

EPG storing and caching levels

SmartTUBE SDP Server

SmartTUBE SDP server imports the EPG file automatically at the frequency defined by the corresponding job in the SmartTUBE Admin Console (usually 1 hour or more). Thus, the SmartTUBE SDP database contains the most up-to-date information about the program guide in the system. Creating and configuring an EPG import job is described here.

The SmartTUBE Admin Console also allows to edit EPG for each channel manually — in the Channels > EPG menu.

When importing XML, all manual changes will be overwritten by the imported data (if the XML contains data about the changed TV programs). For this reason, manual EPG editing is mainly used for test purposes.

The SmartTUBE SDP server controls the caching settings of HTTP servers (Nginx) and client devices (see the “Managing the EPG Cache Validity Timeout” chapter).

SmartTUBE Cache Servers

Direct interaction between the SmartTUBE SDP server and client devices is performed by SmartTUBE Cache servers. Each Cache server performs all the main server functions, including storing and providing EPG data. This data is updated from SmartTUBE SDP Server as soon as the import process is complete or manual changes in SmartTUBE Admin Console are made (typically within 1 minute).

To improve fault tolerance, the task to update EPG on Cache servers is usually performed at night. This task is created in the SmartTUBE Admin Console > Administration > Scheduled jobs using the method “Reload cache data (cacheoperations#reload)” with the parameter caches=”Epg”.

The SmartTUBE Cache server caches in the memory the response to the channels/getLastUpdate request.

Nginx Cache

In addition, to accelerate the response and allow to use CDN to store EPG data, each HTTP server (Nginx) uses a cache option to store this data as static content.

Nginx servers cache the response to the EPG request cached/epg/list.

Typically, client devices request EPG per channel per day. Therefore, Nginx stores EPG in the appropriate form — as one static unit per day per channel.

Client Apps Cache

Client apps store EPG data locally, which allows to avoid downloading up-to-date data every time application restarted, exits from standby mode, or restores the network connection. This mechanism allows to reduce the response time of UI.

The local EPG cache is updated in the following cases:

  • At midnight (see the chapter “Next day EPG Download”);
  • When the cache size limit is reached:

For example, if a user downloaded more data than allowed by the configuration while scrolling a program guide, the oldest data is erased from the local cache.

Cache size is specified by the parameter networkDiskCacheSize_<STB model or client type> in the [UI] section of the configuration file /opt/smartlabs/nginx/html/srv-pub/networkConfig/config.cfg (located on the SmartTUBE cache-server). Specified in Mbytes. Example:

[UI]

   networkDiskCacheSize_android = 0

   networkDiskCacheSize_SML-482 = 5

  • By notifications reloadChannelsModifyTime and reloadEpg from the SmartTUBE SDP server.
  • By timeout specified in the SmartTUBE Cache response (in the header Cache-Control: max-age) to the last client request cached/epg/list.

Managing the EPG Cache Validity Timeout

The validity time of EPG data cached on Nginx servers and client devices is limited and managed by the SmartTUBE SDP configuration file system.conf.

  • Nginx cache time management is performed via the X-Accel-Expires header in the SmartTUBE Cache response to the client request cached/epg/list.
  • Validity time of the local EPG cache on the client devices can be managed with the Cache-Control: max-age header in the SmartTUBE Cache response to the client request cached/epg/list.
  • Settings of reloadChannelsModifyTime and reloadEpg notifications define the delay required for the nginx cache to update and the period during which clients should request EPG at a random point in time.

The default system.conf settings are shown below:

# for /v1/cached/epg/

epg.cached.setCacheMaxAge.cacheControl.sec = 2592000 # sets a header Cache-Control: max-age=2592000 (30 days) for the client device, i.e. it is assumed that the client will update the EPG only by notifications or by its own request, when the EPG ends for the current day

epg.cached.setCacheMaxAge.xAccessExpires.sec = 600 # sets a header X-Accel-Expires: 600 (10 minutes) for Nginx (for the /cached/epg/ requests) and SmartTUBE Cache (for the /channels/getLastUpdate request)

# for notifications

epg.update.notification.hold.sec = 600 # Delay added to the Nginx caching interval (epg.cached.setCacheMaxAge.xAccessExpires.sec) before sending the reloadChannelsModifyTime notification

epg.update.notification.delay.sec = 3600 # The period during which clients should request EPG at a random point in time (to avoid the DDOS effect). Passed with the reloadEpg notification

Updating Caches

The logic for updating EPG caches at different levels depends on the events described below.

EPG Update on Re-import

In case of new EPG was re-imported from provider, SmartTUBE SDP server waits for SmartTUBE Cache server DB to update and the Nginx cache to expire (typically set to 20 minutes) and then sends notification reloadChannelsModifyTime to all active clients devices to invalidate their local cache.

To avoid revalidation of all EPG data, client app requests actual list of changes with the channels/getLastUpdate method, and invalidates only EPG which was actually modified.

Then the client app gets the new EPG for invalidated channels (with the cached/epg/list request) for the current date at random moment within a configurable interval (10 minutes by default).

Image1

EPG update on re-import

In case of manual changes via the SmartTUBE Admin Console, the SmartTUBE Cache DB updates immediately after saving the changes (typically within 1 minute). But the reloadEpg notification is sent to the clients 20 minutes after the Notify about new EPG events button is clicked. This notification defines the channels, the EPG of which the client needs to re-download.

Image2

EPG update on manual changes in Admin Console

EPG Download on Client Startup

If the client device does not have valid EPG cache (checked by the channels/getLastUpdate request) on the moment of startup, exit from standby mode, or network connection appearance the device downloads it for the current day and stores in local cache.

Thus, if the device restarted immediately it would not lead to another EPG download.

Image4

EPG update on client startup, exit from standby mode, network connection appearance

Next day EPG Download

To be sure the device always has relevant EPG for the current day, it automatically downloads next day data before midnight (with the cached/epg/list request).

To avoid simultaneous download and DDOS effect this time varies for different devices, so each device downloads it at random time within a configurable period (from 23:00 to 23:59 by default).

EPG Update on Client UI Request

If the subscriber is scrolling through the program guide, the client app requests the EPG page-by-page using the method cached/epg/list until it reaches the EPG storage limit (i.e. receives an empty response). This limit is set on the SmartTUBE SDP server in the system.conf file:

epg-import.days = 7 # EPG storage limit in days after the current date

epg-import.minusDays = 7 # EPG storage limit in days before the current date

Methods and Notifications Used

PUSH notification: reloadChannelsModifyTime

Purpose

Notifies the client application to request a list of EPG modification timestamps for all channels.

Parameters Passed

Parameter

Type

Required?

Description

requestDelay

integer

yes

The period during which the client application must request an EPG at a random time after receiving the notification, in sec.

Notification Example

command?commandType=Control&commandName=reloadChannelsModifyTime&requestDelay=3600

PUSH notification: reloadEpg

Purpose

Notifies the client application to request EPG of the specified channel.

Parameters Passed

Parameter

Type

Required?

Description

Channel

integer

yes

IDs of the channels whose EPG was changed on the last import from the provider, separated by a comma.

day

date

yes

The date on which the EPG should be updated, in the format MM/DD/YYYY.

requestDelay

integer

yes

The period during which the client application must request an EPG at a random time after receiving the notification, in sec.

Notification Example

command?commandType=Control&commandName=reloadEpg&Channel=23648161,23262298&day=04/10/2019&requestDelay=3600

API method: /channels/getLastUpdate

Purpose

The method is called by the client apps and returns the list of all channels available to the subscriber. The client determines the channels for which EPG was changed during the last import using the time parameter in the SmartTUBE Cache response.

Call parameters

Parameter

Type

Required?

Description

lang

String

yes

EPG language

Return value

If executed successfully, the method returns the following data for each channel:

Field

Description

id

Channel ID

time

Timestamp of the last changes in the EPG for the specified channel, in UTC.

Return Example

{

“result”: {

“list”: [

{

“id”: 21885276,

“time”: 1575841318

},

{

“id”: 21885381,

“time”: 1575841297

},

{

“id”: 21885271,

“time”: 1575841693

},

…]

}

}

API method: /cached/epg/list

Purpose

The method is called by the client apps and returns EPG for the channel requested. This method does not require client authorization.

Note: Client apps also use the /epg/list request (not /cached/epg/list) to the SmartTUBE Cache server to search through EPG. This request is not cached by Nginx servers and requires client authorization.

Call parameters

Parameter

Type

Required?

Description

lang

String

yes

EPG language

channelId

Integer

yes

Channel ID. Must contain only one ID per request (for optimal caching on Nginx servers).Note: If you need to pass multiple channel IDs in a single request, use the /epg/list method.

startDate

UTC

yes

Initial timestamp of the EPG requested. In the current implementation, it coincides with the beginning of the day.

stopDate

UTC

yes

Final timestamp of the EPG requested. In the current implementation, it coincides with the end of the day.

from

Integer

no

The number of the initial entry in the requested EPG.

to

Integer

no

The number of the final entry in the requested EPG.

Return value

If executed successfully, the method returns the following data:

Field

Description

id

The identifier of the programme

name

Programme name

dsc

Any additional information

sdate

Beginning of the programme; date and time (UTC time zone)

fdate

End of the programme; date and time (UTC time zone). This time = time of the next programme beginning

chId

The identifier of a TV channel the program is shown at

cRId

Not used

cId

Content identifier

discr

The discriminator: EPG

clogo

Image

al

Age requirements of the program

alSort

Position in the list of age requirements

ir

1 – the programme is recommended; 0 – the programme is not recommended

select

Not used

bundle

If the programme is an episode of a series – name of the series

genre

Programme main genre

imdbR

Content raiting at www.imdb.com

version

Date of the last programme changing in cache. Could be used as a version of the programme for EPG changes monitoring from a subscriber’s device

recSeries

Recording series if true

metaContentSeriesId

Not used

seriesNumber

A unique ID of the series in SmartTUBE database; created automatically. It is used, for example, for nPVR recording of series — to identify which programme belongs to which series.

seasonNumber

Number of the season in the series

seasonSeriesNumber

Number of the episode in the season

firstShowing

Indicates that the episode is being aired for the first time (not a repeat). Optional, if not set, it is assumed to be “false”.

originalAirDate

Original air date (first broadcast, not repeat)

year

Year of the programme release

country

A unique ID of the country in SmartTUBE database; created for it automatically

category

A unique ID of the category in SmartTUBE database; created for it automatically

isLive

Identifies that this is live-program (if 1 – live, if the field is missing in the method’s answer – not live)

isRepeat

Identifies that this is the repeat of the program (if 1 – repeat, if the field is missing in the method’s answer – not repeat)

fs

Identifies that this is the premier (if 1 – premier, if the field is missing in the method’s answer – not premier)

ls

Identifies that this is the last showing of the program (if 1 – last showing, if the field is missing in the method’s answer – not last showing)

isFree

Identifies that this program is free (if 1 – free, if the field is missing in the method’s answer – not free)

oName

Programme name in the original language

eName

Name of the corresponding episode

descLong

Full description; displayed in a subscriber’s UI

actors

Actors

director

Directors

screenplay

Screenplays

operator

Operators

composer

Composers

producer

Producers

leading

Leadings

banner

The banner

genreList

The list of programme’s genres

categoryList

The list of programme’s categories

rubrics

Type of programme

countries

List of countries

sCnt

The quantity of series in the season

isHD

1 – the programme supports HD format 0 – the programme is broadcasted only in SD format

packages

Not used

Section metaContent — The content associated with this programme

id

A unique ID of the metacontent in SmartTUBE database; created automatically

type

The type of the metacontent (video, episode, season, series)

seasonId

A unique ID of the season in SmartTUBE database; created automatically

seriesId

A unique ID of the series in SmartTUBE database; created automatically

SmartTUBE Recommender. Principles

Overview

SmartTUBE Recommender — an integrated SmartTUBE module for automatic generation of VoD content recommendations. The module periodically analyzes subscriber views of content, characteristics of content units (genres, countries, description, etc.) and, optionally, characteristics of subscribers (gender, age, geolocation), and generates new ordered sets of VoD content recommendations for each user and sets of similar movies/series for each of them.

Recommendations are divided into two types:

  • User-based — calculated based on the user profile settings, the user’s viewing preferences and their similarity to other subscribers, and so on. This type of recommendation is only available when SmartCARE is installed.

SmartCARE — software solution for monitoring the quality of a video content delivery and hardware related incidents in IPTV/OTT networks.

  • Context-aware — calculated based on the similarity of movie metadata (description, genres, cast, etc.)

Generated recommendations are displayed in the SmartTUBE app making it more attractive for the subscribers.

Image4

General solution scheme

Recommendations in SmartTUBE Apps

The presentation of recommended content in the SmartTUBE apps is designed in the most organic way possible — users see recommendations exactly where they expect.

The examples below demonstrate UI sections where recommendations can be located.

Image2

User-based recommendations on the Home screen

Image3

Context-aware recommendations on the movie details page

 

Image1

User-based recommendations in the full-screen player

Analyzed Data

The key object of the Recommender’s analysis is the multi-view of a content unit — a movie or a series. The multi-view of a movie is understood as an aggregate of all its views by the subscriber — both full and partial; and multi-view of a series — as an aggregate of views of all its episodes.

The degree of the subscriber’s interest in a movie or series is determined by the Relative viewing duration — the ratio of the actual viewing time to the total duration of the movie, summed up by all its views by the subscriber.

Also each content unit has a set of metadata —  seasons, episodes, descriptions, genres, filmmakers, cast, country of production, etc. This information is used to generate the context-aware recommendations (see below).

Working Principle

The Recommender module is run cyclically, the period depends on the intensity of content viewing (once at night, for example).

In the process, the Recommender interacts with 3 databases:

  • SmartCARE MongoDB — contains client sessions for getting information about new content views, generating and saving new milti-views;
  • SmartTUBE Developer Postgres DB — contains data on past content views (can contain data from several operators) + statistics (number of views, quality of recommendations, and so on);
  • SmartTUBE Production Postgres DB — the operator’s DB storing data on current recommendations and content metadata.

Let’s consider one cycle of the Recommender’s work.

Image5

Algorithms Used

Depending on the size and composition of the subscriber base, the content viewing activity, the VoD catalog size, the content metadata quality, server HW and other conditions, the Recommender uses one or more algorithms for generating Recommendations and Similarities.

Context-Aware Algorithms

If the operator has a large share of subscribers and movies with a small number of views (typical for several thousand subscribers and several thousand movies in the catalog), the system is always close to the “cold start” mode. In such a situation, context-aware algorithms can be used.

Recommended content for each user is selected based on the principle of similarity with the content he has already viewed before. The similarity of two movies is determined by the coincidence of keywords in the description, of the genres, leading actors, countries of production, and so on. In addition, newly published, more popular movies with a recent release year, can gain additional weight when ranking.

The specific current parameters of the algorithm are optimized on historical data.

Matrix Factorization

The Matrix Factorization algorithm used by the Recommender is to represent the interaction matrix “Subscriber – Content Item” of high dimension as a product of two matrices of lower dimension.

The key advantage of this algorithm is the consistently good quality of recommendations with infrequent optimization of its parameters.

Hybrid

The recommended content rank is defined as the weighted sum of Context-Aware and Matrix Factorization Recommendations. This algorithm also has a good quality of Recommendations, but requires more time to optimize the parameters.

Optimization of Algorithm Parameters

Over time, the number of subscribers in any operator system increases, and new content is added periodically. All this leads to the need for periodic optimization of algorithm parameters to maintain optimal Recommender performance. At the moment, this process is run periodicаlly under manual control. However, the SmartLabs development team is moving towards automating the launch of the optimization process.

SmartTUBE Server Installation

The initial deployment of the SmartTUBE server is usually carried out by SmartLabs specialists during the project commissioning phase. This document serves as a reference guide for advanced users who intend to set up a distributed component structure, where each component is installed on a separate machine. It also provides information on integrating with your existing databases and configurations.

SmartTUBE installation requires manual configuration from a repository. Please follow the steps outlined below to successfully install SmartTUBE.

  1. Connect the repository (for the repository details contact the SmartLabs official representative).
  2. Install Java JDK from the repository:

# yum -y install smartlabs-java8-stub


Alternatively, you can download the rpm-package from the official source http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and install it:

# rpm -ivh <package_name>

  1. Install and run Elasticsearch (reference guide: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/rpm.html):
  2. Import the Elasticsearch PGP Key:

# rpm –import https://artifacts.elastic.co/GPG-KEY-elasticsearch

  1. Create a file called elasticsearch.repo in the /etc/yum.repos.d/ directory:

[elasticsearch]

name=Elasticsearch repository for 7.8 packages
baseurl=https://artifacts.elastic.co/packages/7.8/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md

  1. Install Elasticsearch:

sudo yum install –enablerepo=elasticsearch elasticsearch-7.8.1

  1. The RPM for Elasticsearch v7.8.1 can be downloaded from the website and installed as follows:

# yum -y install wget
# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.1-x86_64.rpm
# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.1-x86_64.rpm.sha512
# sha512sum -c elasticsearch-7.8.1-x86_64.rpm.sha512


This command compares the SHA of the downloaded RPM and the published checksum, which should output elasticsearch-7.8.1-x86_64.rpm: OK.

#  yum localinstall elasticsearch-7.8.1-x86_64.rpm

  1. Start the Elasticsearch service:

# systemctl start elasticsearch.service

  1. Add these settings in the configuration file /etc/elasticsearch/elasticsearch.yml:

cluster.name: smartlabs_cache_client
cluster.initial_master_nodes:
 – 127.0.0.1
network.host: _local_,_site_
node.data: true
node.master: true
node.name: node01
reindex.remote.whitelist: ‘*:9200’
xpack.license.self_generated.type: basic
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

  1. Restart the Elasticsearch service:

# systemctl restart elasticsearch.service

  1. Set the password for built-in users:

# /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto

  1. Follow the on-screen instructions.
  2. Remember the password for the elastic user. It will be needed in the SmartTUBE Cache client configuration.
  3. After you install Elasticsearch, enable the service autorun

    RHEL7: # systemctl enable elasticsearch.service

    and run the service:

    RHEL7: # systemctl start elasticsearch.service

  4. Install PostgreSQL (reference guide: https://wiki.postgresql.org/wiki/YUM_Installation)
  5. Install the ps-rpm file corresponding to your OS version and the required version of the package (https://yum.postgresql.org/repopackages.php), for example:

# yum localinstall https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-2.noarch.rpm

  1. Check the packages available for installation: # yum list postgres*
  2. Install PostgreSQL (the command depends on the package version you are installing):

# yum -y install postgresql96-server

  1. Initialize the database

    RHEL7:

# su – postgres
$ /usr/pgsql-9.6/bin/initdb (the path to initdb)
$
exit

  1. Enable the service autorun

    RHEL7: # systemctl enable postgresql-9.6.service

  2. Run the service

    RHEL7: # systemctl start postgresql-9.6.service

  3. Download the database dump: # yum -y install postgresql-initial
  4. Install SmartTUBE from the repository

# yum -y install smarttube5-mod-dataserver smarttube5-mod-cacheserver smarttube5-mod-datacore smarttube5-aui5 smartlabs-nginx smarttube5-mod-reports

  1. Make the following changes to the configuration file /opt/smartlabs/smarttube5/conf/modules/cache-server.conf:

     elasticsearch {

         auth.password = “elastic_user_password”

         auth.username = elastic

         connectTimeoutMillisec = 1000

         nodes = [

               “127.0.0.1:9200”

         ]

         socketTimeoutMillisec = 30000

       }

Where elastic_user_password — password for elastic user generated in Step 3.

  1. Make the following changes to the configuration file /opt/smartlabs/smarttube5/conf/modules/data-server.conf:
  2. Find the database section;
  3. Change the IP and PORT and DB reference in the connection-string parameter;
  4. Add the password for DB access;

Example of the correct section configuration:

database {

   connection-string = “jdbc:postgresql://192.168.10.25:5432/master?tcpKeepAlive=true&ApplicationName=sdp5_application”

   login = master

   max-connections = 38

   password = Jmmsd3k09sSQj54

   server = postgresql

}

  1. Open the configuration file /opt/smartlabs/nginx/conf/nginx.conf. It should contain the following:

user            nginx;
worker_processes    
6;
worker_rlimit_nofile    
40960;
worker_priority    
-5;

error_log   /var/log/smartlabs/nginx/error.log;

pid     /var/run/nginx.pid;

events {
   worker_connections 20480;
   epoll_events 8192;
   use epoll;
   accept_mutex off;
}

timer_resolution    1ms;

http {
   include ./mime.types;
   default_type application/octet-stream;

log_format main ‘$remote_addr [$http_x_forwarded_for] – $http_x_smartlabs_mac_address [$time_local] $upstream_cache_status $request “$status” $body_bytes_sent “$http_referer” “$http_user_agent” “$upstream_addr” $server_port “$http_host” $request_time $req uest_send_time “$upstream_response_time” $gzip_ratio’;
log_format mgmt ‘$remote_addr [$http_x_forwarded_for] – $http_x_smartlabs_mac_address [$time_local] MGMT $upstream_cache_status $request “$status” $body_bytes_sent “$http_referer” “$http_user_agent” “$upstream_addr” $server_port “$http_host” $request_time $request_send_time “$upstream_response_time” $gzip_ratio’;

access_log      /var/log/smartlabs/nginx/access.log main;

sendfile            on;
sendfile_max_chunk  131072;
keepalive_timeout   60;
underscores_in_headers  on;
server_tokens       off;
output_buffers      256 1024k;
tcp_nodelay     on;
tcp_nopush      on;

proxy_next_upstream error timeout http_500 http_502 http_503 http_504 ;
proxy_cache_path    /opt/smartlabs/nginx/cache levels=l:2 keys_zone=one:100m inactive=60m max_size=1500m;

push_stream_shared_memory_size 128M;

include     “http.d/*.conf”;
include    
“upstreams.d/*.conf”;
include    
“servers.d/*.conf”;

server {
   listen 127.0.0.1:7999;

   location /sla_status {
       sla_status;
       sla_pass off;
       allow 127.0.0.1;
       deny all;
   }

   location /sla_purge {
       sla_purge;
       sla_pass off;
       allow 127.0.0.1;
       deny all;
   }

   location / {
       access_log off;
       deny all;
   }

   location = /nginx_status {
       stub_status on;
       access_log off;
       allow 127.0.0.1;
       deny all;
   }

   location /push_stream_admin {
       push_stream_publisher admin;
       push_stream_channels_path $arg_topic;
       access_log off;
       allow 127.0.0.1;
       deny all;
   }
 }
}

  1. Configure the /opt/smartlabs/smarttube5/conf/modules/report.conf file with the IP, port and DB name. It should look like this:

component = {

  description = “SmartTUBE5 Report”

  jar = “sdp-report.jar”

  class = “smartsdp.report.main.SmartSDPReport”

  singleton = true

  load-on-startup = 14

  servlet-context-path = “/report/*”

  install-path = “/opt/smartlabs/smarttube5/modules/reports”

  number-of-http-get-handlers = 100

  properties = {

      akka-local = {

      host = “127.0.0.1”

      port = 5054

      }

  datasources = [

      {

          ds-name = “jdbc/sdp”

          server = “postgresql”

          connection-string = “jdbc:postgresql://185.5.42.72:5432/master?tcpKeepAlive=true&ApplicationName=sdpreport_application” login = “master”

          password = “MfXXDeQ6WC”

          max-connections = 5

          }

      ]

  }

}

  1. If you need to apply other changes to configuration files, see their description in the Configuration files part. Normally, you can work with default settings.
  2. Add the rule to iptables (# vi /etc/sysconfig/iptables)

-A INPUT -p tcp -m tcp –dport 8084 -j ACCEPT


Restart the service

RHEL7: # systemctl restart iptables.service

If the service is not set for the RHEL 7 iptables (you can see it by the empty file /etc/sysconfig/iptables), do the following:

  1. Disable firewalld

# systemctl stop firewalld

  1. Delete it from autorun

# systemctl disable firewalld

  1. Install the package with utilities

# yum -y install iptables-services

  1. Add iptables to autorun

# systemctl enable iptables.service

  1. Run the service

# systemctl start iptables.service

  1. Add the rule from above and restart the service
  2. Run the smarttube5 service:

    RHEL7: # systemctl start smarttube5.service
  3. Check the operability:

# wget –header “Content-Type:application/json” -O – ” http://localhost:8084/sdpapi?metacontentingenre=list “


The response must be 200 OK.

About SmartTUBE

SmartTUBE is a comprehensive software solution designed for building OTT, IPTV and Hybrid TV services. At its core is a robust platform comprised of server-side components, offering extensive APIs and a flexible architecture, enabling operators to provide end-users with a complete set of video streaming services. Complementing the platform, our solution includes a suite of client apps tailored for various devices, ensuring a seamless user experience and end-to-end functionality. Below is a description of the main solution components.

SmartTUBE Apps are a range of applications for the supported end-user devices. Depending on the device platform, the functionality of SmartTUBE apps may vary slightly.

Image1

SmartTUBE Applications

SmartTUBE Service Delivery Platform (SDP) is the core of the solution responsible for managing services, subscribers, content, pricing, metadata, end-user device provisioning, advertising, etc. Provides interaction with billing systems, payment gateways and 3rd-party information systems installed on the operator’s side.

Management of TV services, subscribers, tariff plans, meta content, etc., as well as system administration is performed via SmartTUBE Admin Console.

Image2

SmartTUBE Admin Console

SmartTUBE SDP interaction with external systems, such as VoD content libraries, EPG providers, OSS/BSS, recording servers, etc. is performed through the corresponding APIs.

Try our SmartTUBE apps

SmartTUBE solution provides you with a set of apps for different client platforms. You can test it on your devices following this guide.

  1. Get demo accounts
    Please email sales@smartlabs.tv with brief information about your company. In response, you’ll receive a list of demo accounts for testing apps on multiple devices at the same time.
  2. Install SmartTUBE apps on your devices
  3. Try it
    1. Run the app.
    2. Log in using the credentials sent to you.
    3. Now you can evaluate the SmartTUBE app capabilities on your devices…

Get a trial SmartMEDIA license

  1. Send the UUID of your system with installed SmartMEDIA to the following email address: support@smartlabs.tv. It may be viewed in any service journal after a service start. For instance, System UUID: 00000000-0000-0000-0000-0011101DD1112. 
  2. Copy the file received from SmartLabs to /opt/smartlabs/smartmedia/license.bin on the SmartMEDIA server.

Functionality Overviews

SmartTUBE Overview

SmartTUBE Introduction

Download PDF

SmartTUBE is a complex solution that enables operators to deliver both OTT and IPTV services to subscribers. Its primary objective is to offer a range of subscriber-level services, including:

  • Live TV, Catch-up, nPVR and other related services
  • VoD content watching and purchase directly in the app
  • High quality content playback on end-user devices of various types 
  • Access services and watch content on multiple devices at the same time 
  • Fast and convenient search for TV channels, programs and VoD content

The SmartTUBE comprises the SmartTUBE Service Delivery Platform (SDP) and SmartTUBE Applications tailored for different end-user devices such as STB, mobile, tablet, Smart TV, media players, and PC.

SmartTUBE SDP is the core component of the SmartTUBE, responsible for managing services, users, content, pricing, metadata, end-user device provisioning, and dynamic ad insertion. It provides seamless interaction with billing systems, payment gateways, and third-party information systems installed on the operator’s side. All features and capabilities of the SmartTUBE SDP can be managed through a single web-based SmartTUBE Admin Console

SmartTUBE architecture

The SmartTUBE SDP architecture integrates 5 functional modules:

  • Subscriber Management: Enables operators to oversee service accounts, end-user devices, profiles, service bundling, tariff plans, and multiple tenant configurations. A comprehensive and time-tested API provides seamless integration and interaction with OSS/BSS systems and payment gateways. Learn more…
  • Content Management: Offers comprehensive support for both TV-related services and xVoD services:
    • Enables operator to manage TV services, including control over channel streaming and encryption settings, channel bundling and regional availability, EPG import from external providers, support for nPVR and Catch-up service assurance subsystems, and other functionalities. Learn more…
    • SmartTUBE SDP supports all models of Video on Demand (VoD) content, enabling operators to manage the movie and series library from both local operator’s sources and external content providers. The SmartTUBE SDP empowers operators to oversee content metadata, regional accessibility, pricing policies, and other key features of the VoD service. Learn more…
  • Marketing: Offers operators various tools and opportunities to promote content and services to subscribers, such as banners, custom content rails, automatic content recommendations, marketing notifications, and dynamic ad insertion management with an option to integrate with external ad management system. Learn more…
  • Reporting & Analytics: Provides operator with current statistics on content consumption, subscriber demand for specific services, and customer base analytics, enabling timely business decisions. Learn more…
  • System Management: Ensures the operation of the platform as a whole, allowing operators to manage system settings, automate system processes, control access for platform users, alert for failures, provision end-user devices, localize and customize the SmartTUBE Apps, and more…

SmartTUBE Apps are a range of user-friendly and highly customizable applications compliant with the most current streaming industry standards. Tailored for popular device platforms, these applications seamlessly integrate established user interaction patterns to offer a superior viewing and application experience. Users have access to a diverse content selection, including live TV, video-on-demand, catch-up TV, nPVR, and shared TV recordings, all enriched with advanced features of cutting-edge streaming applications. Learn more…

SmartTUBE Applications

Subscriber Management

Subscriber Management Entities

SmartTUBE SDP offers the Sales Department of an operator with all the capabilities for managing customer base. Its efficiency and simplicity lies in the management of the following entities:

The diagram below demonstrates the relationship of these entities:


Diagram 1. Relationship of SmartTUBE SDP subscriber management entities

Service Account

Service Account contains information about a subscriber and uniquely identifies it on the platform. It is characterized by a unique identifier, status (active, blocked, etc.), and login/password common for all subscriber’s devices (used for device authenticating).

The following operations can be performed on Service Accounts:

  • Multiple Devices can be linked to a Service Account for using them in parallel by a subscriber.
  • The set of services available to the subscriber is determined by the Pricing plan assigned to the Service Account. Only one Pricing Plan can be assigned to a Service Account.
  • Multiple User Profiles containing personalized content consumption restrictions and settings can be assigned to the Service Account.
  • Operator can specify the trial period for the account and manage its duration, along with setting the account status after the trial period expires.
  • Management and synchronization of the linked SmartTUBE SDP and OSS/BSS accounts are performed via SmartTUBE API. Subscriber’s personal data is stored on the OSS/BSS side only.

Device

Device uniquely identifies subscriber’s device on the platform. Each Device can only be linked to a single Service Account and characterizes by

  • Unique identifier (UID)
  • Device Type: Determines the device functionality when interacting with the platform. For example, use different TV streams on devices of different type, use different banners or channel logos, etc.
  • Individual login/password used for authenticating device on the platform.

Operator can perform the following actions with Devices:

  • Limit the number of Devices that can be linked to the same Service Account (with differentiation by device type) and/or simultaneously consuming services. Subscribers can exceed the set limits by purchasing a corresponding Service Bundle.
  • Link Devices to a specific region, allowing for the management of regional streaming.
  • Enable/disable DVB-T input, unprotected analog outputs, and HDCP protection of HDMI outputs on STBs that support this functionality.
  • Factory reset and reboot on STBs
  • Create an SSH tunnel to Devices (if it is technically possible)
  • Manage firmware and installed apps on Linux and Android-based STBs, as well as configuration parameters on all types of IPTV/OTT devices including mobile and Smart TV platforms. These actions are performed with SmartTUBE Device Manager.

User Profile

User Profile contains individual age restrictions for viewing/purchasing content and TV channel sorting settings. Each User Profile also stores individual viewing history, lists of favorite channels, movies, reminders, recordings, and purchased movies.
Multiple User Profiles can be linked to the Service Account, meaning they can be shared across all Devices linked to the Service Account.

Profiles have the following set of parameters:

  • Nickname
  • Collection of Profile Icons to choose from
  • PIN code: Used to secure the profile from unauthorized access and editing, and to prevent unauthorized purchases of content and subscriptions to services.
  • Default Access Level: The highest age rating of content that a user can view without entering a PIN. Content with a higher age rating is considered adult content.
  • Maximum access level: The highest age rating of content to be displayed in the TV channel list and VoD library. Content rated above this level is hidden from the app’s UI.

Pricing Plan

Pricing Plan is a collection of multiple Service Bundles and Discounts that enable operator to manage the service provisioning rules for subscribers. For this purpose, the Pricing Plan is assigned to the subscribers’ Service Accounts. Only one Pricing Plan can be assigned to the same Service Account. Each Pricing Plan can be shared across multiple Service Accounts.

Pricing Plan allows to control the following provisioning conditions of each Service Bundle and Discount:

  • Validity period of the bundle/discount within the Pricing Plan
  • Type of devices to which the bundle/discount to be applied
  • Bundle/discount status at the time the Pricing Plan is applied. Can be Active, Not active or Invisible (the bundle/discount is disabled and hidden for subscribers).
  • Duration following the Pricing Plan activation, after which the bundle/discount becomes inactive.
The Pricing Plan also enables to conduct the following operations on Service Bundles and Discounts:
  • Allow subscribers to enable/disable the bundle/discount in the app
  • Hide the bundle/discount from subscribers within the app. This way, the bundle/discount can only be activated by the operator or through subscription to other dependent bundles/discounts.
  • Hide the bundle/discount after unsubscribing and set the corresponding Service Account state accordingly

Service Bundle

Service Bundle is a collection of content or services offered to subscribers for a fee or at no cost. For the Service Bundle to be available to subscribers, it must be included into the Pricing Plan. Multiple Service Bundles can be included into multiple Pricing Plans.

The cost of a Service Bundle for a subscriber is determined by the Price Lists.

SmartTUBE supports the following types of Service Bundles:

  • TV Channel Bundle: A collection of channels provided to subscribers within the bundle.
  • DVR Bundle: A set of TV channel with Catch-up services enabled. It offers control over archive storage depth, as well as the provision of TSTV and/or Pause Live services for each channel individually.
  • VoD Bundle: Outlines the pricing model (TVoD, SVoD, AVoD, FVoD) for the movies/series within the bundle, their linkage to the operator’s local movie/series library or external content providers, offline movie viewing capabilities, and connection to a VAST server for AVoD content.
  • nPVR Bundle: A collection of channels eligible for nPVR services. It allows to manage the following bundle attributes:
    • Recording Time Quota: Maximum duration of all subscriber recordings.
    • Recording Storage Quota: Storage duration of subscriber recordings.
    • Notification Quota Level: Threshold at which the subscriber is notified about approaching to the Recording Time Quota.
    • Quota Overspending Limit: Maximum amount a user can go over their Recording Time Quota. If the quota is exceeded, the user must delete the extra recordings before scheduling more.
    • Restriction to record the ongoing or finished TV programs
    • nPVR Duration: Period within which the recording of finished TV programs is allowed.
  • PPV Bundle: Sets the pricing rules for pay-per-view TV programs. The operator can choose to charge a fixed price for the whole program or charge based on the minutes watched.
  • Device / Session Limit as a Bundle: Allows subscribers to increase the number of devices linked to the Service Account and/or Devices simultaneously consuming services beyond the limit set by the operator.

Price List

Price List determines the cost and provision conditions of the Service Bundle. Price Lists can be of two provision types:

  • One-time Purchase: Involves a single payment for the Service Bundle for a specific rental period (such as a day, month, year, or lifetime). Payment is handled by OSS/BSS through an integration API.
  • Subscription: The Service Bundle is provided for a certain period of time and involves periodic payment. The subscription charges and payment frequency are handled by OSS/BSS through an integration API.

Multiple Price Lists of the same provision type but with different prices and non-overlapping validity periods can be assigned to the same Service Bundle. That is, at any given time, a Service Bundle can have only one active Price List of a certain provision type.

For the TVoD content, it is also possible to set different prices and rental periods for each type of movie assets (e.g. SD and HD). Additionally, the asset price may vary depending on the Service Bundle or content provider.

Discounts

Price List can be optionally adjusted with Discount of the following types:

  • Overriding discount: Overwrites the cost of the Price List with its own.
  • Percentage discount: Specifies the percentage of discount applied to the cost of Price List.

The Discount is applied to the Pricing Plan. Thus it overlaps all Price Lists of all Service Bundles included in the Pricing Plan.

The provision conditions of Discount (validity period, device type dependence, etc.) are managed by the Pricing Plan.

The Price List and Pricing Plan can only have one active Discount at any given time, but one Discount can be applied to multiple Price Lists and Pricing Plans.

Subscriber Registration and Sign-In Options

SmartTUBE SDP offers various options for registering and signing in subscribers on the platform:

  • Sign-in by Login and Password: These credentials can be set for the entire Service Account or a specific Device.
  • Passwordless Sign-in: Operators can register devices on the platform without requiring login credentials if they manage the customer’s home network and know their IP address.
  • Trial Sign-in: Operators can set a trial period for subscribers and specify what types of devices they can use during this period.

Multiple Tenancy Configurations

Multitenancy allows the creation of several virtual operators sharing a single SmartTUBE SDP platform. For example, one global IPTV/OTT operator may have several regional divisions. The audience of these divisions may differ geographically, culturally, socially, etc. So may the content.

The multitenant configuration allows the following resources and features to be individualized for each tenant:

  • Service Accounts and Devices
  • Service Bundles and pricing rules
  • Access rights to SmartTUBE Admin Console for tenant employees
  • Statistical reports
  • Limited apps’ UI customization:– Tenant logo on the splash screen when starting the app

    – Tenant logo on the status bar

    – Selector color

    – Limited styling features on the Home screen

    Please note that the app remains the same for all tenants. The operator cannot change the app icon and name individually for each tenant!

  • Subscriber notifications
  • Licensing calculations

At the same time, each tenant may utilize shared content (TV channels, EPG, VOD library) and metadata sets.

Platform administrators have full access to all platform resources.

Content Management

SmartTUBE SDP provides a suite of tools designed for Content Management Departments to control TV-related content and VoD movie/series library. The platform also supports the import and management of multilingual Electronic Program Guide (EPG) and VoD-related metadata.

TV-related Content

SmartTUBE SDP capabilities enable operators to manage TV content distributed over IPTV, OTT, and DVB-T/T2/C networks and provided with the following TV services:

  • Live TV: Real-time television streaming.
  • Catch-up: Services allowing subscribers to watch TV programs for a period after they have aired. Recording of the source streams is done on the operator’s equipment using hardware or software (e.g. SmartMEDIA Content Delivery Subsystem). Services include:
    • Pause Live (Restart TV): Allows to pause, rewind, and fast-forward within the ongoing TV program.
    • Start Over: Allows to start watching the ongoing TV program from the beginning.
    • Time Shift (TSTV): Allows to play, pause, rewind, and fast-forward completed TV programs within a time frame determined by the operator.
    • Catch-up Content Library  Enables access to selected TV programs recorded by operator and provided to subscribers via content rails on the SmartTUBE Apps’ Home screen.
  • nPVR: Cloud recording of completed, ongoing, and upcoming TV programs initiated by a subscriber.

Management of TV-related content

  • Channel Management
    • Channel Metadata: Provides control over the channel title, description, number in the channel list, and topics. The channel can have a single logo for display on all device types or multiple logos optimized for each one.
    • Streaming Settings: Allow to configure channel streaming sources, URLs for multicast or unicast outgoing streams, URLs of DVR and nPVR servers, define encryption types for different device types, set regional restrictions or block the channel broadcast immediately.
    • Age Restrictions: Each channel is assigned an age access level, dictating its visibility in apps and user access with or without a PIN code. For more details, check User Profile.
    • Channel Sorting: Operator can control channel sorting in apps by combining sorting by channel number and fixed channel position.
  • Program Management
    • Program Metadata:  Provides control over original and custom program titles, serialized TV show attributes, release country and year, poster, age rating, genre, personalities, awards, and so on.
    • Automatic EPG Import: Supports XMLTV, a widely used standard for describing TV listings, and SmartLabs EPG XML, a simplified XML format developed by SmartLabs and detailing all EPG metadata processed by the SmartTUBE SDP.
    • Catch-up Options: Allows to manage the availability of the program for catch-up services and the duration of availability.
    • Blackout: Operator is able to block broadcasting of certain programs by replacing the video stream with a predetermined image.
    • Restriction for nPVR Recording for Certain Device Types
    • Additional Program Logo Overlay: Overlaying additional logo on top of the video stream of a specific TV program. Implemented in conjunction with the SmartMEDIA Content Delivery System.
  • Closed Caption (CC) Management: Allows to manage the selection of CC tracks present in the original channel stream and available to subscribers.

Video on Demand (xVoD)

SmartTUBE SDP supports all models of the Video on Demand (VoD) content providing, allowing operators to manage the movie and series library from both local storage and external content providers:

  • TVoD (Transactional Video on Demand): Allows a user to access a movie/series by making a one-time payment. After the purchase, the user has a limited time to watch the movie.
  • SVoD (Subscription Video on Demand): Provides a user with long term access to a range of movies/series by subscribing either through a single payment or periodic charges.
  • AVoD (Advertising Video on Demand): Offers a user free content access supported by ads that are displayed before (pre-roll), after (post-roll), or during (mid-roll) video playback.

Management of xVoD Library

  • Content Metadata: Operator can manage a wide range of content metadata including original and custom titles, release country and year, posters and screenshots, distribution period, age rating, genre, personalities, awards, and so on.
  • Content Assets: Enables operator to manage assets for movies, series episodes and their trailers. Each movie and episode can have several asset versions (e.g. SD, HD, UHD) for different device types, encryption options, content providers, pricing and bundling rules. Assets can be individually enabled for offline viewing by subscribers within the SmartTUBE Apps.
  • Regional Restrictions: Regional restrictions can be applied at the movie and series level.
  • Integration with VoD Content Providers: SmartTUBE offers streamlined integration schemes with a number of content providers.

Radio Stations

SmartTUBE SDP provides features for managing radio station broadcasting with configuration options similar to those available for TV-related content.

Content Protection

SmartTUBE supports content protection for IPTV/OTT services on various levels:

  • DRM Protection: Offers support for the Google Widevine and Apple FairPlay DRM systems. SmartTUBE SDP can also be integrated with SmartLabs Universal DRM (UDRM), allowing these DRM systems to be used in parallel.
  • Token-based Stream Access Restriction: This security feature, integrated with the SmartMEDIA Content Delivery System, utilizes JWT tokens to prevent unauthorized access to the OTT TV channel streams.
  • Copy Protection on Physical Outputs: Allows to control recording on analog and digital outputs of set-top boxes that support such functionality. HDCP and CGMS-A / WSS technologies are supported.
  • Watermark messaging: Operators can prevent or complicate unauthorized copying of content on devices by sending messages that overlay text with identifying subscriber data on top of the TV channel stream. The feature allows to set the text transparency, position on the screen, display duration, and TV channel.

Marketing

The SmartTUBE solution provides Marketing Departments with a variety of tools to promote content and services within the SmartTUBE Apps:

  • Banners
  • Content Rails
  • Content Recommendation Engine
  • Ad Insertion Management
  • Marketing Messaging

Operators have the option to display a static, non-clickable banner when users pause content in the full-screen player. This banner disappears on resume, and operators can configure a rotating list of such banners to display with each pause.

  • Display Options of Banner Carousel:
    • Regular Banners: Regular opaque banners with a clear bottom edge, not overlapped by any other UI elements.
    • Faded Banners: Banners with a faded bottom edge typically overlapped by the Main menu and first Content rail.
    • Banners with Auto-play Trailers: Faded banners of the movie or series that starts playing the trailer automatically when it’s in focus after a set time. It is available for Large-screen Apps only.
  • Display Options for the Banners in the Full Screen Player when Paused:
    • Regular Banners: Only regular opaque banners are accepted.
    • Image Scaling: Banners are stretched to fill the screen without breaking the image proportions.
  • Display frequency in the carousel: Allows to set each banner to high, medium and low priority for display in the carousel.
  • Time frame and duration to display
  • Display only for certain Device types and Pricing plans

Content Rails

Operators have the ability to populate the content pages (Home, Movies, TV Series, and My Profile) with an unlimited number of predefined and custom Content rails:

  • Manually recommended content: Curated xVoD content or TV programs manually selected by the operator.
  • Auto recommended content: Automatically generated xVoD content based on user viewing history, leveraging the SmartTUBE Recommender module.
  • TV Channels: Display of TV channels presented as posters of currently streaming programs. User-favorited channels are prioritized, followed by operator-sorted channels.
  • Top 10 TV programs: Compilation of the most popular TV programs viewed by all subscribers.
  • Applications: List of integrated applications defined by the operator. Available only for the Android TV / STB devices, if the SmartTUBE App is a launcher.
  • Continue watching: List of xVoD content and TV programs that the user has not finished watching.
  • Watch history: Chronological listing of xVoD content and TV programs watched by the user.
  • Favorite channels: Channels and movies marked as favorites by the user.
  • Favorite movies: Movies marked as favorites by the user.
  • Personal recordings: Recordings of TV programs initiated by the user within the nPVR service.
  • Reminders: Alerts for upcoming TV programs set by the user.
  • Purchased movies: List of xVoD content purchased by the subscriber.
  • Custom rails: Operator-filtered xVoD content or TV programs based on various content and subscriber’s account attributes (for example, French comedies of 80-th, Modern Bollywood movies, Jackie Chan action movies, etc.). The filtered TV programs and xVoD content can be sorted by various attributes.

Content Recommendation Engine

SmartTUBE SDP features an integrated module for the automatic generation of xVoD content recommendations called SmartTUBE Recommender. This module periodically analyzes subscriber views of content, content characteristics (such as genres, countries, descriptions, etc.), and optionally, user characteristics (such as gender, age, geolocation). It then generates ordered sets of xVoD content recommendations for each user and sets of similar movies/series for each user.

SmartTUBE Recommender provides two types of recommendations:

  • User-based: Calculated based on the user profile settings, the user’s viewing preferences and their similarity to other subscribers, and so on. This type of recommendation is only available in conjunction with the SmartCARE (SmartLabs analytics software for IPTV/OTT networks).
  • Context-aware: Calculated based on the similarity of movie metadata (description, genres, cast, etc.)

The generated recommendations can be displayed in SmartTUBE Apps on content rails, in movie detail cards, and in the player.

Ad Insertion Management

SmartTUBE is an integral component of SmartLabs Dynamic Ad Insertion (DAI) solution that enables operators to dynamically insert or replace ad blocks in live video streams, pre-recorded, and xVoD content. Thanks to VAST protocol support, operator can partner with third-parties or create its own campaigns within SmartTUBE SDP without relying on external ad services.

The SmartLabs DAI solution is made up of three key modules:

  • SmartTUBE Advertising Decision System (ADS): Carries information about advertisers, ad campaigns, ad creatives, placement dates and duration, types, target devices, target content, and other parameters. Using this data, ADS can make a decision which ad fits a specific insertion opportunity. The ADS also provides campaign performance reports highlighting key metrics. Implemented as a component of SmartTUBE SDP.
  • Server-side Ad Insertion Module: Implemented as a component of SmartMEDIA Content Delivery System
  • Client-side Ad Insertion Module: Implemented as a component of SmartTUBE Apps
    The Server-side and Client-side ad insertion modules request an ad decision from the ADS via the VAST protocol. The ADS finds a matching set of ads based on the request targeting criteria and responds with a VAST response carrying the data about the ad to be inserted.

There are 2 use cases for using the SmartTUBE DAI:

  • Ad insertion into HLS / DASH streams for OTT subscribers: Involves inserting ad blocks on the SmartTUBE App side and getting data on them within the stream playlists/manifests. The preparation of playlists/manifests and ad creatives to be sent to the device is performed on the SmartMEDIA side.
  • Ad insertion into linear TS streams: Involves inserting ad blocks directly into the source TS streams using SmartMEDIA components. The resulting TS output can be distributed over IPTV networks, or pushed to satellite or DVB-C head-ends:

Marketing Messaging

SmartTUBE allows to send messages to the end-user devices via SmartTUBE Admin Console or OSS/BSS API. It can be used for notification about new services, promotions, technical works, etc. The messaging can be performed either individually to a specific subscriber or massively using filters on the subscriber base.

Message sending can be scheduled with filtering recipients by user identifier, pricing plan, and tenant. Additionally, messages can be sent automatically for events like first authorization, account creation, service subscription/unsubscription, and pricing plan changes.

Operator can manage the following message attributes:

  • Message text: Allows to insert such user-identifying variables as user ID, device ID, and service account number.
  • Expiration period
  • Display duration
  • Number of message reminders and their display duration
  • Tenant relation
  • Appearing animation: Slide-down or pop-up
  • Image, icon, and URL of a video to be attached to the message
  • Message opacity
  • Link to the service bundle, xVoD content, TV channel
  • Delivery type:
    • Long Polling: Messages are sent using Long Polling mechanism and displayed as a modal window in the SmartTUBE App only after it is launched.
    • Push: Messages are sent using the Apple APN and Google GCM services and displayed additionally in the notification shade regardless of whether the SmartTUBE App is running or not.

Message recipients can be specified by a list of device IDs or selected based on the following criteria:

  • Account login, number, name, status
  • Account creation date
  • Pricing plan
  • Service bundle presence in the Pricing plan
  • Status of the service bundle
  • Device type
  • App version
  • STB UID
  • IP address
  • Date of linking the device to the account
  • Last stored device location
  • Last device authorization date

Reporting & Analytics

The SmartTUBE reporting system offers Marketing, Sales, and Content Management Departments with real-time and historical statistics of content consumption and specific resource/service demand among subscribers.

SmartTUBE SDP offers a range of historical reports that are generated for a user-defined timeframe:
  • Service accounts and devices:
    • Created/deleted accounts report: Number of accounts added/deleted for the period.
    • Service accounts not authorized till now: List of accounts without authorizations for the period until today.
    • Service accounts without new connections: List of accounts without new device connections for the period until today.
    • Individual service account reports: History of service bundle subscriptions, status changes, nPVR usage stats and errors, accepted text offers, and pricing plan changes.
    • Number of pricing plan changes:  Number of pricing plan shifts for the period with specifying the previous/new plan.
    • Percentage of accounts by state: Number and percentage of accounts by status on the day specified.
    • Percentage of users by pricing plan: Number and percentage of accounts by pricing plan on the day specified.
    • Devices: Detailed info on the devices authorized during the period with filtering by the service account, as well as device name, UID, and type.
    • Device UID changes:  Change history of the unique identifier of each registered device.
  • Service and content consumption:
    • Service consumption:  Number of service accounts subscribed to specific service bundles during the period.
    • Service consumption in detail: Details on subscriptions to service bundles during the period with details on accounts and pricing plans.
    • Purchased TVoD movies: Brief report on TVoD content purchases during the period.
    • Purchased TVoD movies in detail: Detailed report on TVoD content purchases during the period.
    • SVoD metacontent view count: Report on SVoD content views during the period with filtering by service bundles and content providers.
    • Detailed report by SVoD: Detailed report on SVoD content subscriptions during the period with filtering by service bundles and content providers.
    • VoD view statistics: General report on the number and duration of xVoD content views with grouping of results by periods (hour, day, etc.) and filtering by viewing duration of each movie/episode.
    • Channel coverage: Details on TV channel audience and viewing duration in live and catch-up modes with grouping of results by periods (day, month) and filtering by channel, device type, pricing plan and viewing duration.
    • Channel viewing statistics: Number and duration of the channel views in live and catch-up modes with grouping of results by periods (5 min, hour, day, etc.) and filtering by channel, device type, and viewing duration.
    • TOP 10 most viewed TV programs: Number of viewers of the 10 most popular TV programs for the period with filtering by channel.

The following reports provide a real-time view of the devices and apps used by subscribers:

  • Service account w/o devices:  List of accounts with no devices connected or devices with no UID.
  • Device combinations on service accounts: All unique combinations of devices linked to accounts, itemized by state and number of accounts, as well as by number of devices. 
  • Statistics by device types: Number of devices of different types currently registered on the platform.
  • Statistics by app versions: Number of devices of different SmartTUBE app versions with filtering by device type, device model, and app version.

System Management

The majority of SmartTUBE system functions are accessed and controlled through the web-based SmartTUBE Admin Console. Fine-tuning of platform functionality is carried out through configuration files of SmartTUBE SDP components. Together, these management tools provides System Administration Departments with complete control over platform aspects and features described below:

  • End-user Device Provisioning: SmartTUBE SDP includes SmartTUBE Device Manager, a service with the web console for managing firmware, apps and configurations on all types of IPTV/OTT devices including Linux and Android STBs, mobile and Smart TV platforms.  This console enables software artefacts management (STB Linux and Android firmware, private app repository for AOSP, configuration files), device grouping (production, staging, etc.), HTTP and Multicast firmware distribution, software version tracking, update strategies management (soft update, force update, minimal allowed version), etc.​
  • Process Automation: Various service tasks (e.g. EPG import, cache data reload, etc.) can be performed automatically at set schedule.
  • Admin Console Access: Operators can manage users with specific access roles like Administrator, Content Manager, Business Manager, Technical Support Specialist, and Analyst. Multiple roles can be assigned to a user, defining access to different features within the console.
  • Failure Alerts: Provides email alerts for failures related to OSS integration, EPG and VoD metadata import, database connection limits, and SmartMEDIA warnings.
  • Device Geolocation:  To manage access to content based on IP address range, operators can assign IPTV devices to specific subnets or utilize data from third-party services like Maxmind (under a separate contract) to determine the geo or network location of OTT devices. Operators can also restrict access to services for mobile devices when transitioning between network connections (e.g., from home network to cellular one). 
  • License usage statistics: Provides detailed information about installed licenses, including their types, number of service accounts and active devices used.  
  • License features: Operators can manage the availability of features that depend on the license type. 
  • Rebooting STBs: Enables remote reboot of STBs  by a list of UIDs or by matching conditions.
  • Cache Server Data Reload: Allows to manually update metadata and system settings on cache servers to quickly pass changes to devices. 
  • Data Export: SmartTUBE Admin Console allows to export any data stored in the SmartTUBE SDP database to CSV format.

Apps Localization and Customization

SmartTUBE provides a comprehensive toolkit for localizing and customizing SmartTUBE Apps’ UI and UX. This process occurs in two stages:

  • Initial: Performed by SmartLabs specialists at the stage of system commissioning.
  • Operational: Performed by the operator during the system operation.

Initial customization allows to adjust the UI within the existing structure (layout of the main components, animation logic, etc.) and includes the following possibilities:

  • Interface Localization: SmartTUBE provides the ability to localize the interface to the operator’s language by the operator. English is supported by default. Localization in languages using fonts containing hieroglyphs, arabic script and other specific alphabets, is discussed separately.
  • Operator Logo: Can be placed in the various parts of UI (upper left corner, placeholders, splash screen, etc.);
  • Color of Selected Elements
  • Animation of Waiting States

Operational customization allows the operator to change the representation of the Home screen and Movies/Series sections by uploading the corresponding configuration files to devices via SmartTUBE Device Manager, a service for managing firmware and apps on all types of IPTV/OTT devices.

Security Mechanisms 

SmartTUBE system protects IPTV / OTT services and confidential information from unauthorized access at different levels utilizing the following mechanisms:

  • Device activation and user authorization: Each time a device attempts to connect to the SmartTUBE SDP, the system compares its device ID and serial number with the values stored in the DB when the device was activated. If the device ID and serial number do not match, the device is not allowed to access services.
  • Connection sessions management: SmartTUBE SDP uses special identifiers to manage each connection session with devices. Each connection session lives for a limited period, after which the session closes and SmartTUBE SDP stops the information delivery to the device. This also avoids the memory shortage and related security issues on STB devices.​
  • Token-based authorization: SmartTUBE SDP issues a unique token to each device upon authorization on the platform. This token is then passed by the device in all requests to the platform and SmartMEDIA streaming servers for the OTT TV channel streams. This process ensures that only authorized devices can access the SmartTUBE platform and view content securely.
  • Secure access to SmartTUBE Admin Console: Provided by the authorization mechanism with the login and password issued by the system administrator.
  • OSS/BSS API Access: Interaction with SmartTUBE SDP from the OSS/BSS side via API can be protected with login and password. 
  • Network-level security: The HTTPS protocol with SSL certificate management is used for interactions between devices, external systems, and SmartTUBE SDP. Session control is used for interactions between platform nodes and the database.
  • Protection against STB duplication: STB has built-in protection against duplication, which prevents the possible device counterfeiting.

Licensing 

The SmartTUBE licensing policy offers two license types, SmartTUBE Basic and SmartTUBE Ultra, providing operators with different levels of features and functionality to choose from.

SmartTUBE BasicSmartTUBE UltraNotes
SmartTUBE SDP
Multitenancy supportMultitenancy is a software architecture in which a single instance of software runs on a server and serves multiple tenants. Systems designed in such a manner are “shared”. A tenant is a group of users who share a common access with specific privileges to the software instance.
For example, one global IPTV/OTT operator may have several regional divisions. The audience of these divisions may differ geographically, culturally, socially, etc. So may the content. For this case, SmartTUBE Service Delivery Platform (SDP) provides 2 options for multitenant architecture implementation.
Widevine Security Policies supportGoogle’s Widevine DRM technology offers three distinct security levels — L1, L2, and L3 — each designed to cater to different requirements of content protection. These levels are critical in determining the quality of content that can be securely streamed and accessed on various devices.
– L1 represents the highest level of security provided by Widevine. It mandates that devices meet specific L1 security criteria to stream High Definition (HD) content.
– L2 involves content decoding and rendering through a secure hardware component or a protected co-processor.
– L3 is a software-only security solution, providing the lowest tier of Widevine’s DRM security.
Discounts and promo codes supportSmartTUBE provides two types of discounts that can be applied to service packages:
– Overriding discounts — rewrites the price lists of the service packages with its own
– Percentage discounts — allows to specify the percentage of discount applied to the service packages
System health monitor 
SmartTUBE Apps for all supported platforms
Catch-up Content LibraryCatch-up Content Library is a SmartTUBE feature that allows operator to record selected TV programs and provide them to subscribers as a separate VoD-like catalog (to be implemented in version 10.x) or content rails (available).
Kids profileKids profile allows the operator and subscribers to set:
– The maximum age level for showing only children’s TV channels and VOD content
– The viewing period (for example, from 8:00 to 21:00)
– The viewing time limit (for example, no more than 2 hours per day)
– The child-styled UI design
Open movies/series by actors/directorAn option to open a movie catalog by the actor or director, when the user selects a person in the VoD detail card.
SmartTUBE Apps for Android TV, LG & Samsung Smart TV, Web Browser
AVoD supportAVoD (Advertising Video on Demand) — a service to provide access to movies/series is provided with an advertising which is periodically shown in video
Vertical main menu (configurable) 
Horizontal main menu as text instead of icons (configurable) 
‘TV Channels’ rail with program posters instead of channel logos 
Faded top banner with trailer playback 
Easy access to profile selection on Home Screen 
QR code loginThis feature streamlines the authentication process for large-screen applications, eliminating the need for users to manually input login credentials using a virtual keyboard. Instead, a user will be able to add the new device using SmartTUBE mobile app.
Auto-play of program/movie on poster rails
when they are focused on Home Screen
SmartTUBE App for iOS
Push notifications support 
Totally redesigned app (version 8+) 
Legacy app (version 5.x) 
Download content for watching in offline modeThis feature allows subscribers to download movies and series to mobile devices for later viewing in the SmartTUBE application in offline mode. In this case, time limits apply to protected content. For example, offline viewing will be possible for a week, after which a user will need to connect to the Internet to update the DRM keys (the user will not need to download the movie again).
‘HLS + FairPlay’ streams support 
Chromecast supportThis feature enables Screen Sharing from SmartTUBE Mobile Apps to Chromecast devices and TVs with built-in Chromecast using Google Chromecast technology.
SmartTUBE App for Android Mobile
Push notifications support
Totally redesigned app (version 8+)
Legacy app (version 5.x) 
Download content for watching in offline modeTo be implemented in version 10.x
This feature allows subscribers to download movies and series to mobile devices for later viewing in the SmartTUBE application in offline mode. In this case, time limits apply to protected content. For example, offline viewing will be possible for a week, after which a user will need to connect to the Internet to update the DRM keys (the user will not need to download the movie again).
Chromecast supportThis feature enables Screen Sharing from SmartTUBE Mobile Apps to Chromecast devices and TVs with built-in Chromecast using Google Chromecast technology.
Hisense Smart TV support 
Amazon Fire TV support 
Legacy Linux STBs (Albis/SML/MAG/Motorola) support 

How many licenses do I need? 

SmartTUBE is licensed according to the number of service accounts and active devices. You can purchase one or more simultaneously active licenses of the following subtypes:

  • License by accounts: This method considers only active service accounts — accounts with the status other then SuspendedTrial closedClosedDeleted, regardless of whether the subscriber uses the services or not.
  • License by devices: This method considers only active devices — devices with a non-empty UID and linked to the active account, which were authorized at least once and (optional) with the date of the last authorization is no more than N days ago. Operator can specify which device types will be considered by this license.
  • License by service account with devices: This method considers only active service accounts to which only the specified types of devices can be linked. The operator should specify the number of active devices licensed under one license.

SmartTUBE Apps

SmartTUBE Apps are a range of user-friendly and highly customizable applications compliant with the most current streaming industry standards. Tailored for popular device platforms, these applications seamlessly integrate established user interaction patterns to offer a superior viewing and application experience. Users have access to a diverse content selection, including live TV, video-on-demand, catch-up TV, nPVR, and shared TV recordings.

Note:  As we continually enhance the UI and UX of SmartTUBE Apps, please note that the screenshots below might not reflect the latest versions.

Home Screen

The Home screen is the first screen the user sees after loading the app or hitting the ‘Home’ button. Operators can customize it’s layout by managing Top banner, Main menu, and a set of Content rails.

Top Banner

Operator can choose one of the following options to display the Top banner:

  • Regular banner: A regular opaque banner with a clear bottom edge, not overlapped by any other UI elements.
  • Faded banner: An opaque banner with a faded bottom edge typically overlapped by the main menu and first content rail. Optionally, the faded banner can automatically play the movie trailer after a set amount of time when it is in focus.

Main Menu

The Main menu on large-screen devices can be displayed in either a vertical or horizontal arrangement. For horizontal layouts, menu items can be enhanced with icons or presented as plain text. The Main menu may include the following items:

  • TV: Displays channels and programs as a vertical scrollable list for easy navigation. Includes detailed information about current broadcasts, channel guides, and completed/upcoming programs with description and screenshot.
  • EPG: Displays a classic EPG grid showcasing TV programs’ durations on a horizontal timeline. Users can to select a program for additional information and functions, with a window displaying the current broadcast.
  • Search: Allows to search through all types of content, displaying TV programs and VoD content on one screen.
  • Movies: Displays the movie library with posters and titles in a mosaic view or as a list of content rails.
  • TV Series: Displays the series library featuring posters and titles presented in either a mosaic view or themed rails list. Each poster serves as a visual representation of a series, enabling users to delve into a series card. From there, subscribers can choose the desired season and episode for viewing.
  • Radio: Opens the list of IP radio stations available for listening.
  • My [operator name]: Allows a subscriber to access personalized content such as watch history, favorite channels and movies, personal recordings, reminders, and purchased movies.
  • Applications: Provides access to the library of Android apps available on Android TV / Android STB devices, if the SmartTUBE App acts as a launcher.
  • Settings: Provides access to the user profile settings and system settings (time zone, network settings, video output modes, etc.).

The main menu on mobile devices typically includes the following items: Home, My, Search, and Downloads. The Downloads section allows users to access content that has been downloaded for offline viewing. Additionally, users can navigate to the TV, Movies, and Series pages using the top menu located on the Home screen.

Content Rails

Operators have the ability to populate the content pages (Home, Movies, Series, and My Profile) with an unlimited number of predefined and custom Content rails:

  • TV Channels: Display of TV channels presented as posters of currently streaming programs. User-favorited channels are prioritized, followed by operator-sorted channels.
  • Manually recommended content: Curated xVoD content or TV programs manually selected by the operator.
  • Auto recommended content: Automatically generated xVoD content based on user viewing history, leveraging the SmartTUBE Recommender module.
  • Top 10 TV programs: Compilation of the most popular TV programs viewed by all subscribers.
  • Applications: List of integrated applications defined by the operator. Available only for the Android TV / STB devices, if the SmartTUBE App is a launcher.
  • Continue watching: List of xVoD content and TV programs that the user has not finished watching.
  • Watch history: Chronological listing of xVoD content and TV programs watched by the user.
  • Favorite channels: Channels marked as favorites by the user.
  • Favorite movies: Movies marked as favorites by the user.
  • Personal recordings: Recordings of TV programs initiated by the user within the nPVR service.
  • Reminders: Alerts for upcoming TV programs set by the user.
  • Purchased movies: List of xVoD content purchased by the subscriber.
  • Custom rails: Operator-filtered xVoD content or TV programs based on various content and subscriber’s account attributes (for example, French comedies of 80-th, Modern Bollywood movies, Jackie Chan action movies, etc.). The filtered TV programs and xVoD content can be sorted by various attributes.

TV-related Content

SmartTUBE Apps provide users with access to the comprehensive functionalities offered by the SmartTUBE solution for TV-related services:

Channel List with Program Guide: Displays channels and programs in a vertical scrollable list for easy navigation. Includes detailed information about current broadcasts, channel guides, and completed/upcoming programs with description and screenshot.
EPG Grid: A classic Electronic Program Guide available for large-screen devices. TV programs are displayed horizontally with durations on a timeline. User can select a program for more info and functions, with a window showing the current broadcast.
Theme-Based Channel Filtering: User can filter channels by themes (such as sports, news, entertainment) or genres of currently airing programs (if the genres are provided by the EPG provider) by opening a filtering panel.
Detailed TV Program Information: Provides in-depth details about TV programs in full-screen view, including extended description, cast, recording quota used, availability period of recorded programs, and other relevant data.
Reminders: Set alerts for upcoming TV programs with a pop-up before the show starts. All reminders are displayed in a dedicated menu.
Upcoming Broadcasts Recording: Allows users to schedule recordings of individual programs or entire series episodes for viewing at a later time. The list of all recordings can be found in a dedicated menu.

Favorite Channels: 
User can mark preferred channels for quick access. The favorite channels appear first on the Home screen and in the channel filtering section.
Watch History: The list of recently viewed programs, with the option to resume from where the user left off. Users can also choose to clear their entire watch history or remove individual items.

The full-screen player in SmartTUBE Apps for large-screen devices supports the following features:

Playing live streams and rewinding, fast forwarding, and pausing catch-up content.
Revealing the program guide rail for the current channel, enabling setting reminders or recordings for upcoming programs. Available for the large-screen apps only.
Adjusting the stream’s aspect ratio, selecting the audio/video/subtitle track, viewing the program details, and checking the stream technical information.
Quick channel selection panel allowing to switch channels visually without leaving full screen mode.

The full-screen player in SmartTUBE Apps for mobile iOS / Android devices supports the following features:

Playing live streams and rewinding, fast forwarding, pausing catch-up content, as well as selecting audio/video/subtitle tracks.

Adjusting the stream’s aspect ratio, sharing the stream across other subscribers’ devices, and exploring additional functions.

The full-screen player in SmartTUBE Apps for mobile iOS / Android devices can be controlled by tapping, swiping, and sliding:

  • Short tap: Opens playback controls and settings menu, which disappear after 3 seconds of no user activity.
  • Double tap in the center: Switches between full-screen and portrait mode.
  • Double tap on the left/right area: Rewinds backward/forward for 10 seconds.
  • Swipe left/right: Switches channels.
  • Slide by the left/right area: Controls the brightness and volume, respectively:

VoD Content

SmartTUBE Apps offer fast navigation and search within the VoD content library, payment options, a recommendation tool that suggests relevant content based on subscriber preferences, and other helpful features:

VoD Content Catalog: Displays available content with posters and titles in a mosaic view or as a list of themed rails.
Content Filtering: Users can filter content by type (movies, series, for kids), genre (adventure, comedy, detectives, etc.), production year, country, and other criteria.
Detailed Content Description: Provides information on the movie description, directors, actors, ratings, age restrictions, release year, screenshots, etc. for selected content.

Detailed Series Description: In addition to the information described above, this feature offers a convenient way to select from the various seasons and episodes of a series.
Trailer Viewing: Users can watch trailers within the movie card if available.
List of Favorites: Allows users to save their preferred movies for convenient access and later viewing.

Full-Screen Player: Content is played in full-screen mode with playback controls, video quality and aspect ratio options, audio track and subtitle selection, content recommendations (in the large-screen apps), adding to favorites, and technical information about the stream (in the large-screen apps).

Skip Opening and Credits: The full-screen player allows users to skip the movie’s opening credits and jump straight into the action. At the end of a series episode, users can bypass the final credits and start the next episode immediately. This feature includes a timer for auto-skipping the opening and automatically starting the next episode, with progress displayed on the button.
Content Bookmarks: Users can add bookmarks to specific movie moments. A single movie can have multiple bookmarks.

.

.

Radio Stations

SmartTUBE Apps for STB and Smart TV support the radio station broadcasting:

Media Player

The Media player integrated into SmartTUBE Apps offers all the essential features for a seamless and enjoyable content-watching experience. It may support different audio/video codecs and streaming protocols, such as MPEG-DASH and/or HLS, depending on the device.

Adaptive Streaming Support: Automatically switches between bitrates within the media stream based on network bandwidth. This prevents playback from stopping when bandwidth decreases; instead, it shifts to a lower quality stream. When bandwidth improves, video quality is restored.
Stream Quality Options: In addition to automatic adaptive switching between stream bitrates, users can also manually select their preferred stream quality.
Playback Control: Lets users rewind, fast forward, and pause catch-up and xVoD content. When a video is rewound or paused, thumbnails appear above the progress bar.
Audio Track Selection: Users can choose from multiple audio tracks available within the stream.
Content Bookmarks: Users can add bookmarks to specific movie moments. A single movie can have multiple bookmarks.
Subtitles and Teletext Display: Apps can display subtitles and teletext in various formats, including DVD, DVB, SSA/ASS, SRT, WebVTT, CEA-608/708 Closed Captions, SMPTE-TT, and Teletext. Supported formats may vary by device.
Aspect Ratio Options: Enables users to align the content frame’s aspect ratio with their device’s screen.
Stream Details: Depending on the stream type, users can view information such as the current bitrate, the number of decoding errors, and other relevant details that may be helpful for troubleshooting and contacting technical support. Available for the large-screen apps only.
Playback from a Saved Position: Apps remember where a user stopped watching a movie or program and provide the option to resume from that point or start over.
Processing of Ad Inserts: The app for large-screen devices can detect the start/end marks of ad inserts within the stream. It can handle these ads in different ways, such as preventing users from rewinding during catch-up playback. Additionally, the media player can work with VAST servers within the AVoD service.

Content Purchase and Subscriptions

SmartTUBE Apps offers users a range of features to manage service subscriptions, purchase content, and stay updated on options that enhance their service experience:

  • Service Management Menu: Users can view and manage available services, including adding or canceling subscriptions, along with detailed information about offered content and terms.
  • Subscription Recommendations: The app highlights both current and additional subscription options, with non-subscribed channels clearly marked and easily accessible for purchase.
  • Content Purchase Options: Movie/series costs and purchasing options are displayed on detailed information cards.
  • Purchase History: Subscribers can track their transactions in the ‘Settings’ menu.

Screen Sharing

The Screen Sharing feature allows users to effortlessly transfer their streaming session between devices, such as from a mobile device to a Smart TV or STB, and vice versa. The SmartTUBE platform supports the following technologies to implement the Screen Sharing feature:

  • Apple AirPlay: Enables screen sharing from SmartTUBE iOS Mobile App to other devices that support AirPlay 2 technology.
  • Google Chromecast: Enables screen sharing from SmartTUBE iOS/Android Mobile App to the Google Chromecast devices and TVs with built-in Chromecast support.
  • SmartLabs Screen Sharing: A proprietary technology enabling user to transfer streaming between devices using SmartTUBE Apps. Users can continue watching a movie or TV channel on a mobile device or move content from a mobile device to a large screen while maintaining the current position. After transferring, playback can be controlled remotely from the mobile device.

Content Search Screen

SmartTUBE Apps allow users to search through all content types, including TV programs, movies, and external services like YouTube. The search is performed by title (in the current app’s UI language and original title) and description, with suggestions appearing as user type. The Apps support multilingual keyboards and shows structured results for various content types on the same screen.

Displaying Operator Messages

The operator can send subscribers messages that they may open immediately or later in the message history. The message can contain both text and images. Urgent messages are displayed as a full screen window. Watermark messages are overlaid on top of the video stream.

Logging In

Depending on the operator’s settings, subscribers can access services by logging in with or without username and password entry. New users may also be offered a trial period to explore the services and app features.

User Profiles

If multiple users share an account, they can create personal Profiles to customize settings like parental controls, channel sorting, and content restrictions. Profiles are shared across all devices and can be PIN protected. The master Profile can manage other profiles. This helps prevent unauthorized access to paid or adult content by minors and provides personalized content recommendations.

Profile general settings

Kids profile gives parents control over their children’s viewing experience. In addition to the maximum age level for TV channels and VOD content, the Kids profile allows to manage the downtime interval and the daily viewing limit.


Kids profile settings

System Settings

Users can access various system settings, including time-zone correction, UI language, audio/subtitle language prioritization, timer to stop playback when idle, video aspect ratio, and player menu auto-hide timeout. Support page provides information for contacting operator and sending reports for technical analysis.

STB users have additional options:

  • Reset to factory settings
  • Firmware update
  • Standby timer
  • Video/audio output format
  • Network settings

Supported Devices

SmartTUBE solution supports a wide range of devices, allowing IPTV / OTT operators to reach a larger audience. The list of supported devices can be expanded through integration work. Below are the device requirements. These requirements do not include restrictions related to the use of various protocols and formats of video delivery (HLS, DASH, etc.), CAS/DRM systems, and other restrictions related to the hardware and software implementation of the listed devices by their manufacturers.

Linux based STB

To run SmartTUBE App on STB using a Linux kernel OS, you need to have SmartSDK. At the moment SmartSDK is supported on hardware platforms HiSilicon, STMicroelectronics, Amlogic, Broadcom, Sigma Designs from STB manufacturers such as SmartLabs, Albis, Arris, and others. To clarify the list of supported hardware platforms and integration options, please contact SmartLabs representatives.

iOS

  • iPad with iOS 11 or later
  • iPhone with iOS 11 or later

Android

The devices must comply with the Android Compatibility Definition Document (CDD) requirements.

  • Tablet PC with Android 5.0 Lollipop (API Level 21) or later
  • Smartphones with Android 5.0 Lollipop (API Level 21) or later

Web Browsers

Web Browser OS Minimal version supported by the app Minimal version supported by the app with Widevine DRM playback
Google Chrome Windows / Linux / MacOS ⩾ 69 ⩾ 128
Mozilla Firefox Windows / Linux / MacOS ⩾ 100 ⩾ 100
Microsoft Edge Windows all ⩾ 88
Apple Safari MacOS ⩾ 11 Safari does not support Widevine DRM

We strongly recommend using installations with Widevine DRM enabled. Support for other web browsers is on request.

Smart TV

  • LG with WebOS 4.0 and later Support for Netcast and earlier versions of WebOS could be provided by additional request and subject to technical feasibility (depends on used DRM, streaming protocol, and etc.).
  • Samsung with Tizen OS SmartTUBE App support all model years available for publishing at the Samsung app store portal
  • Hisense (VIDAA OS)
  • Whale OS — an operating system for Smart TV, which is now integrated into the products of many world-famous brands, including Philips, TCL, Haier, AOC, Sharp, BenQ, Konka, Changhong, NovaTek, Amazon, Google, Alibaba, Huawei, DSP Group, and etc.

Android based STB and Android TV

  • Supported OS Android Open Source Project (AOSP) and Android TV v9.0 or later. See also the requirements for AOSP STBs.
  • The devices must comply with the Android Compatibility Definition Document (CDD) requirements.
  • SmartTUBE App on AOSP devices can be installed as a Launcher.

Amazon Fire TV

  • Amazon Fire TV Stick Lite
  • Amazon Fire TV Stick
  • Amazon Fire TV Stick 4K
  • Amazon Fire TV Stick 4K Max
  • Amazon Fire TV Cube

Support for Device Features

Linux STB Android STB iOS Android 5.0
and later
Samsung
SmartTV (Tizen)
LG
Smart TV (WebOS)
Multicast Yes Yes No No No No
Voice search/input Yes
(using BT RCU)
Yes
(using BT RCU)
Yes
(Native)
Yes
(Native)
Yes
(Native)
Yes
(Native)
External applications Yes Yes No No No No
AirPlay No No Yes No No No
Chromecast Sender No No
Yes
Yes No No
Android/iOS native PiP No No Yes* Yes No No
Offline content No No
Yes
Roadmap No No

* The PiP feature is available on iOS devices for HLS streams only. 

Support for Content Delivery Protocols and DRM Systems

Device model / Technology Widevine / DASH PlayReady / DASH FairPlay / HLS
Samsung Legacy (2012–2015 models) No No No
Samsung Tizen (2015 and 2016 models without software updates installed) No Yes No
Samsung Tizen (2016 models with software updates installed) Yes Yes No
Samsung Tizen (2017 models and later) Yes Yes No
LG NetCast (models until 2014) No No No
LG WebOS 2.x (models until 2016) No No No
LG WebOS 3.5 and later (2017 models and later) Yes Yes No
SmartLabs STB, Android 5.0 and later Yes No No
iOS 11 and later Not recommended No Yes

SmartMEDIA Overview

SmartMEDIA Introduction

Download PDF

The SmartMEDIA media server, developed by SmartLabs, is designed to deliver video content over IP networks. It provides transcoding, segmentation, encryption, recording and delivery of audio/video content for both managed IP (IPTV) and unmanaged IP (OTT) networks.

SmartMEDIA supports a variety of streaming protocols (MPEG-DASH, HLS, RTSP), video resolutions (from SD to UHD) and codecs (H.262/MPEG-2, H.264/AVC, H.265/HEVC, various audio codecs, etc.), allows you to deliver media content to a wide range of subscriber devices and players, including set-top boxes, browsers, Smart TVs, Apple iOS devices, Android devices, etc.

Solutions based on SmartMEDIA can automatically distribute the load between video servers depending on the client’s location and requested content for high performance and fault tolerance. This allows you to build distributed video content delivery networks (CDN) in particular.

SmartMEDIA architecture (click to enlarge)

Key Features of SmartMEDIA 

  • High scalability with support for both centralized and distributed solutions.
  • High reliability due to the ability to build failover clusters with no single point of failure.
  • Deploy the hardware platform quickly and easily with standard servers and storage systems.
  • A wide range of supported formats (from SD to UHD), codecs (H.262/MPEG-2, H.264/AVC, H.265/HEVC and others), as well as integration with popular content protection systems and subscriber devices.
  • The SmartMEDIA media server software is running Linux on top of the x86_64 platform.

Software Versions

The difference between the SmartMEDIA Legacy and SmartMEDIA Ultra versions is the support for the feature “CENC->CVBS On-the-fly Re-encryption” by the Ultra version.

This feature is intended to re-encrypt MP4 chunks prepared for adaptive streaming (HLS or DASH) from one encryption scheme to another “on the fly”, i.e. without saving the re-encrypted copy to the repository. This saves disk space by storing only one copy of encrypted content (for example, for Widevine DRM). At the same time, players using a different content protection system (for example, Apple FairPlay DRM) can also decrypt and play this content. Currently, reencryption from the cenc scheme (AES-CTR) to the cbcs scheme (AES-CBC with template encryption) is supported according to the standard ISO/IEC 23001-7 “Common encryption in ISO BMFF files”. 

VoD Services

Using the SmartMEDIA media server, IPTV/OTT service providers can develop a wide range of services for their subscribers, the entire list of which can be generalized to the following services: LiveTV (multicast), VoD and nDVR.

VoD Services

VoD (Video on Demand) is a set of services for targeted video content delivery (for example, movies, serials, etc.) to end-user devices using IP networks. For VoD-services the content should be properly prepared (transcoded, segmented, encrypted and indexed) and stored in a storage for future transfer to the devices. These steps are implemented in SmartMEDIA as follows:

VoD

VoD Content Preparation Stages

1. Segmenting and Playlist Generation

VoD content should be segmented into chunks according to MPEG-DASH and HLS protocols. Chunked content will be packaged in TS and/or MP4 containers and recorded to the storage.

Requirements for Source Files

Supported containers:

  • SPTS MPEG2-TS (ISO/IEC 13818-1, ITU-T);
  • MP4/ISO BMFF (ISO/IEC 14496-12 — MPEG-4 Part 12);
  • MKV (Matroska).

Supported codecs:

  • AAC, AC3, DTS — for audio;
  • H.262/MPEG2, H.264/AVC, H.265/HEVC — for video.

Additional requirements:

  • If you’re going to use adaptive bitrate streaming (ABR), all video streams should have the same GOP structure and have synchronous key frames (I-frames).
  • The value of DTS counters for audio and video samples should not differ by more than 1.5 seconds.
  • The value of DTS counters should increase monotonically.
  • If the PMT table in the MPEG2-TS container was changed, a table version change is required.
  • There should be no CC errors in the TS-stream.

POSIX-compatible file systems are supported.

Playlists with chunk references and other metadata will be generated as well as media files. Playlists will be stored in the same directory as the chunks.

2. Encryption

To protect against unauthorized playback and copying, content can be encrypted. In this case, the encryption will be applied before writing to the storage.

At the moment, supported encryption standard is ISO/IEC 23001-7: 2015 Part 7 (Common encryption in ISO base media file format files); the ISO BMFF/MP4 Fragmented container is supported. Any CENC-compatible DRM system can be used, for example Google Widevine or Microsoft PlayReady.

3. Content Playback

The subscriber device requests the playlists and chunks via the HTTP protocol and plays them. The solution includes an nginx HTTP server, which performs content delivery.

nDVR Services

Unicast LiveTV and “network video recorder” (nDRV) services mean the retransmission of digital streams (for example, TV channels) with individual (unicast) delivery to subscriber devices over IP-networks. Examples of nDVR services include such services as TimeShifted TV (TSTV), PauseLive, or a network personal video recorder (nPVR).

To implement these services, streams have to be recorded onto storages and be delivered to the subscriber’s device upon request. The content processing path from ingestion till delivery to the end-user by the SmartMEDIA components are shown in the following scheme:

LiveTV

nDVR Content Preparation Stages

1. Streams Injection

Incoming TV streams (multicast or unicast streams in the TS container) should be injected into SmartMEDIA Conveyor service.

Incoming streams must meet the following requirements:

  • Container: SPTS MPEG2-TS (ISO/IEC 13818-1, ITU-T).
  • Protocols:
    • UDP over IP Multicast (without RTP encapsulation);
    • HTTP (MPEG2-TS stream over HTTP);
    • HLS according to draft-pantos-http-live-streaming-05, without encryption.
  • Supported video codecs: H.262/MPEG2, H.264/AVC, H.265/HEVC.
  • Video resolution: up to 4K, up to 60fps. Both progressive and interlaced streams are supported.
  • Supported audio codecs: AAC, AC3, MP2, MP3, DTS.

2. Transcoding

The transcoding of Live-streams is implemented using Intel codecs that are part of the Intel Media SDK, and requires the use of compatible processors (CPUs) and chipsets. For more information on hardware requirements, see the Intel website (https://software.intel.com/en-us/media-sdk).

The transcoder function includes decoding, filtering (audio and video) and encoding. The incoming stream must be unencrypted (otherwise it can not be decoded).

The following filters can be applied to video streams:

  • Deinterlacing (applied automatically if the incoming stream is interlaced);
  • Resize;
  • Changing the frame rate (fps).

Target formats can be:

  • Video codecs: H.264/AVC, H.265/HEVC;
  • Video format: up to 4K, up to 60fps, progressive scan;
  • Audio codecs: AAC.

3. Segmentation, Indexing and Recording of Content

In order to provide nDVR services, as well as Live over HLS and DASH protocols, media streams must be recorded into the storage. To achieve the highest performance when delivering content to subscribers, SmartMEDIA records streams in the same form as they will be delivered to subscriber devices, all stream conversions (remultiplexing, encryption, etc.) are performed during recording.

SmartMEDIA supports 2 recording modes:

  • Main mode, or mode with remultiplexing: the incoming stream is completely demultiplexed, only the desired tracks (audio and video) are used. Then the elementary stream is encrypted if necessary, packed into the desired container (MPEG2-TS or ISO BMFF) and written into the storage.

    To work in this recording mode, the incoming stream should not be encrypted, otherwise all information about encryption will be lost and it will not be possible to reproduce it.
  • Pass-Through: incoming TS-stream is written in the form as it comes to the server. The stream is not remultiplexed, it is divided into chunks and written into the storage. In particular, all timestamps are stored in the stream, as well as CC errors, if they were present in the incoming stream.

    In this mode, the server can also accept encrypted TS streams if the TS packet structure is preserved and the NAL-unit headers are not encrypted (for example, DVB Simulcrypt or Common Encryption for MPEG2-TS encrypted streams).

Recording can be done both in POSIX-storages (local file systems, NFS, external storages), and in external object storage using the Amazon S3 protocol.

Simultaneously with the segmentation, the stream is being indexed. Based on the indexes HLS/DASH/Smooth Streaming playlists will be created later. Currently, the supported index storage is MongoDB.

It also should be considered that:

  • if you’re going to use adaptive bitrate streaming (ABR), all video streams should have the same GOP structure and have synchronous key frames (I-frames);
  • the value of DTS counters for audio and video samples should not differ by more than 1.5 seconds;
  • the value of DTS counters should increase monotonically;
  • if the PMT table in the MPEG2-TS container was changed, a table version change is required;
  • there should be no CC errors in the TS-stream.

4. Encryption

To protect against unauthorized viewing, copying, etc. during the recording process, the content can be encrypted according to one of the following standards:

  • HLS-AES — only the MPEG2-TS container is supported and subsequent delivery over the HLS protocol. The entire chunk, including the headers of TS packets, is encrypted using the AES-CBC algorithm with PKCS#7 padding. Information about encryption can only be added to the HLS playlist (#EXT-X-KEY tag). As a DRM system, Verimatrix Adaptive CAS or another DRM with same API for obtaining encryption keys can be used.
  • ISO/IEC 23001-7: 2015 Part 7 (Common encryption in ISO base media file format files), abbreviated to CENC. The ISO BMFF/MP4 Fragmented container is supported. Only the elementary stream (payload) is encrypted, the container and the headers of the NAL packets of the video stream remain unencrypted. The data is encrypted using the AES-CTR algorithm. Any compatible system can be used as DRM, for example: Google Widevine or Microsoft PlayReady. The Widevine Modular DRM API or SmartLabs UDRM API can be used for encryption keys retrieval.

5. Playlists Generation

The Playlist Generator component generates HLS or DASH playlists for the recorded content by end-user devices requests.

HLS playlists generation is supported for unencrypted content, as well as encrypted with the HLS-AES standard content recorded in the MPEG2-TS container.

DASH playlists generation is supported for content recorded in the ISO BMFF/MP4 Fragmented container.

6. Content Playback

The subscriber device requests chunks for audio and video and plays them. The solution includes an nginx HTTP server, which performs the delivery of chunks over the HTTP protocol.

Transcoding

SmartMEDIA Transcoder

The SmartLabs SmartMEDIA Transcoder product allows you to perform transcoding of live input streams to multi profile adaptive bitrate, DASH or HLS, streams for OTT delivery. This software product runs on standard off-the-shelf hardware with Intel CPUs with QSV support or NVIDIA GPUs with NVENC support.

The solution architecture deploys two components of the SmartMEDIA Content Delivery Platform — SmartMEDIA Conveyor and SmartMEDIA Transcoder, which can be run on separate nodes and provide high stability and scalability. Transcoding profiles can be managed via a convenient web interface.

Key Advantages

  • The solution allows you to use the most common generic hardware technologies for transcoding — Intel QSV and NVIDIA NVENC. You can reuse the existing hardware or opt for the new one. Wide range of Intel CPUs & NVIDIA GPUs is supported.
  • Native integration with Intel and NVIDIA decoding/encoding API, unlike the ffmpeg-based solutions, ensures higher stability and lower resource utilization.
  • Advanced algorithms avoid desynchronization of target streams and tracks, which often happens with ffmpeg-based solutions.
  • Transcoder service can be shared between multiple Conveyor services, and vice versa. So you can build an optimal system configuration and, as a result, save on CAPEX & OPEX.
  • High fault tolerance and easy scalability are the basis of the solution.
  • Web-based GUI makes it easy to manage settings and channel distribution between transcoding servers.
  • Native integration with SmartTUBE Service Delivery Platform.

QSV or NVENC

Taking into account factors such as hardware cost, power consumption, rack space, redundancy, and transcoding quality, we can conclude that the NVENC-based solution is much more cost effective in most cases. Tests of the SmartLabs SmartMEDIA Transcoder have shown that the price per transcoded channel in a NVENC-based solution can be up to 36% cheaper than in an QSV-based one. We present you a comparison of two indicative 6U installations:

  • QSV-based (non-redundant)
    1x 6U server based on Supermicro MBE-628E-820D MicroBlade Enclosure and CPU Intel Xeon E-2224G
    vs.
  • NVENC-based (non-redundant)
    3x 2U servers built on Supermicro SYS-2029GP-TR Barebone and GPU NVIDIA RTX A2000
Intel QSVNVIDIA NVENCDifference
Indicative HW price$ 61 414$ 25 371> 2 times cheaper
Number of channels28018036%
Channels per unit473036%
Price per unit$ 10 236$ 4 229> 2 times cheaper
Price per channel$ 219$ 141⅓ cheaper

In addition, as of June 2022, the average delivery time of the QSV-based solution is 2–4 months, while the NVENC-based one — 1 month.

Note: All examples of prices and delivery times above are indicative, and the company is not responsible for their accuracy at the time of reading.

Component Overview

SmartMEDIA Conveyor

The SmartMEDIA Conveyor service is responsible for remultiplexing, segmenting, indexing and recording LiveTV streams to the storage.

Content can be delivered to the SmartMEDIA Conveyor server within the MPEG2-TS container using one of the following protocols:

  • UDP over IP Multicast (without encapsulation in RTP),
  • HTTP Stream,
  • HLS (according to draft-pantos-http-live-streaming-07), without encryption.

SmartMEDIA Conveyor performs:

  • remultiplexing,
  • media data encryption (if necessary),
  • recording to the storage,
  • index generation and writing indexes to the database (MongoDB).

Adaptive Streaming Support

To record several streams of the single channel that have different bit rates (a.k.a. Adaptive Streaming), SmartMEDIA Conveyor synchronizes them at the recording stage and creates one index record for all of the chunks of different bitrates of the same time interval.

SmartMEDIA Transcoder

SmartMEDIA Transcoder service receives a stream of media samples from the Conveyor over the TCP connection, transcodes the stream and sends the resulting stream (or multiple streams in case of ABR) back to the Conveyor. It can be started on the same host where Conveyor runs as well as on the other, ”remote” host and work over the TCP/IP network. SmartMEDIA Transcoder service uses proprietary protocol to exchange the data with Conveyor and cannot receive streams directly.

Dual Encryption Solution

HLS/FairPlay + DASH/Widevine

If your subscribers encounter unstable playback on iOS devices, then you have the only way — to integrate the native iOS player into your client apps.

Such a solution involves two challenges: 

  • DASH/WideVine is not supported natively by Apple. And Google’s solution based on Shaka player embedded has many issues with unclear deadlines for Google to fix. Apple’s recommendation on this is to use HLS/FairPlay.
  • It is not possible to use the same copy of content for HLS/FairPlay and DASH/WideVine because they use different encryption algorithms.

We have a solution!

The SmartLabs platform provides you two options:

  • Creating two copies of content
  • Performing on-the-fly re-encryption

To avoid using extra storage, we recommend a combination of both options — using a separate HLS copy for Live channels, keeping just a few minutes of recorded content in both formats, and performing on-the-fly re-encryption for recorded programs and xVoD content.

The diagram below will help you understand the solution workflow better.

Benefits

SmartMEDIA Recryptor — the module responsible for the on-the-fly re-encryption — uses the AES New Instructions (AES-NI) supported by a wide range of Intel or AMD CPUs. So, for example, if you need to adapt 50 TV channels for iOS subscribers, an installation with commonly used server processors will save you more than 23TB* of disk space and significantly in costs!

*Calculated for the 1-week TSTV service for 50 channels with adaptive bitrate: HD (4.5 Mbps) + SD (2 Mbps).

Multicast Content Protection

SmartMEDIA allows you to encrypt MPEG-TS content in real time according to the ISO/IEC 23001-9 (Common encryption of MPEG-2 transport streams) standard. The SmartCETS service allows you to encrypt multiple multicast streams simultaneously; the cets utility can be used to encrypt a single stream or MPEG2-TS files.

After receiving the list of input multicast streams, SmartCETS/cets requests keys for encryption from the key server over the SmartLabs UDRM protocol. Encrypted content is either written to a file or broadcast to another multicast group using the UDP protocol. For the SmartCETS service, the list of input streams for encryption along with other parameters must be specified in the configuration file. For the cets utility, all parameters must be passed as command-line arguments.

The following formats are supported:

  • Video: H.262/MPEG2, H.264/AVC, H.265/HEVC;
  • Audio: AAC/ADTS, AC3, DTS.

The utility also stores information about its work in the log, e.g. obtaining keys, stream errors, keys retrieval errors, etc.

CETS Encryption

Features of the Encryption Algorithm

Encryption is performed according to the ISO/IEC 23001-9 (Common encryption of MPEG-2 transport streams) standard, namely:

  • the original MPEG-TS container is saved (except PMT), unknown tracks are not encrypted;
  • in the PMT of the source stream, the descriptors described in ISO/IEC 23001-9 are added for each encrypted track;
  • the payload of each video/audio track found is encrypted;
  • the utility complies with ISO/IEC 23001-9 recommendations regarding the H.264/H.265 and AAC payload encryption (i.e., the payload of TS packets containing VPS/SPS/PPS/SliceHeader and ADTS Fixed header is not encrypted);
  • for H.262, AC3 and DTS, the payload of TS packets containing PES-headers (Packetized Elementary Stream) is not encrypted;
  • before each PES header, packets containing PSSH received from the key server for that track are inserted into the stream;
  • before each PES header, ECM (Entitlement Control Messages) with content corresponding to ISO/IEC 23001-9, pertaining to this PES, is inserted into the stream. If the ECM content does not fit into the payload of one TS packet, the next ECM packet will be inserted where its contents begin to act (and not at the beginning of the next PES packet).

Load Balancing and Failover

Scaling and Fault Tolerance within a Single Site

Can be implemented by:

  • using external fault-tolerant or clustered storage systems (POSIX and object storages);
  • reserving SmartMEDIA Conveyor services in “1 + 1” mode (Active/Standby);
  • reserving services for playlists generation in “N + M” mode (Active/Active).

Geographically Distributed Structure (CDN)

SmartMEDIA Redirector allows you to implement a geographically distributed solution for the media content delivery.

Functionality

  • HTTP (for DASH and HLS) and RTSP requests balancing.
  • Grouping the servers into logical farms.
  • Providing different balancing policies between the servers of the farm.
  • Setting priorities for specific servers.
  • Servers failover in the group.
  • Redundancy of server groups.
  • Caching information about the content availability on a specific server.

Balancing Criteria

  • IP-address/subnet of the subscriber — for specified subnets, the viewing order of server groups is assigned.
  • Availability of content on servers — farms are polled from the “best choice” for specific subnet till the backup one; if there is no content on all servers in the farm, the servers of the next farm are polled, etc .
  • When balancing requests between group servers, the availability of content on servers and the weight of servers are taken into account.

SmartCARE Overview

SmartCARE Introduction

Download PDF

The quality of video content delivery services directly depends on the quality of hardware performance on the operator’s side and the quality of the access network on the subscriber’s side. Network-level problems and problems on the operator’s platform affect the service quality and can lead to image freezing, reduced image quality, frame loss, and etc. Eventually, this has a bad impact on the user experience and may lead to the service cancellation. SmartCARE makes it possible for the operator to continuously analyze the quality of content delivery and quickly respond to emerging problems…

Advantages 

Integrated Monitoring System for IPTV and OTT 

SmartCARE supports collection and analysis of data for both of these delivery technologies: in managed networks (IPTV) as well as over the Internet (OTT). It enables an operator to use a unified solution for any service provision options.

Preventive Detection of Problems 

A unique feature of SmartCARE is the ability to detect potential areas of concern in advance. Using mathematical clustering techniques and decision-making algorithms SmartCARE is capable of online identification of dependencies (access networks, type of equipment, versions of applications, currently viewed content and many other parameters) for subscribers facing difficulties in obtaining services. SmartCARE analyzes this data and determines which subscribers with similar parameters are at risk. This data can be used to inform subscribers on possible problems and the ways to resolve them.

The Use of All Information Obtained 

SmartCARE uses both real-time data and all stored statistics, aggregating the entire information in a particular way for further prompt access.

SmartCARE provides real-time monitoring of current customer sessions and service quality (real-time monitoring, tracking).

And also you can filter and analyze the history of system events. For example, you can identify the decline in service quality by the average number of bitrate switches over a specified period of time: the fewer bitrate switches — the higher the quality.

Advantages of SmartLabs Ecosystem 

SmartCARE is pre-integrated with SmartLabs products — SmartTUBE Service Deliver Platform (Middleware), SmartMEDIA (recording and streaming server) and SmartTUBE Clients (for STBs, mobile devices, Smart TVs and PC/Mac). This allows you to reliably collect and analyze the entire range of data from all supported systems right out of the box. In addition, the technical support operators can see the middleware-related information (subscriber ID, tariff plan, territorial location, etc.) right on the SmartCARE dashboard, which reduces the time to process subscriber requests.

Convenient Set of Tools 

SmartCARE system makes the work of operations departments easier. Convenient and functional SmartCARE interface, which can be used by departments of monitoring, technical support as well as the team of service managers, makes it possible to timely identify the emergence and development of critical situations in the network and take measures to maintain the high level of service quality. The analysis of parameter dependencies for subscribers experiencing a deterioration in the service quality allows you to identify and eliminate problems quicker. The obtained data can be exported to CSV and PDF files as diagrams and tables.

Open API 

The open API allows to connect any 3rd-party end-user devices, players, media streamers and CDN components without the involvement of Smartlabs engineers, if needed.

Modularity and Scalability 

The use of the latest advanced data storage and processing technologies makes it possible for SmartCARE to build up a customer information system by adding extra system modules and data storing hardware almost without limits.

Accuracy and Completeness of Data 

SmartCARE collects the data from client devices, operator platforms (recording, streaming, storage servers), OSS/BSS, and edge routers. As a result, you receive more accurate and detailed information on the quality of the digital TV services you are providing.

Quick Data Presentation 

The data you requested is displayed in the interface very quickly regardless of the length of the time period you indicated in the filter. This is possible due to preliminary data aggregation by the SmartCARE system.

Key Features 

  • Working in IPTV / OTT networks
  • Supporting SmartLabs infrastructure and capable of integrating in the outside infrastructure
  • Supporting most customer premises devices
  • Analyzing data collected from client devices, operator platform (recording, streaming, storage servers), OSS/BSS, and edge routers
  • Analytics, monitoring, reporting tools
  • Real-time monitoring
  • Filtering events with accuracy to a specific subscriber
  • Filtering data by time interval
  • Setting up time interval for data aggregation
  • Monitoring the quality of DASH, HLS, MSS streaming
  • Creating custom dashboards
  • Includes all key metrics for quality assessment (the list of metrics is continuously expanded)
  • Timely and preventive notification on changes or problems in the system with the help of mathematical algorithms used for system behavior analysis
  • Exporting data to CSV and PDF as diagrams and tables
  • Creating reports on service consumption
  • Role model of system users

Supported End-User Devices 

SmartCARE can analyze data received from:

Devices with SmartTUBE app Installed

  • SmartLabs STBs & 3rd-party STBs 
  • Android / iOS mobile devices
  • Smart TV (Samsung, LG, Hisense, etc.)
  • Android TV devices
  • PC / Mac

Other Devices

Any 3rd-party devices supporting the SmartCARE End-User Device API.

How does it Work?

SmartCARE system has a client-server architecture. The basic analytics data are collected from client devices and live streaming servers and forwarded to the SmartCARE server for processing. Based on the incoming data, the server controls the quality of the provided services and identifies errors that can cause complete image loss, its distortion, rippling or freezing.

Methods of data collection by the SmartCARE system:

  • API for client applications;
  • Streaming servers’ syslog data, transmitted via UDP;
  • Data from Zabbix agents on the recording & streaming servers installed.

List of Metrics

The below metrics can be used for monitoring, analysis and reporting.

Monitoring client sessions

  • Unicast and multicast session count also known as Concurrent Media Sessions (CMS) available as real-time and historical values
  • Unicast and multicast session quality also known as Mean Opinion Score (MOS)  available as real-time and historical values
  • Number of online devices available as a real-time and historical indicator
  • Number of bitrate switches on client devices
  • CPU and memory utilization on client devices (real-time and average)
  • Number of content switches on client devices
  • Number of client device authorizations
  • Number of metadata loading errors on client devices (for example, errors when loading playlists)
  • Number of chunk loading errors on client devices
  • Average bitrate of content watching on client devices

Monitoring live streaming servers

  • Average bitrate of incoming / outgoing streams with filtering by server’s network interface
  • Usage of server’s network interfaces, i.e. average load on the interface (%) when processing incoming / outgoing traffic
  • Average value of IOWait system parameter

 Monitoring recording servers

  • Number of errors in the source streams delivery with filtering by the recording server / channel and detailing each error
  • Average bitrate of the source streams with filtering by the recording server / channel

Abnormalities

  • Summary of anomalies grouped by their probable causes
  • Detailed list of subscribers with low average session quality
  • Detailed list of errors related to the recording of source streams

Statistical Reports

  • Number and duration of channel views in Live & TSTV modes
  • Number of unique subscribers who watched a TV channel in Live & TSTV modes with detailed viewing duration
  • Number of successful & failed authorizations of client devices
  • Channel viewing statistics, detailed by unique client devices and the duration of viewing in Live & TSTV modes

Analyzed Events

Events from Client Applications

  • Subscriber authorization attempt (successful and failed)
  • Beginning of content viewing (channel, recorded show, movie)
  • “Keep alive” event during content viewing (every 2–5 minutes, configurable)
  • Start, stop, rewind, pause during content viewing
  • Critical low memory
  • Finishing of content viewing
  • Changing the bitrate during content viewing
  • Delay between the request for content and the beginning of its playback
  • Start and end of stream buffering
  • TV programs change
  • Abnormal change in the CPU and memory load
  • Abnormal change in the WiFi signal level
  • Switch to / from standby mode (for STB)
  • Internet connection loss
  • Transition to the key Client UI sections (the amount of information on these events depends on the set detalization level of analyzing user’s activity). For example:
    • main menu,
    • transition to the channel details (specifying the transfer point: from the channel list, recommendations, etc.),
    • transition to the movie details,
    • transition to the full screen viewing mode,
    • transition to the service management section,
    • transition to the settings section, etc.

Analysis of Streaming Server Logs

  • Starting a stream playback
  • Switching to another stream
  • Bitrate switching (video / audio quality changing)
  • Playlist uploading error
  • Chunks uploading error

Analysis of Source Stream Recording Server Logs

  • Source stream recording errors

Analyzed Parameters

Parameters within the Client Application Events

  • Content ID (channel, program, movie, local file, external VoD content)
  • URL of the external VoD content
  • Type of content viewed (Live, nDVR, VoD)
  • Number of frames with playback and decoding errors
  • Event type and its time on the client application
  • Frame rate
  • Number of frames played
  • Number of RAM page access errors
  • Number of load buffer underrun events
  • Content view start/end time
  • Join time (the time between the content request and the content begins to play)
  • Duration of the stream buffering
  • Rewind start time, duration and direction (backward / forward) — for TSTV-programs
  • Time of TV program change
  • Stream bitrate
  • Content viewing mode (online / offline)
  • Result of content launching (successful or failed)
  • Device ID (UID)
  • Subscriber ID (SmartTUBE SDP account number)
  • Device type (STB, iPad, Android, etc.)
  • IP address of the subscriber device
  • Version of the client application
  • Geo ID received during the authorization (region ID in the middleware dictionary or from the geolocation system)
  • Load buffer filling level
  • Wi-Fi signal strength (for STB with Wi-Fi module)
  • CPU and memory usage (for STB)
  • Duration of Internet connection absence
  • Amount of free space in critical directories
  • Custom fields (up to 10, for optional parameters transmitting)

Parameters within the Streaming Server Logs Events

  • Content ID
  • URL of the content requested (playlist /chunk)
  • Content request result (error or success)
  • Amount of information sent to the client application
  • Time the event was logged
  • Stream bitrate
  • Device ID (UID) — if it was sent in the HTTP request
  • Subscriber ID (SmartTUBE SDP account number) — if it was sent in the HTTP request
  • Full text of the client application User Agent string. Includes the following parameters:
  • version of the client application,
  • type of the subscriber device.
  • IP address of the subscriber device

Parameters within the Recording Server Logs Events

  • Hostname of the incoming streams recording server
  • Recorded channel
  • Recording error sign
  • Full text of the log entry
  • Bitrate of the recorded channels

Parameters from Zabbix Agents

  • Average CPU IOWait of the monitored server (streaming, recording, storage, etc.)
  • Incoming / outgoing bitrate of the monitored server network interfaces
  • Inbound / outbound utilization of monitored server network interfaces

Parameters from Edge Routers

  • Autonomous system IDs on the network section between the streaming server and the subscriber device
  • Data route change time

Parameters from OSS/BSS Systems

  • Subscriber ID in OSS / BSS
  • Subscriber connection address
  • Subscriber device type

SmartCARE UI

SmartCARE user interface is a dashboard that makes it possible to:

  • View detailed statistics by subscribers, detailing up to the end user or group of users for any time period — from one minute to several months.
  • Highlight problems reducing the service quality, with the information on problem scale and consequences.
  • Set up a personal dashboard for monitoring service quality — collect the necessary set of diagrams and reports on a single page and preserve the established filters and dates.
  • Export data to CSV and PDF files as diagrams and tables.
  • Apply a role model to distinguish SmartCARE users’ access to data.

UDRM Overview

SmartLabs UDRM (SmartLabs Universal DRM) is a one-size-fits-all  solution for DRM protection of content in IPTV and OTT networks. 

SmartLabs Universal DRM consists of the following components: 

  • A server for generating keys and issuing licenses; 
  • A set of client libraries. 

Libraries include CDM (Content Decryption Module) Modular DRM, PlayReady and Apple FairPlay developed by Google Widevine, Microsoft  and Apple. Other CDMs can be added. 

The diagram below illustrates the architecture of the solution.

SmartLabs UDRM supports the following client platforms: 

  • PCs running Windows, OS X or Linux with one or more of the following web browsers:
    • Chrome
    • Firefox 47
    • Safari
    • Edge
  • iOS-based devices (iPad, iPhone)
  • Android-based devices (tablets and smartphones)
  • Digital TV receivers (STB)
  • Smart TV devices
  • Other devices that support Widevine Modular DRM and Microsoft PlayReady

CDMs for each of the platforms are shown in the following Figure:

UDRM advantages

One DRM solution for IPTV and OTT broadcasting
Various client devices in IPTV and OTT networks use the same content assets. Creation of additional copies is not needed.

Turnkey solution for broadcasting
SmartLabs UDRM solution includes libraries for end-user applications and provides integration with SmartMEDIA, the service for content broadcasting. It is a turnkey solution for DRM-protected streaming.

Cost efficiency
The use of a single DRM solution for both IPTV and OTT networks and for all client device types reduces the cost of content storage significantly.

Expertise in DRM
We analyzed the features of existing DRM solutions to develop our turnkey solution. You do not have to spend your time on complicated integration procedures of each component, we have gathered everything you need in SmartLabs UDRM.

Supported Encryption Systems (DRM)

Standard edition of Smartlabs UDRM supports the following DRM systems:

  • Widevine Modular DRM
  • PlayReady
  • FairPlay

Due to the fact that this solution has a modular architecture, it also supports other DRMs that meet the following requirements:

  • Compliance with Common Encryption (CENC) standard.
  • Support the use of external resources for storing encryption keys (Key Server).

There are following particularities of integration of UDRM with encryption systems:

  • Protocol used for request and delivery of keys must be based on 128-bit keys, each of which must have a 128-bit identifier (Key ID) that is unique across the platform.
  • Key IDs should be used to request keys and / or licenses instead of, for example, content IDs. There are the following requirements:
    • Server and client should use HTTP or HTTPS to communicate with each other;
    • There should be no requests for HTTPS session termination at the level of proprietary components of the DRM;
    • A repeater of requests in the middle (MITM) must not affect the performance or security of the chosen DRM system.

Authentication and Authorization of Clients

There is no single conventional standard for authentication and authorization of client devices and end-users in DRM systems (Widevine, PlayReady, etc.). DRM systems can provide their own mechanism for identifying users and devices and providing access to content; moreover, there may be no such mechanisms in DRM systems at all.

SmartLabs UDRM offers a flexible mechanism for authentication and subsequent authorization. In addition to internal basic authenticators, SmartLabs UDRM supports all Java-based authenticators, thereby enabling developers to create any logic: queries to external systems using specialized API, additional data in the database, and so on. Thus, SmartLabs UDRM can be integrated with Middleware systems and tailored to specific client applications and DRM, security requirements for accessing content, etc.

Supported Formats for Storing and Delivering Media Content

SmartLabs UDRM does not impose restrictions on content storage / delivery formats or content encryption algorithms.

This solution is initially focused on MPEG-DASH and Common Encryption (CENC) protocols, so the content should be encrypted using 128-bit keys, and each key should have a 128-bit identifier.

The following protocols may be used as basic protocols:

  • MPEG-DASH supporting the ISO/IEC 23001-7 “Common encryption in ISO base media file format files” (CENC) standard;
  • Protocols that are based on MPEG2-TS and support the ISO/IEC 23001-9 “Common encryption of MPEG-2 transport streams” (CENC) standard.

Other protocols can also be supported: HLS, etc. Support for specific protocols depends on the DRM being used.

SmartMEDIA Overview

SmartMEDIA Introduction

Download PDF

The SmartMEDIA media server, developed by SmartLabs, is designed to deliver video content over IP networks. It provides transcoding, segmentation, encryption, recording and delivery of audio/video content for both managed IP (IPTV) and unmanaged IP (OTT) networks.

SmartMEDIA supports a variety of streaming protocols (MPEG-DASH, HLS, RTSP), video resolutions (from SD to UHD) and codecs (H.262/MPEG-2, H.264/AVC, H.265/HEVC, various audio codecs, etc.), allows you to deliver media content to a wide range of subscriber devices and players, including set-top boxes, browsers, Smart TVs, Apple iOS devices, Android devices, etc.

Solutions based on SmartMEDIA can automatically distribute the load between video servers depending on the client’s location and requested content for high performance and fault tolerance. This allows you to build distributed video content delivery networks (CDN) in particular.

SmartMEDIA architecture (click to enlarge)

Key Features of SmartMEDIA 

  • High scalability with support for both centralized and distributed solutions.
  • High reliability due to the ability to build failover clusters with no single point of failure.
  • Deploy the hardware platform quickly and easily with standard servers and storage systems.
  • A wide range of supported formats (from SD to UHD), codecs (H.262/MPEG-2, H.264/AVC, H.265/HEVC and others), as well as integration with popular content protection systems and subscriber devices.
  • The SmartMEDIA media server software is running Linux on top of the x86_64 platform.

Software Versions

The difference between the SmartMEDIA Legacy and SmartMEDIA Ultra versions is the support for the feature “CENC->CVBS On-the-fly Re-encryption” by the Ultra version.

This feature is intended to re-encrypt MP4 chunks prepared for adaptive streaming (HLS or DASH) from one encryption scheme to another “on the fly”, i.e. without saving the re-encrypted copy to the repository. This saves disk space by storing only one copy of encrypted content (for example, for Widevine DRM). At the same time, players using a different content protection system (for example, Apple FairPlay DRM) can also decrypt and play this content. Currently, reencryption from the cenc scheme (AES-CTR) to the cbcs scheme (AES-CBC with template encryption) is supported according to the standard ISO/IEC 23001-7 “Common encryption in ISO BMFF files”. 

VoD Services

Using the SmartMEDIA media server, IPTV/OTT service providers can develop a wide range of services for their subscribers, the entire list of which can be generalized to the following services: LiveTV (multicast), VoD and nDVR.

VoD Services

VoD (Video on Demand) is a set of services for targeted video content delivery (for example, movies, serials, etc.) to end-user devices using IP networks. For VoD-services the content should be properly prepared (transcoded, segmented, encrypted and indexed) and stored in a storage for future transfer to the devices. These steps are implemented in SmartMEDIA as follows:

VoD

VoD Content Preparation Stages

1. Segmenting and Playlist Generation

VoD content should be segmented into chunks according to MPEG-DASH and HLS protocols. Chunked content will be packaged in TS and/or MP4 containers and recorded to the storage.

Requirements for Source Files

Supported containers:

  • SPTS MPEG2-TS (ISO/IEC 13818-1, ITU-T);
  • MP4/ISO BMFF (ISO/IEC 14496-12 — MPEG-4 Part 12);
  • MKV (Matroska).

Supported codecs:

  • AAC, AC3, DTS — for audio;
  • H.262/MPEG2, H.264/AVC, H.265/HEVC — for video.

Additional requirements:

  • If you’re going to use adaptive bitrate streaming (ABR), all video streams should have the same GOP structure and have synchronous key frames (I-frames).
  • The value of DTS counters for audio and video samples should not differ by more than 1.5 seconds.
  • The value of DTS counters should increase monotonically.
  • If the PMT table in the MPEG2-TS container was changed, a table version change is required.
  • There should be no CC errors in the TS-stream.

POSIX-compatible file systems are supported.

Playlists with chunk references and other metadata will be generated as well as media files. Playlists will be stored in the same directory as the chunks.

2. Encryption

To protect against unauthorized playback and copying, content can be encrypted. In this case, the encryption will be applied before writing to the storage.

At the moment, supported encryption standard is ISO/IEC 23001-7: 2015 Part 7 (Common encryption in ISO base media file format files); the ISO BMFF/MP4 Fragmented container is supported. Any CENC-compatible DRM system can be used, for example Google Widevine or Microsoft PlayReady.

3. Content Playback

The subscriber device requests the playlists and chunks via the HTTP protocol and plays them. The solution includes an nginx HTTP server, which performs content delivery.

nDVR Services

Unicast LiveTV and “network video recorder” (nDRV) services mean the retransmission of digital streams (for example, TV channels) with individual (unicast) delivery to subscriber devices over IP-networks. Examples of nDVR services include such services as TimeShifted TV (TSTV), PauseLive, or a network personal video recorder (nPVR).

To implement these services, streams have to be recorded onto storages and be delivered to the subscriber’s device upon request. The content processing path from ingestion till delivery to the end-user by the SmartMEDIA components are shown in the following scheme:

LiveTV

nDVR Content Preparation Stages

1. Streams Injection

Incoming TV streams (multicast or unicast streams in the TS container) should be injected into SmartMEDIA Conveyor service.

Incoming streams must meet the following requirements:

  • Container: SPTS MPEG2-TS (ISO/IEC 13818-1, ITU-T).
  • Protocols:
    • UDP over IP Multicast (without RTP encapsulation);
    • HTTP (MPEG2-TS stream over HTTP);
    • HLS according to draft-pantos-http-live-streaming-05, without encryption.
  • Supported video codecs: H.262/MPEG2, H.264/AVC, H.265/HEVC.
  • Video resolution: up to 4K, up to 60fps. Both progressive and interlaced streams are supported.
  • Supported audio codecs: AAC, AC3, MP2, MP3, DTS.

2. Transcoding

The transcoding of Live-streams is implemented using Intel codecs that are part of the Intel Media SDK, and requires the use of compatible processors (CPUs) and chipsets. For more information on hardware requirements, see the Intel website (https://software.intel.com/en-us/media-sdk).

The transcoder function includes decoding, filtering (audio and video) and encoding. The incoming stream must be unencrypted (otherwise it can not be decoded).

The following filters can be applied to video streams:

  • Deinterlacing (applied automatically if the incoming stream is interlaced);
  • Resize;
  • Changing the frame rate (fps).

Target formats can be:

  • Video codecs: H.264/AVC, H.265/HEVC;
  • Video format: up to 4K, up to 60fps, progressive scan;
  • Audio codecs: AAC.

3. Segmentation, Indexing and Recording of Content

In order to provide nDVR services, as well as Live over HLS and DASH protocols, media streams must be recorded into the storage. To achieve the highest performance when delivering content to subscribers, SmartMEDIA records streams in the same form as they will be delivered to subscriber devices, all stream conversions (remultiplexing, encryption, etc.) are performed during recording.

SmartMEDIA supports 2 recording modes:

  • Main mode, or mode with remultiplexing: the incoming stream is completely demultiplexed, only the desired tracks (audio and video) are used. Then the elementary stream is encrypted if necessary, packed into the desired container (MPEG2-TS or ISO BMFF) and written into the storage.

    To work in this recording mode, the incoming stream should not be encrypted, otherwise all information about encryption will be lost and it will not be possible to reproduce it.
  • Pass-Through: incoming TS-stream is written in the form as it comes to the server. The stream is not remultiplexed, it is divided into chunks and written into the storage. In particular, all timestamps are stored in the stream, as well as CC errors, if they were present in the incoming stream.

    In this mode, the server can also accept encrypted TS streams if the TS packet structure is preserved and the NAL-unit headers are not encrypted (for example, DVB Simulcrypt or Common Encryption for MPEG2-TS encrypted streams).

Recording can be done both in POSIX-storages (local file systems, NFS, external storages), and in external object storage using the Amazon S3 protocol.

Simultaneously with the segmentation, the stream is being indexed. Based on the indexes HLS/DASH/Smooth Streaming playlists will be created later. Currently, the supported index storage is MongoDB.

It also should be considered that:

  • if you’re going to use adaptive bitrate streaming (ABR), all video streams should have the same GOP structure and have synchronous key frames (I-frames);
  • the value of DTS counters for audio and video samples should not differ by more than 1.5 seconds;
  • the value of DTS counters should increase monotonically;
  • if the PMT table in the MPEG2-TS container was changed, a table version change is required;
  • there should be no CC errors in the TS-stream.

4. Encryption

To protect against unauthorized viewing, copying, etc. during the recording process, the content can be encrypted according to one of the following standards:

  • HLS-AES — only the MPEG2-TS container is supported and subsequent delivery over the HLS protocol. The entire chunk, including the headers of TS packets, is encrypted using the AES-CBC algorithm with PKCS#7 padding. Information about encryption can only be added to the HLS playlist (#EXT-X-KEY tag). As a DRM system, Verimatrix Adaptive CAS or another DRM with same API for obtaining encryption keys can be used.
  • ISO/IEC 23001-7: 2015 Part 7 (Common encryption in ISO base media file format files), abbreviated to CENC. The ISO BMFF/MP4 Fragmented container is supported. Only the elementary stream (payload) is encrypted, the container and the headers of the NAL packets of the video stream remain unencrypted. The data is encrypted using the AES-CTR algorithm. Any compatible system can be used as DRM, for example: Google Widevine or Microsoft PlayReady. The Widevine Modular DRM API or SmartLabs UDRM API can be used for encryption keys retrieval.

5. Playlists Generation

The Playlist Generator component generates HLS or DASH playlists for the recorded content by end-user devices requests.

HLS playlists generation is supported for unencrypted content, as well as encrypted with the HLS-AES standard content recorded in the MPEG2-TS container.

DASH playlists generation is supported for content recorded in the ISO BMFF/MP4 Fragmented container.

6. Content Playback

The subscriber device requests chunks for audio and video and plays them. The solution includes an nginx HTTP server, which performs the delivery of chunks over the HTTP protocol.

Transcoding

SmartMEDIA Transcoder

The SmartLabs SmartMEDIA Transcoder product allows you to perform transcoding of live input streams to multi profile adaptive bitrate, DASH or HLS, streams for OTT delivery. This software product runs on standard off-the-shelf hardware with Intel CPUs with QSV support or NVIDIA GPUs with NVENC support.

The solution architecture deploys two components of the SmartMEDIA Content Delivery Platform — SmartMEDIA Conveyor and SmartMEDIA Transcoder, which can be run on separate nodes and provide high stability and scalability. Transcoding profiles can be managed via a convenient web interface.

Key Advantages

  • The solution allows you to use the most common generic hardware technologies for transcoding — Intel QSV and NVIDIA NVENC. You can reuse the existing hardware or opt for the new one. Wide range of Intel CPUs & NVIDIA GPUs is supported.
  • Native integration with Intel and NVIDIA decoding/encoding API, unlike the ffmpeg-based solutions, ensures higher stability and lower resource utilization.
  • Advanced algorithms avoid desynchronization of target streams and tracks, which often happens with ffmpeg-based solutions.
  • Transcoder service can be shared between multiple Conveyor services, and vice versa. So you can build an optimal system configuration and, as a result, save on CAPEX & OPEX.
  • High fault tolerance and easy scalability are the basis of the solution.
  • Web-based GUI makes it easy to manage settings and channel distribution between transcoding servers.
  • Native integration with SmartTUBE Service Delivery Platform.

QSV or NVENC

Taking into account factors such as hardware cost, power consumption, rack space, redundancy, and transcoding quality, we can conclude that the NVENC-based solution is much more cost effective in most cases. Tests of the SmartLabs SmartMEDIA Transcoder have shown that the price per transcoded channel in a NVENC-based solution can be up to 36% cheaper than in an QSV-based one. We present you a comparison of two indicative 6U installations:

  • QSV-based (non-redundant)
    1x 6U server based on Supermicro MBE-628E-820D MicroBlade Enclosure and CPU Intel Xeon E-2224G
    vs.
  • NVENC-based (non-redundant)
    3x 2U servers built on Supermicro SYS-2029GP-TR Barebone and GPU NVIDIA RTX A2000
Intel QSVNVIDIA NVENCDifference
Indicative HW price$ 61 414$ 25 371> 2 times cheaper
Number of channels28018036%
Channels per unit473036%
Price per unit$ 10 236$ 4 229> 2 times cheaper
Price per channel$ 219$ 141⅓ cheaper

In addition, as of June 2022, the average delivery time of the QSV-based solution is 2–4 months, while the NVENC-based one — 1 month.

Note: All examples of prices and delivery times above are indicative, and the company is not responsible for their accuracy at the time of reading.

Component Overview

SmartMEDIA Conveyor

The SmartMEDIA Conveyor service is responsible for remultiplexing, segmenting, indexing and recording LiveTV streams to the storage.

Content can be delivered to the SmartMEDIA Conveyor server within the MPEG2-TS container using one of the following protocols:

  • UDP over IP Multicast (without encapsulation in RTP),
  • HTTP Stream,
  • HLS (according to draft-pantos-http-live-streaming-07), without encryption.

SmartMEDIA Conveyor performs:

  • remultiplexing,
  • media data encryption (if necessary),
  • recording to the storage,
  • index generation and writing indexes to the database (MongoDB).

Adaptive Streaming Support

To record several streams of the single channel that have different bit rates (a.k.a. Adaptive Streaming), SmartMEDIA Conveyor synchronizes them at the recording stage and creates one index record for all of the chunks of different bitrates of the same time interval.

SmartMEDIA Transcoder

SmartMEDIA Transcoder service receives a stream of media samples from the Conveyor over the TCP connection, transcodes the stream and sends the resulting stream (or multiple streams in case of ABR) back to the Conveyor. It can be started on the same host where Conveyor runs as well as on the other, ”remote” host and work over the TCP/IP network. SmartMEDIA Transcoder service uses proprietary protocol to exchange the data with Conveyor and cannot receive streams directly.

Dual Encryption Solution

HLS/FairPlay + DASH/Widevine

If your subscribers encounter unstable playback on iOS devices, then you have the only way — to integrate the native iOS player into your client apps.

Such a solution involves two challenges: 

  • DASH/WideVine is not supported natively by Apple. And Google’s solution based on Shaka player embedded has many issues with unclear deadlines for Google to fix. Apple’s recommendation on this is to use HLS/FairPlay.
  • It is not possible to use the same copy of content for HLS/FairPlay and DASH/WideVine because they use different encryption algorithms.

We have a solution!

The SmartLabs platform provides you two options:

  • Creating two copies of content
  • Performing on-the-fly re-encryption

To avoid using extra storage, we recommend a combination of both options — using a separate HLS copy for Live channels, keeping just a few minutes of recorded content in both formats, and performing on-the-fly re-encryption for recorded programs and xVoD content.

The diagram below will help you understand the solution workflow better.

Benefits

SmartMEDIA Recryptor — the module responsible for the on-the-fly re-encryption — uses the AES New Instructions (AES-NI) supported by a wide range of Intel or AMD CPUs. So, for example, if you need to adapt 50 TV channels for iOS subscribers, an installation with commonly used server processors will save you more than 23TB* of disk space and significantly in costs!

*Calculated for the 1-week TSTV service for 50 channels with adaptive bitrate: HD (4.5 Mbps) + SD (2 Mbps).

Multicast Content Protection

SmartMEDIA allows you to encrypt MPEG-TS content in real time according to the ISO/IEC 23001-9 (Common encryption of MPEG-2 transport streams) standard. The SmartCETS service allows you to encrypt multiple multicast streams simultaneously; the cets utility can be used to encrypt a single stream or MPEG2-TS files.

After receiving the list of input multicast streams, SmartCETS/cets requests keys for encryption from the key server over the SmartLabs UDRM protocol. Encrypted content is either written to a file or broadcast to another multicast group using the UDP protocol. For the SmartCETS service, the list of input streams for encryption along with other parameters must be specified in the configuration file. For the cets utility, all parameters must be passed as command-line arguments.

The following formats are supported:

  • Video: H.262/MPEG2, H.264/AVC, H.265/HEVC;
  • Audio: AAC/ADTS, AC3, DTS.

The utility also stores information about its work in the log, e.g. obtaining keys, stream errors, keys retrieval errors, etc.

CETS Encryption

Features of the Encryption Algorithm

Encryption is performed according to the ISO/IEC 23001-9 (Common encryption of MPEG-2 transport streams) standard, namely:

  • the original MPEG-TS container is saved (except PMT), unknown tracks are not encrypted;
  • in the PMT of the source stream, the descriptors described in ISO/IEC 23001-9 are added for each encrypted track;
  • the payload of each video/audio track found is encrypted;
  • the utility complies with ISO/IEC 23001-9 recommendations regarding the H.264/H.265 and AAC payload encryption (i.e., the payload of TS packets containing VPS/SPS/PPS/SliceHeader and ADTS Fixed header is not encrypted);
  • for H.262, AC3 and DTS, the payload of TS packets containing PES-headers (Packetized Elementary Stream) is not encrypted;
  • before each PES header, packets containing PSSH received from the key server for that track are inserted into the stream;
  • before each PES header, ECM (Entitlement Control Messages) with content corresponding to ISO/IEC 23001-9, pertaining to this PES, is inserted into the stream. If the ECM content does not fit into the payload of one TS packet, the next ECM packet will be inserted where its contents begin to act (and not at the beginning of the next PES packet).

Load Balancing and Failover

Scaling and Fault Tolerance within a Single Site

Can be implemented by:

  • using external fault-tolerant or clustered storage systems (POSIX and object storages);
  • reserving SmartMEDIA Conveyor services in “1 + 1” mode (Active/Standby);
  • reserving services for playlists generation in “N + M” mode (Active/Active).

Geographically Distributed Structure (CDN)

SmartMEDIA Redirector allows you to implement a geographically distributed solution for the media content delivery.

Functionality

  • HTTP (for DASH and HLS) and RTSP requests balancing.
  • Grouping the servers into logical farms.
  • Providing different balancing policies between the servers of the farm.
  • Setting priorities for specific servers.
  • Servers failover in the group.
  • Redundancy of server groups.
  • Caching information about the content availability on a specific server.

Balancing Criteria

  • IP-address/subnet of the subscriber — for specified subnets, the viewing order of server groups is assigned.
  • Availability of content on servers — farms are polled from the “best choice” for specific subnet till the backup one; if there is no content on all servers in the farm, the servers of the next farm are polled, etc .
  • When balancing requests between group servers, the availability of content on servers and the weight of servers are taken into account.

Subscriber Management

Subscriber Management Entities

SmartTUBE SDP offers the Sales Department of an operator with all the capabilities for managing customer base. Its efficiency and simplicity lies in the management of the following entities:

The diagram below demonstrates the relationship of these entities:


Diagram 1. Relationship of SmartTUBE SDP subscriber management entities

Service Account

Service Account contains information about a subscriber and uniquely identifies it on the platform. It is characterized by a unique identifier, status (active, blocked, etc.), and login/password common for all subscriber’s devices (used for device authenticating).

The following operations can be performed on Service Accounts:

  • Multiple Devices can be linked to a Service Account for using them in parallel by a subscriber.
  • The set of services available to the subscriber is determined by the Pricing plan assigned to the Service Account. Only one Pricing Plan can be assigned to a Service Account.
  • Multiple User Profiles containing personalized content consumption restrictions and settings can be assigned to the Service Account.
  • Operator can specify the trial period for the account and manage its duration, along with setting the account status after the trial period expires.
  • Management and synchronization of the linked SmartTUBE SDP and OSS/BSS accounts are performed via SmartTUBE API. Subscriber’s personal data is stored on the OSS/BSS side only.

Device

Device uniquely identifies subscriber’s device on the platform. Each Device can only be linked to a single Service Account and characterizes by

  • Unique identifier (UID)
  • Device Type: Determines the device functionality when interacting with the platform. For example, use different TV streams on devices of different type, use different banners or channel logos, etc.
  • Individual login/password used for authenticating device on the platform.

Operator can perform the following actions with Devices:

  • Limit the number of Devices that can be linked to the same Service Account (with differentiation by device type) and/or simultaneously consuming services. Subscribers can exceed the set limits by purchasing a corresponding Service Bundle.
  • Link Devices to a specific region, allowing for the management of regional streaming.
  • Enable/disable DVB-T input, unprotected analog outputs, and HDCP protection of HDMI outputs on STBs that support this functionality.
  • Factory reset and reboot on STBs
  • Create an SSH tunnel to Devices (if it is technically possible)
  • Manage firmware and installed apps on Linux and Android-based STBs, as well as configuration parameters on all types of IPTV/OTT devices including mobile and Smart TV platforms. These actions are performed with SmartTUBE Device Manager.

User Profile

User Profile contains individual age restrictions for viewing/purchasing content and TV channel sorting settings. Each User Profile also stores individual viewing history, lists of favorite channels, movies, reminders, recordings, and purchased movies.
Multiple User Profiles can be linked to the Service Account, meaning they can be shared across all Devices linked to the Service Account.

Profiles have the following set of parameters:

  • Nickname
  • Collection of Profile Icons to choose from
  • PIN code: Used to secure the profile from unauthorized access and editing, and to prevent unauthorized purchases of content and subscriptions to services.
  • Default Access Level: The highest age rating of content that a user can view without entering a PIN. Content with a higher age rating is considered adult content.
  • Maximum access level: The highest age rating of content to be displayed in the TV channel list and VoD library. Content rated above this level is hidden from the app’s UI.

Pricing Plan

Pricing Plan is a collection of multiple Service Bundles and Discounts that enable operator to manage the service provisioning rules for subscribers. For this purpose, the Pricing Plan is assigned to the subscribers’ Service Accounts. Only one Pricing Plan can be assigned to the same Service Account. Each Pricing Plan can be shared across multiple Service Accounts.

Pricing Plan allows to control the following provisioning conditions of each Service Bundle and Discount:

  • Validity period of the bundle/discount within the Pricing Plan
  • Type of devices to which the bundle/discount to be applied
  • Bundle/discount status at the time the Pricing Plan is applied. Can be Active, Not active or Invisible (the bundle/discount is disabled and hidden for subscribers).
  • Duration following the Pricing Plan activation, after which the bundle/discount becomes inactive.
The Pricing Plan also enables to conduct the following operations on Service Bundles and Discounts:
  • Allow subscribers to enable/disable the bundle/discount in the app
  • Hide the bundle/discount from subscribers within the app. This way, the bundle/discount can only be activated by the operator or through subscription to other dependent bundles/discounts.
  • Hide the bundle/discount after unsubscribing and set the corresponding Service Account state accordingly

Service Bundle

Service Bundle is a collection of content or services offered to subscribers for a fee or at no cost. For the Service Bundle to be available to subscribers, it must be included into the Pricing Plan. Multiple Service Bundles can be included into multiple Pricing Plans.

The cost of a Service Bundle for a subscriber is determined by the Price Lists.

SmartTUBE supports the following types of Service Bundles:

  • TV Channel Bundle: A collection of channels provided to subscribers within the bundle.
  • DVR Bundle: A set of TV channel with Catch-up services enabled. It offers control over archive storage depth, as well as the provision of TSTV and/or Pause Live services for each channel individually.
  • VoD Bundle: Outlines the pricing model (TVoD, SVoD, AVoD, FVoD) for the movies/series within the bundle, their linkage to the operator’s local movie/series library or external content providers, offline movie viewing capabilities, and connection to a VAST server for AVoD content.
  • nPVR Bundle: A collection of channels eligible for nPVR services. It allows to manage the following bundle attributes:
    • Recording Time Quota: Maximum duration of all subscriber recordings.
    • Recording Storage Quota: Storage duration of subscriber recordings.
    • Notification Quota Level: Threshold at which the subscriber is notified about approaching to the Recording Time Quota.
    • Quota Overspending Limit: Maximum amount a user can go over their Recording Time Quota. If the quota is exceeded, the user must delete the extra recordings before scheduling more.
    • Restriction to record the ongoing or finished TV programs
    • nPVR Duration: Period within which the recording of finished TV programs is allowed.
  • PPV Bundle: Sets the pricing rules for pay-per-view TV programs. The operator can choose to charge a fixed price for the whole program or charge based on the minutes watched.
  • Device / Session Limit as a Bundle: Allows subscribers to increase the number of devices linked to the Service Account and/or Devices simultaneously consuming services beyond the limit set by the operator.

Price List

Price List determines the cost and provision conditions of the Service Bundle. Price Lists can be of two provision types:

  • One-time Purchase: Involves a single payment for the Service Bundle for a specific rental period (such as a day, month, year, or lifetime). Payment is handled by OSS/BSS through an integration API.
  • Subscription: The Service Bundle is provided for a certain period of time and involves periodic payment. The subscription charges and payment frequency are handled by OSS/BSS through an integration API.

Multiple Price Lists of the same provision type but with different prices and non-overlapping validity periods can be assigned to the same Service Bundle. That is, at any given time, a Service Bundle can have only one active Price List of a certain provision type.

For the TVoD content, it is also possible to set different prices and rental periods for each type of movie assets (e.g. SD and HD). Additionally, the asset price may vary depending on the Service Bundle or content provider.

Discounts

Price List can be optionally adjusted with Discount of the following types:

  • Overriding discount: Overwrites the cost of the Price List with its own.
  • Percentage discount: Specifies the percentage of discount applied to the cost of Price List.

The Discount is applied to the Pricing Plan. Thus it overlaps all Price Lists of all Service Bundles included in the Pricing Plan.

The provision conditions of Discount (validity period, device type dependence, etc.) are managed by the Pricing Plan.

The Price List and Pricing Plan can only have one active Discount at any given time, but one Discount can be applied to multiple Price Lists and Pricing Plans.

Subscriber Registration and Sign-In Options

SmartTUBE SDP offers various options for registering and signing in subscribers on the platform:

  • Sign-in by Login and Password: These credentials can be set for the entire Service Account or a specific Device.
  • Passwordless Sign-in: Operators can register devices on the platform without requiring login credentials if they manage the customer’s home network and know their IP address.
  • Trial Sign-in: Operators can set a trial period for subscribers and specify what types of devices they can use during this period.

Multiple Tenancy Configurations

Multitenancy allows the creation of several virtual operators sharing a single SmartTUBE SDP platform. For example, one global IPTV/OTT operator may have several regional divisions. The audience of these divisions may differ geographically, culturally, socially, etc. So may the content.

The multitenant configuration allows the following resources and features to be individualized for each tenant:

  • Service Accounts and Devices
  • Service Bundles and pricing rules
  • Access rights to SmartTUBE Admin Console for tenant employees
  • Statistical reports
  • Limited apps’ UI customization:– Tenant logo on the splash screen when starting the app

    – Tenant logo on the status bar

    – Selector color

    – Limited styling features on the Home screen

    Please note that the app remains the same for all tenants. The operator cannot change the app icon and name individually for each tenant!

  • Subscriber notifications
  • Licensing calculations

At the same time, each tenant may utilize shared content (TV channels, EPG, VOD library) and metadata sets.

Platform administrators have full access to all platform resources.

SmartMEDIA Admin Guide

This section provides you with instructions on deploying SmartMEDIA Content Delivery System, setting up live stream recording, VoD preparation, interacting with DRM systems, content distribution, and other related information.

You can download the entire section as a PDF here.

What is SmartMEDIA

The SmartMEDIA media server, developed by SmartLabs, is designed to deliver video content over IP networks. It provides transcoding, segmentation, encryption, recording and delivery of audio/video content for both managed IP (IPTV) and unmanaged IP (OTT) networks.

SmartMEDIA supports a variety of streaming protocols (MPEG-DASH, HLS, RTSP), video resolutions (from SD to UHD) and codecs (H.262/MPEG-2, H.264/AVC, H.265/HEVC, various audio codecs, etc.), allows you to deliver media content to a wide range of subscriber devices and players, including set-top boxes, browsers, Apple iOS devices, Apple tvOS, Android, Microsoft Windows Mobile/Windows Phone, Adobe Flash Player add-ons, Microsoft Silverlight Player, etc.

Solutions based on SmartMEDIA can automatically distribute the load between video servers depending on the client’s location and requested content for high performance and fault tolerance. This allows you to build distributed video content delivery networks (CDN) in particular.

The functional architecture of SmartMEDIA is represented by the following diagram:

Image4

SmartMEDIA functional architecture (click to enlarge)

Key Features of SmartMEDIA

  • High scalability with support for both centralized and distributed solutions.
  • High reliability due to the ability to build failover clusters with no single point of failure.
  • Deploy the hardware platform quickly and easily with standard servers and storage systems.
  • A wide range of supported formats (from SD to UHD), codecs (H.262/MPEG-2, H.264/AVC, H.265/HEVC and others), as well as integration with popular content protection systems and subscriber devices.

The SmartMEDIA media server software is running Linux on top of the x86_64 platform.

SmartMEDIA Functions

Using the SmartMEDIA media server, IPTV/OTT service providers can develop a wide range of services for their subscribers, the entire list of which can be generalized to the following services: LiveTV (multicast), VoD and nDVR.

VOD Services

VoD (Video on Demand) is a set of services for targeted video content delivery (for example, movies, serials, etc.) to end-user devices using IP networks. For VoD-services the content should be properly prepared (transcoded, segmented, encrypted and indexed) and stored in a storage for future transfer to the devices. These steps are implemented in SmartMEDIA as follows:

Image2

VoD Content Preparation Stages

1. Segmenting and Playlist Generation

VoD content should be segmented into chunks according to MPEG-DASH and HLS protocols. Chunked content will be packaged in TS and/or MP4 containers and recorded to the storage.

Requirements for Source Files

Supported containers:

  • SPTS MPEG2-TS (ISO/IEC 13818-1, ITU-T);
  • MP4/ISO BMFF (ISO/IEC 14496-12 — MPEG-4 Part 12);
  • MKV (Matroska).

Supported codecs:

  • AAC, AC3, DTS — for audio;
  • H.262/MPEG2, H.264/AVC, H.265/HEVC — for video.

Additional requirements:

  • If you’re going to use adaptive bitrate streaming (ABR), all video streams should have the same GOP structure and have synchronous key frames (I-frames).
  • The value of DTS counters for audio and video samples should not differ by more than 1.5 seconds.
  • The value of DTS counters should increase monotonically.
  • If the PMT table in the MPEG2-TS container was changed, a table version change is required.
  • There should be no CC errors in the TS-stream.

POSIX-compatible file systems are supported.

Playlists with chunk references and other metadata will be generated as well as media files. Playlists will be stored in the same directory as the chunks.

2. Encryption

To protect against unauthorized playback and copying, content can be encrypted. In this case, the encryption will be applied before writing to the storage.

At the moment, supported encryption standard is ISO/IEC 23001-7: 2015 Part 7 (Common encryption in ISO base media file format files); the ISO BMFF/MP4 Fragmented container is supported. Any CENC-compatible DRM system can be used, for example Google Widevine or Microsoft PlayReady.

3. Content Playback

The subscriber device requests the playlists and chunks via the HTTP protocol and plays them. The solution includes an nginx HTTP server, which performs content delivery.

nDVR Services

Unicast LiveTV and “network video recorder” (nDRV) services mean the retransmission of digital streams (for example, TV channels) with individual (unicast) delivery to subscriber devices over IP-networks. Examples of nDVR services include such services as TimeShifted TV (TSTV), PauseLive, or a network personal video recorder (nPVR).

To implement these services, streams have to be recorded onto storages and be delivered to the subscriber’s device upon request. The content processing path from ingestion till delivery to the end-user by the SmartMEDIA components are shown in the following scheme:

Image1

nDVR Content Preparation Stages

1. Streams Injection

Incoming TV streams (multicast or unicast streams in the TS container) should be injected into SmartMEDIA Conveyor service.

Incoming streams must meet the following requirements:

  • Container: SPTS MPEG2-TS (ISO/IEC 13818-1, ITU-T).
  • Protocols:
    • UDP over IP Multicast (without RTP encapsulation);
    • HTTP (MPEG2-TS stream over HTTP);
    • HLS according to draft-pantos-http-live-streaming-05, without encryption.
  • Supported video codecs: H.262/MPEG2, H.264/AVC, H.265/HEVC.
  • Video resolution: up to 4K, up to 60fps. Both progressive and interlaced streams are supported.
  • Supported audio codecs: AAC, AC3, MP2, MP3, DTS.
2. Transcoding

The transcoding of Live-streams is implemented using Intel codecs (that are part of the Intel Media SDK) and Nvidia NVENC technology, and requires the use of compatible CPUs, GPUs and chipsets. For more information on hardware requirements see here and the Intel website (https://software.intel.com/en-us/media-sdk).

The transcoder function includes decoding, filtering (audio and video) and encoding. The incoming stream must be unencrypted (otherwise it can not be decoded).

The following filters can be applied to video streams:

  • Deinterlacing (applied automatically if the incoming stream is interlaced);
  • Resize;
  • Changing the frame rate (fps).

Target formats can be:

  • Video codecs: H.264/AVC, H.265/HEVC;
  • Video format: up to 4K, up to 60fps, progressive scan;
  • Audio codecs: AAC.
3. Segmentation, Indexing and Recording of Content

In order to provide nDVR services, as well as Live over HLS and DASH protocols, media streams must be recorded into the storage. To achieve the highest performance when delivering content to subscribers, SmartMEDIA records streams in the same form as they will be delivered to subscriber devices, all stream conversions (remultiplexing, encryption, etc.) are performed during recording.

SmartMEDIA supports 2 recording modes:

  • Main mode, or mode with remultiplexing: the incoming stream is completely demultiplexed, only the desired tracks (audio and video) are used. Then the elementary stream is encrypted if necessary, packed into the desired container (MPEG2-TS or ISO BMFF) and written into the storage.
  • To work in this recording mode, the incoming stream should not be encrypted, otherwise all information about encryption will be lost and it will not be possible to reproduce it.
  • Pass-Through: incoming TS-stream is written in the form as it comes to the server. The stream is not remultiplexed, it is divided into chunks and written into the storage. In particular, all timestamps are stored in the stream, as well as CC errors, if they were present in the incoming stream.
  • In this mode, the server can also accept encrypted TS streams if the TS packet structure is preserved and the NAL-unit headers are not encrypted (for example, DVB Simulcrypt or Common Encryption for MPEG2-TS encrypted streams).

Recording can be done both in POSIX-storages (local file systems, NFS, external storages), and in external object storage using the Amazon S3 protocol.

Simultaneously with the segmentation, the stream is being indexed. Based on the indexes HLS/DASH/Smooth Streaming playlists will be created later. Currently, the supported index storage is MongoDB.

It also should be considered that:

  • if you’re going to use adaptive bitrate streaming (ABR), all video streams should have the same GOP structure and have synchronous key frames (I-frames);
  • the value of DTS counters for audio and video samples should not differ by more than 1.5 seconds;
  • the value of DTS counters should increase monotonically;
  • if the PMT table in the MPEG2-TS container was changed, a table version change is required;
  • there should be no CC errors in the TS-stream.
4. Encryption

To protect against unauthorized viewing, copying, etc. during the recording process, the content can be encrypted according to one of the following standards:

  • HLS-AES — only the MPEG2-TS container is supported and subsequent delivery over the HLS protocol. The entire chunk, including the headers of TS packets, is encrypted using the AES-CBC algorithm with PKCS#7 padding. Information about encryption can only be added to the HLS playlist (#EXT-X-KEY tag). As a DRM system, Verimatrix Adaptive CAS or another DRM with same API for obtaining encryption keys can be used.
  • ISO/IEC 23001-7: 2015 Part 7 (Common encryption in ISO base media file format files), abbreviated to CENC. The ISO BMFF/MP4 Fragmented container is supported. Only the elementary stream (payload) is encrypted, the container and the headers of the NAL packets of the video stream remain unencrypted. The data is encrypted using the AES-CTR algorithm. Any compatible system can be used as DRM, for example: Google Widevine or Microsoft PlayReady. The Widevine Modular DRM API or SmartLabs UDRM API can be used for encryption keys retrieval.
5. Playlists Generation

The Playlist Generator component generates HLS or DASH playlists for the recorded content by end-user devices requests.

HLS playlists generation is supported for unencrypted content, as well as encrypted with the HLS-AES standard content recorded in the MPEG2-TS container.

DASH playlists generation is supported for content recorded in the ISO BMFF/MP4 Fragmented container.

6. Content Playback

The subscriber device requests chunks for audio and video and plays them. The solution includes an nginx HTTP server, which performs the delivery of chunks over the HTTP protocol.

Multicast Content Protection

SmartMEDIA allows you to encrypt MPEG-TS content in real time according to the ISO/IEC 23001-9 (Common encryption of MPEG-2 transport streams) standard. The SmartCETS service allows you to encrypt multiple multicast streams simultaneously; the cets utility can be used to encrypt a single stream or MPEG2-TS files.

After receiving the list of input multicast streams, SmartCETS/cets requests keys for encryption from the key server over the SmartLabs UDRM protocol. Encrypted content is either written to a file or broadcast to another multicast group using the UDP protocol. For the SmartCETS service, the list of input streams for encryption along with other parameters must be specified in the configuration file. For the cets utility, all parameters must be passed as command-line arguments.

The following formats are supported:

  • Video: H.262/MPEG2, H.264/AVC, H.265/HEVC;
  • Audio: AAC/ADTS, AC3, DTS.

The utility also stores information about its work in the log, e.g. obtaining keys, stream errors, keys retrieval errors, etc.

Image3

Features of the Encryption Algorithm

Encryption is performed according to the ISO/IEC 23001-9 (Common encryption of MPEG-2 transport streams) standard, namely:

  • the original MPEG-TS container is saved (except PMT), unknown tracks are not encrypted;
  • in the PMT of the source stream, the descriptors described in ISO/IEC 23001-9 are added for each encrypted track;
  • the payload of each video/audio track found is encrypted;
  • the utility complies with ISO/IEC 23001-9 recommendations regarding the H.264/H.265 and AAC payload encryption (i.e., the payload of TS packets containing VPS/SPS/PPS/SliceHeader and ADTS Fixed header is not encrypted);
  • for H.262, AC3 and DTS, the payload of TS packets containing PES-headers (Packetized Elementary Stream) is not encrypted;
  • before each PES header, packets containing PSSH received from the key server for that track are inserted into the stream;
  • before each PES header, ECM (Entitlement Control Messages) with content corresponding to ISO/IEC 23001-9, pertaining to this PES, is inserted into the stream. If the ECM content does not fit into the payload of one TS packet, the next ECM packet will be inserted where its contents begin to act (and not at the beginning of the next PES packet).

Load Balancing and Failover

Scaling and Fault Tolerance within a Single Site

Can be implemented by:

  • using external fault-tolerant or clustered storage systems (POSIX and object storages);
  • reserving SmartMEDIA Conveyor services in “1 + 1” mode (Active/Standby);
  • reserving services for playlists generation in “N + M” mode (Active/Active).

Geographically Distributed Structure (CDN)

SmartMEDIA Redirector allows you to implement a geographically distributed solution for the media content delivery.

Functionality:

  • HTTP (for DASH and HLS) and RTSP requests balancing.
  • Grouping the servers into logical farms.
  • Providing different balancing policies between the servers of the farm.
  • Setting priorities for specific servers.
  • Servers failover in the group.
  • Redundancy of server groups.
  • Caching information about the content availability on a specific server.

Balancing Criteria:

  • IP-address/subnet of the subscriber — for specified subnets, the viewing order of server groups is assigned.
  • Availability of content on servers — farms are polled from the “best choice” for specific subnet till the backup one; if there is no content on all servers in the farm, the servers of the next farm are polled, etc .
  • When balancing requests between group servers, the availability of content on servers and the weight of servers are taken into account.

Services and Components

Depending on services to be provided to subscribers, the SmartMEDIA solution may include different set of components. Below you can find a component interaction scheme, which illustrates the component location in the content processing workflow from the source TV streams and VoD files up to subscriber devices. Next you will find a short description of each component.

Image4

Conveyor

The SmartMEDIA Conveyor service (smcvr) is responsible for processing (transcoding, remultiplexing, segmenting), indexing and recording of LiveTV streams to the storage.

Technically, the nDVR and Unicast Live services do not differ. In both cases, the stream must be written to the storage, but in case of the Unicast Live, the record can be made to a temporary storage (for example, tmpfs) and deleted after a minute or two.

Content can be delivered to the SmartMEDIA Conveyor server within the MPEG2-TS container using one of the following protocols:

SmartMEDIA Conveyor performs:

  • transcoding of incoming streams (if necessary),
  • remultiplexing,
  • media data encryption (if necessary),
  • recording to the storage,
  • index generation and writing indexes to the database (MongoDB).

Adaptive Streaming Support

To record several streams of the single channel which have different bit rates (a.k.a. Adaptive Streaming), SmartMEDIA Conveyor synchronizes them at the recording stage and create one index record for all of the chunks of different bitrates of the same time interval. Thus, all streams (audio, video and subtitles) must be synchronized in time (which means DTS discrepancy within the stream should be minimal) and have the same GOP structure of the video stream with synchronous keyframes. Otherwise, streams will not be synchronized and cannot be recorded.

Configuration and Management

There are two ways to manage SmartMEDIA Conveyor’s settings:

  • via the channel configuration file,
  • via the JSON-RPC API.

See “SmartMEDIA Configuration Reference” document for more details.

Playlist Generator

The SmartMEDIA Playlist Generator (smplgen) generates HLS playlists and DASH manifest files for recorded and indexed content as well as checks the availability of content for service requests from SmartMEDIA Redirector.

To retrieve playlists, the subscribers’ devices send requests to the web server (nginx web server is included in the standard package), which in turn requests a playlist/manifest from the Playlist Generator service using the FastCGI protocol. The Playlist Generator forms a playlist/manifest based on the index data stored in the MongoDB, and returns it to the device.

Functionality:

  • generation of m3u8 playlists for HLS protocol for the streams recorded in the MPEG2-TS container;
  • generation of playlists for protocols HLS (m3u8), DASH (MPD) and SmoothStreaming for the streams recorded in the MP4/ISOBMFF-fragmented container.

RTSPServer

The SmartMEDIA RTSPServer (rtspServer) service is designed to support devices which do not support the HLS or DASH protocol, but support RTSP. The main task of RTSPServer is to translate RTSP requests to HLS and to transfer media content to RTSP-compatible end-user devices.

It supports playback and forward/backward rewind (trickplay).

RTSPServer can also be used to build distributed content delivery solutions. In this case, the content delivery between different geographical sites can be done over HTTP with all it advantages, and RTSP will be used only for the “last mile”, to deliver content to the end-user devices from the EDGE nodes.

Redirector

The SmartMEDIA Redirector service (httpRedirector and rtspRedirector) allows you to define server groups (farms) and achieve uniform and flexible load balancing between servers or server groups, depending on client location and requested content. In particular, it:

  • provides failover to backup sources (servers/farms) when one or more sources fail;
  • monitors the health of servers and services;
  • checks the availability of requested content on servers;
  • provides caching of information about the availability of servers or content.

For a more detailed description of HTTPRedirector workflow, see «Load Balancing».

SmartPVR

The SmartPVR (smpvr) service generates, upon the request, a standalone record of the specified TV program from the records generated by the SmartMEDIA Conveyor service, based on the requested channel and the broadcast time (so-called Live-to-VoD). Creation and management of records are performed with JSON-RPC API.

SmartMPicker

SmartMEDIA SmartMPicker (smpicker) allows you to pick the working/best source of incoming stream and send it to a user or another service.

SmartMPicker can be used to ensure the fault tolerance of incoming traffic and automatically switch to the backup stream for the Conveyor service.

The source streams are defined in the SmartMPicker configuration file in priority order. If there are no data in the stream or it is ignored at the current time of the day, according to the configuration, SmartMPicker moves to the next stream from the list. If none of the streams match the conditions, a “stub” stream from the file can be generated.

The list of incoming streams maps to the address of the outgoing multicast stream, which will be delivered to the user or another service.

SmartCETS

The SmartCETS service encrypts MPEG2 TS streams in real time according to ISO / IEC 23001-9 (part: “Common encryption of MPEG-2 transport streams”). The encryption keys are requested over the Widevine Modular DRM / SmartLabs UDRM protocol (see the document “SmartMEDIA. Integration Guide”).

SmartMEDIA Transcoder

SmartMEDIA Transcoder service (smtrc) is a “satellite” service of the SmartMEDIA Conveyor. It receives a stream of media samples from the Conveyor over the TCP connection, transcodes the stream and sends the resulting stream (or multiple streams in case of ABR) back to the smcvr. It can be started on the same host where Conveyor runs as well as on the other, “remote” host and work over the TCP/IP network. In comparison with the ‘in-process’ transcoding it has the following advantages:

  • transcoders can be installed on dedicated hosts with the required hardware, such as QSV-enabled Intel CPUs or NVENC-enabled Nvidia GPUs. Conveyor service is still installed on the host, optimized for encryption and recording;
  • reducing the load on the svcvr service and offloading of the most CPU-intensive task leads to the more channels can be processed and recorded by the same Conveyor service, which simplifies the management;
  • transcoder service can be shared between multiple Conveyor services;
  • a single Conveyor service can use multiple network transcoders, even with different transcoding technologies and hardware platforms;
  • finally, transcoding process isolation leads to more reliable service and much more simple monitoring of this service.

Note, that the only tasks SmartTranscoder performs are decoding, processing (relampling, resizing etc.) and encoding with the required codec (h264/AVC, h265/HEVC). All other processing tasks, such as demultiplexing, synchronization, segmenting, encryption, indexing and multiplexing are performed by the Conveyor service.

SmartMEDIA Transcoder service uses proprietary protocol to exchange the data with smcvr and cannot receive streams directly.

SmartMEDIA Recryptor

The SmartMEDIA Recryptor (smrecrypt) service is designed to re-encrypt MP4 chunks prepared for adaptive streaming (HLS or DASH) from one encryption scheme to another “on the fly”, i.e. without saving the re-encrypted copy to the repository. This saves disk space by storing only one copy of encrypted content (for example, for Widevine DRM). At the same time, players using a different content protection system (for example, Apple FairPlay DRM) can also decrypt and play this content. Currently, reencryption from the cenc scheme (AES-CTR) to the cbcs scheme (AES-CBC with template encryption) is supported according to the standard ISO/IEC 23001-7 “Common encryption in ISO BMFF files”.

SmartMEDIA Recryptor operates as an HTTP proxy server, processing client requests for MP4 chunks. It requests chunks over HTTP from the origin server (for example, from S3 storage) or from the local file system, parses MP4, receives encryption keys from the SmartLabs UDRM server, decrypts media samples, re-encrypts with another encryption scheme, generates an output MP4 file and passes it to the client over HTTP. The re-encryption is performed at each request for each client. The service does not have internal caching of chunks, so it may be advisable to cache content using a caching proxy server, for example, NGINX. Also cryptographic algorithms used in decrypting and encrypting data can create an increased load on the CPU. So it is recommended to use processors with hardware encryption support, for example, Intel AES New Instructions (AES-NI).

The service receives encryption keys from the SmartLabs UDRM server using the Custom Extension UDRM Decryption API. Since the standard API of the cloud Widevine DRM does not support content decryption on the server side (but only encryption), the SmartMEDIA Recryptor service can only be used with the SmartLabs UDRM key server and cannot receive keys directly from the cloud Widevine DRM (unlike the SmartMEDIA Conveyor service). The received encryption keys are cached to reduce the number of requests and the load on the key server.

To re-encrypt MP4 chunks “on-the-fly”, they must be recorded appropriately by the SmartMEDIA Conveyor service. In particular, Key ID and PSSH must be written to each MP4 chunk to request keys. When re-encrypting, the structure of Subsamples (BytesOfClearData/BytesOfProtectedData) remains unchanged, so the original chunks must be encrypted with this in mind. This may require certain recording setup in the SmartMEDIA Conveyor service (for details, see the service documentation). Also, MP4 chunks recorded by a third-party media server, in some cases, cannot be re-encrypted “on-the-fly” using the SmartMEDIA Recryptor service.

HLS Playlist Manipulator

The HLS Playlist Manipulator allows OTT operators to insert / replace ad blocks in the original HLS stream containing SCTE-35 ad markers. Ad insertion decisions are made in interaction with the VAST server using the VAST 3.0 protocol.

The HLS Playlist Manipulator supports client players with the VAST protocol support and could be integrated with any OTT environment using the HLS protocol.

It also has a well-proven integration with the SmartLabs ecosystem:

  • VAST server — SmartTUBE ADS;
  • Client players — SmartTUBE Client apps for the large-screen and mobile platforms;
  • Content processing and streaming system — SmartMEDIA.

Features Implemented

  • Ads replacement is based on the pre-prepared sсhedule in CSV format.
  • The schedule links to the current airtime by the tag #EXT-X-PROGRAM-DATE-TIME in the origin playlist.
  • HTTP and HTTPS support.
  • Adaptive bitrate HLS support.

The deviation of the insertion moment from real time to 5-6 chunks is possible. For example, with a chunk length of 5 seconds, the deviation can be up to 25–30 seconds.

Operation Principle

Image2

OTT ad insertion architecture

The workflow of OTT ad replacement using HLS Playlist Manipulator are as follows:

  1. The client player (e.g. SmartTUBE Client app’s player) starts to play a specific stream (Live or VOD) that has ad insertion opportunities marked in the origin playlists coming from 3rd party sources (e.g. SmartMEDIA Content Processor).
  2. The client player sends a request URL to the HLS Playlist Manipulator to watch this stream. This stream request URL carries all the targeting parameters needed for the HLS Playlist Manipulator to use. For example, the request URL could look like this:

Image1

  1. The HLS Playlist Manipulator checks:
    1. Origin playlist from the source streaming server (or SmartMEDIA Playlist Generator) for the #EXT-X-PROGRAM-DATE-TIME tags and
    2. Ad insertion schedule, uploaded to the database from CSV files.
  1. If the origin playlist carries the #EXT-X-PROGRAM-DATE-TIME tags and there are ad insertion events in the DB, then the HLS Playlist Manipulator initiates the ad insertion workflow. If not, then nothing is done on the HLS Playlist Manipulator and it just passes the same playlist from the origin to the client player with no ad insertion.
  2. In case there are ad availabilities, then the HLS Playlist Manipulator strips out the targeting parameters from the client request URL and uses these parameters to form a VAST request to the VAST server (e.g. SmartTUBE ADS). The VAST request is sent immediately. The VAST request URL could look like this:

Image3

  1. The VAST server receives this request and immediately checks in the database it has for campaigns matching this targeting criteria. Once a suitable campaign and creatives are found, the server responds with a VAST response carrying information about the ad creatives to be inserted.
  2. Upon receiving a response, the HLS Playlist Manipulator replaces the origin chunks with ad chunks from the ad creative/s and sends a “personalized” playlist to the client player for playback.

The HLS Playlist Manipulator workflow can be also represented by the following diagram:

Image5

HLS Playlist Manipulator workflow

Requirements, Limitations, and Recommendations

  • Chunk length of the ad creatives MUST be equal or greater than in the original stream.
  • Ads are inserted at the chunk boundaries. This means that if the ad start time is in the middle of the current chunk, the HLS Playlist Manipulator will insert the ad when this chunk ends and will not split the chunk.
  • The original playlists must contain the #EXT-X-PROGRAM-DATE-TIME tag.
  • Use a video player that correctly supports the #EXT-X-DISCONTINUITY tag according to the HLS specification.

CSV Schedule Format

The schedule for inserting ad blocks must meet the following conditions:

  • The CSV file format is only supported.
  • The schedule files are accessible via FTP or HTTP[S].
  • Each channel has a folder with a name corresponding to the channel ID on the VAST server.
  • Each folder contains files with the names of the following format:
    TAYYMMDD.csv,  where YY — year, MM — month, DD — day.

    For example:
    TA220801.csv
    TA220802.csv

  • The ad insertion events are described in these files as follows:

    ID;START;END

    where ID — unique ID of an event, START — start time of the ad block, END — end time of the ad block.

    For example:
    1659368211;00:00:00;00:01:37
    1659368212;00:05:00;00:06:23
    1659368213;00:10:00;00:11:07

Utilities 

vodconvert

The vodconvert utility is designed for converting VOD content to the required format and generating DASH, Smooth Streaming and HLS playlists, as well as content encryption.

The utility can receive several files with several tracks. Track selection and processing settings can be defined in command line arguments.

MPEG-DASH/Microsoft Smooth Streaming

vodconvert can accept TS, MP4 and MKV files. After processing:

  • each selected track will be saved to a separate MP4 file;
  • if encryption is required, the content will be pre-encrypted;
  • an MPD file (manifest) will be created.

HLS

vodconvert can accept TS files as a source content. After processing:

  • a playlist will be created for each source TS file, files won’t be fragmented;

or:

  • the source TS files will be divided into chunks of the specified duration, after which playlists will be generated.

scanTs

The scanTs utility analyzes MPEG2 TS files and displays a brief description of structure found: PAT, PMT, ECM, PCR, PES, PTS, IFrame, CC errors, packet format, PCR jumps.

cets

The cets utility is a simplified version of the SmartCETS service. It allows you to work with files more conveniently, but has some restrictions. Accepts all necessary parameters from the command line.

When reading from a file, stops as the end of the file is reached. The cets utility requests encryption keys only once — before starting encryption, and cannot perform keys rotation (i.e. encrypts the entire source with the single set of keys).

tsSnoop

The tsSnoop utility is intended for viewing the headers and structures of media containers. It outputs to the console the binary data of the source file in hex-format (optional) and a textual representation of the media data structures found (for example, TS packets, MP4 atoms, etc.). The following formats are supported: MP4, MKV, TS, H.262, H.264, H.265, MP3, DTS, AC3.

Installing SmartMEDIA

Deployment Type

Local Deployment

For permanent loads (operators of IPTV/OTT services, TV broadcasters, etc.), it is usually expedient to purchase (or use previously purchased) equipment for content delivery tasks. Peak loads can be leveled by using CDN services and/or building an infrastructure with the required performance margin.

Cloud Deployment

SmartMEDIA can also be installed on leased resources and VPSes, so-called “cloud services” (for example, Amazon EC2) and cloud storage services. This solution has a number of advantages:

  • absence of capital expenses for hardware resources and technological infrastructure;
  • use of systems and architectures of reservation provided by the cloud service provider;
  • rapid, flexible modification of the hardware platform to meet the system performance requirements when changing the service needs.

Cloud computing services are reasonable to use for irregular loads on the broadcasting system (for example, broadcasting of certain events — sports events, concerts, etc.) and, accordingly, low profitability when purchasing your own hardware.

Storage of nDVR/VoD content in this case is provided by using storage with access via S3 protocol.

System Requirements

The SmartMEDIA can be installed on servers with the x86_64 architecture and with the CentOS 7 or Red Hat Enterprise Linux 7 operating system.

Regardless of the way resources are allocated — purchased equipment or rental of capacity from hosting providers and cloud service providers, the equipment performance must meet the load requirements.

Exact performance requirements for a certain load (the number of sessions, the number and characteristics of recorded streams, etc.) can only be found in experimental way. General recommendations, explanations and calculations will be given below. They can be used as a starting point for the service’s implementation but should be corrected and actualised in time.

General Recommendations for the Hardware Platform

SmartMEDIA’s performance in stream recording and streaming is mostly determined by the performance of the storage system used (IOPS and bandwidth) and in most cases is limited by the speed of writing media data in the storage and data reading speed. The best performance can be achieved, for example, by increasing the number of disks in the storage system (when using HDD) or using solid-state drives (SSDs).

The main consumers of computing resources (CPU) are:

  • SmartMEDIA Conveyor service;
  • the operating system in terms of networking (I/O operations and memory copying between user and kernel spaces);
  • the operating system in terms of storage performance (the processor is idle but in the I/O Wait state).

The SmartMEDIA Conveyor service, in turn, uses CPU time (CPU) for:

  • incoming streams processing;
  • streams encryption (if enabled). To increase performance, it’s recommended to use a CPU with hardware support for AES algorithms (AES-NI);
  • if transcoding is used — for decoding and encoding of audio streams (video streams will be transcoded by QSV graphics accelerator, see below).

Requirements for Transcoding Servers

SmartMEDIA Transcoder allows you to perform transcoding of live input streams to multi profile adaptive bitrate, DASH or HLS, streams for OTT delivery. It runs on standard off-the-shelf hardware with Intel CPUs with QSV support or NVIDIA GPUs with NVENC support.

NVENC-based Transcoding

For this type of transcoding, you’ll need to use Nvidia GPUs with NVENC / NVDEC hardware accelerated encoding/decoding technology support. For details and the actual list of supported GPU models, please visit the Nvidia website.

Hardware Requirements:

  • Of-the-shelf server or PC with supported Nvidia GPU installed
  • RAM: 8GB or above
  • Storage: HDD/SSD as much size as how long time you want to keep video archive of the recorded channels (SSD is preferable)
  • OS: CentOS 7 or Oracle Linux 9

The following tables outline the estimated performance of NVIDIA GPUs when transcoding a 1920x1080i 29.97 source video to 1920×1080 at 4 Mbps, 1280×720 at 2 Mbps, and 640×360 at 600 Kbps output.

Nvidia Quadro P6000 (250W)
15 channels

# gpu   pwr gtemp mtemp    sm   mem   enc   dec  mclk  pclk

# Idx     W     C     C     %     %     %     %   MHz   MHz

   0    96    63     –    24    16    61    98  4513  1657

   0    96    63     –    24    16    61   100  4513  1657

   0   102    63     –    24    16    61    93  4513  1657

   0   104    63     –    24    16    61    97  4513  1657

   0   103    63     –    26    18    66   100  4513  1657

   0   104    63     –    26    17    64    98  4513  1657

   0    98    63     –    24    16    60    99  4513  1657

   0    88    63     –    23    16    59    96  4513  1657

   0    94    63     –    27    18    69    95  4513  1657

   0   106    63     –    25    16    63    97  4513  1657

Nvidia RTX A2000 (70W)
13 channels

# gpu   pwr gtemp mtemp    sm   mem   enc   dec  mclk  pclk

# Idx     W     C     C     %     %     %     %   MHz   MHz

   0    64    65     –    24    26    83    96  5700  1217

   0    64    65     –    30    29   100   100  5700  1807

   0    64    65     –    30    29   100    99  5700  1800

   0    63    65     –    24    22    79    65  5700  1860

   0    63    65     –    21    19    66    74  5700  1807

   0    65    65     –    27    25    84    92  5700  1800

   0    62    65     –    20    19    65    81  5700  1807

   0    61    65     –    24    23    76   100  5700  1837

   0    64    65     –    25    23    79    90  5700  1837

   0    66    65     –    25    26    99    52  5700  1845

   0    66    66     –    28    27   100    99  5700  1830

   0    68    66     –    28    27   100   100  5700  1822

Nvidia Tesla T4 (70W)
11 channels

# gpu   pwr gtemp mtemp    sm   mem   enc   dec  mclk  pclk

# Idx     W     C     C     %     %     %     %   MHz   MHz

   0    50    84     –    24    25    96    53  5000  1290

   0    51    84     –    23    25    94    52  5000  1215

   0    58    84     –    23    25    95    55  5000  1305

   0    52    84     –    23    24    94    52  5000  1245

Columns description:

  • pwr: The current power consumption of the GPU in watts (W).
  • gtemp: The current temperature of the GPU in degrees Celsius.
  • mtemp: The current temperature of the VRAM in degrees Celsius.
  • sm: The percentage of the streaming multiprocessors actively engaged in computations.
  • mem: The amount of memory used versus the total available memory on the GPU.
  • enc/dec: The load on the video encoding and decoding hardware.
  • mclk: The current clock speed of the GPU memory, in MHz.
  • pclk: The current clock speed of the GPU cores, in MHz.

The exact performance depends not only on the above parameters, but also on the characteristics of the incoming stream (codec settings, progressive/interlaced scanning, etc.), applied filters, used audio codecs and the number of audio tracks, etc.

QSV-based Transcoding

For this type of transcoding, you’ll need to use CPUs and chipsets with the Intel Quick Sync Video (QSV) hardware accelerated encoding/decoding technology support. For details and the actual list of supported CPU models, please visit the Intel website.

The performance of the transcoder (the number of simultaneous streams, resolution, frame rate) will depend primarily on the integrated GPU used. The performance of the CPU itself (model, frequency) affects the decoding/encoding of audio streams, demultiplexing of incoming streams and multiplexing of transcoded elementary streams.

The estimated performance of the Intel ® Xeon ® processor E3-1585Lv5 with the Intel ®Iris ™ Pro Graphics P580 is shown below:

Resolution

Input/Output Codecs

Number of realtime output streams (30 fps)

Number of realtime output streams (60 fps)

576p → 576p

AVC → AVC

28

14

1080p → 1080p

AVC → AVC

18

9

AVC → HEVC

15

7

HEVC → HEVC

8

4

4k → 4k

AVC → HEVC

4

2

HEVC → HEVC

2

1

The estimated performance of the Intel ® Core ™ i3-9100 processor with the Intel ® UHD 630 graphics is shown below:

Input format

Output format

% RENDER

% VIDEO

% VIDEO_E

FREQ

Capacity

Limit

1920×1080 50i

1920×1080 25p

13

11

8

230

8

VIDEO

1920×1080 50i

1280×720 25p

7

7

7

180

10

VIDEO_E

1920×1080 50i

720×576 25p

5

5

6

150

10

VIDEO_E

1920×1080 60i

1920×1080 30p

16

12

10

250

7

VIDEO

1920×1080 60i

1280×720 30p

8

9

11

200

9

VIDEO_E

1920×1080 60i

720×576 30p

7

5

11

200

9

VIDEO_E

720×576 50i

720×576 25p

4

3

2

85

26

RENDER

720×576 50i

640×360 25p

2

2

2

50

27

RENDER

1920×1080 60p

1920×1080 60p

15

17

7

280

6

VIDEO

1920×1080 60p

1280×720 60p

11

13

0

220

7

VIDEO

1920×1080 60p

720×576 60p

8

9

0

170

10

VIDEO

1280×720 60p

1280×720 60p

8

9

3

200

11

VIDEO

1280×720 60p

720×576 60p

7

7

0

120

16

RENDER

1920×1080 50i

FHD + HDR + SD 25p

14

13

10

240

5

RENDER

1920×1080 60i

FHD + HDR + SD 30p

20

18

17

270

5

RENDER

1920×1080 60p

FHD + HDR + SD 60p

30

26

7

400

4

RENDER

Columns description:

  • % RENDER — percentage of EUs usage. Execution Units (EUs): General purpose execution units. These are used for graphics rendering, but they are also suited to a wide range of media processing tasks. Execution Units are general purpose compute engines ideal for video processing uses. They are often used by encode for parts of the algorithm not run in fixed function like rate control and mode decisions.
  • % VIDEO — percentage of VDBox usage. In addition to EU slices, there is an “unslice” with additional hardware engines individually schedulable for media tasks — VDBox (also known as MFX) for codec operations and VEBOX.
    VDbox/MFX contains:

    • Bitstream decoder (BSD),
    • ENC (intra prediction, motion estimation),
    • PAK (quantization, entropy coding, pixel reconstruction, motion compensation). 6 th Generation Core / Skylake architecture introduced a new low power encode path entirely in VDBox called VDenc. However, it is lower quality.
  • % VIDEO_E — percentage of VIDEO_ENHANCEMENT, VEbox usage. VEbox/VQE contains:
    • Denoise,
    • Advanced Deinterlace (ADI),
    • Local Adaptive Contrast Enhancement (LACE),
    • Camera processing features (skin tone enhancement, etc.).
  • FREQ — Average GT frequency.
  • Capacity — how many channels can be assigned to a single server.
  • Limit — part of the GPU that will be overloaded if another one channel is added.

The exact performance depends not only on the above parameters, but also on the characteristics of the incoming stream (codec settings, progressive/interlaced scanning, etc.), applied filters, used audio codecs and the number of audio tracks, etc.

Calculating Storage Requirements for nDVR Services

To calculate data storage requirements, the following values are required:

  • D — number of channels to be recorded;
  • Cndvr — number of concurrent nDVR viewing sessions;
  • Bavg — average bitrate of the stream towards the subscriber, kbps;
  • Bsum — total bitrate of one channel (the sum of all bitrates of all streams — audio, video, subtitles — of one channel), kbps;
  • W — depth (window) of nDVR recording, hours.
Storage Capacity

Vstorage (Kbyte) = Bsum × W × D × 3600 ÷ 8

For example, for recording of 10 channels with a total bitrate of ~ 8000 kbps (video: 3000, 2000, 1500, 1000 kbps, audio: 4 tracks of 128 kbps) within 48 hours, the required storage capacity will be:

8000 (kbps) × 10 (channels) × 3600 (sec/hour) ÷ 8 (bit/byte) × 48 (hours) = ~ 1.65 Tbyte

When calculating the storage capacity, it is necessary to lay some stock (about 10–15%) for cases when input streams’ bitrates won’t be constant, and also due to performance degradation of some file systems/storages which occurs when a certain level of their fullness is exceeded.

Storage Performance (Write)

To calculate the number of IOPS, you need to determine the size of average disk operation, which depends on a significant number of factors, such as: the read and write block size, the ‘readahead’ settings, the data availability in OS’s PageCache, and so on. As a rated value, it is suggested to use the size of the operation 200 Kbyte (1600 Kbit).

In this case:

IOPS = Bsum × D ÷ 1600

For example, to record 10 channels of 8000 Kbit/s each will require storage performance of about 50 IOPS.

Storage Performance (Read) and Caching

Video streaming services (Unicast Live and nDVR) provide delivery of a relatively small amount of content to a large number of subscribers. At the same time, the popularity of different content items differs a lot:

  • some programs are watched more often than others,
  • the Live content is usually more popular than the content shown a few days ago,
  • there can be some “blockbusters”, which will be watched much more often than others,
  • etc.

Usually, these facts facilitate a good data caching. The cache can be implemented on several levels:

  • the operating system’s level (PageCache).
  • the SSD cache for slow block devices (using dmcache/lvmcache or bcache, for example)
  • as a simple HTTP cache (in-memory or with SSD drives) with your favourite HTTP reverse proxy.

Using HTTP cache, as a rule, is more effective and in the further calculations this method is considered.

For the nDVR services, it is desirable to provide an HTTP cache volume corresponding to 1–2 hours of content storage, i.e. Sndvr_cache = Bavg × 3600 ÷ 8.

For Unicast Live services, the cache should be approximately 5–10 minutes of content. At the same time, for channels with adaptive streaming, all bitrates must be included in this volume:

Slive_cache = Bsum × 600 ÷ 8.

Depending on the cache size and the load profile, you can achieve different caching efficiency (HitRate) and performance.

In practice, HitRate can meet 90% or more, but for new service calculations it is better to use lower values — about 65–70% for services implementing both nDVR and Live (i.e. 65–70% of traffic will be given out from the cache, load on the storage will be 30–35%).

Based on this, the storage read performance should be:

IOPS = Bavg × Cndvr ÷ 1600 × (100-HitRate)%,

where “1600” is the size of one disk operation in kilobits (200 Kbyte).

For example, to support 1,000 sessions with a bitrate of 3 Mbps if HitRate = 65%, you will need the storage with a performance of approximately 670 IOPS.

Using the CDN

If you’re expecting a broad geo distribution of the service, and/or want to reduce the impact of short-term peak loads on service quality, one of the possible options will be to use the CDN providers’ services or building your own CDN network.

SmartMEDIA can support all of the major CDN providers, including Akamai, Amazon CloudFront and others.

When using CDN, it is necessary to take into account that:

  • all requests for the VoD content can be cached for an infinite period;
  • requests for the Live/nDVR chunks can be cached for an infinite period (but it is reasonable to limit the caching period to the recording window duration);
  • requests for the HLS/DASH playlists can only be cached for a period equal to the playlist update interval (usually — half of the chunk’s duration). Lifetime DASH manifests can also be cached for an indefinite period.

Preparations

Configure the SmartLabs yum repository

All installation steps require the SmartLabs YUM repository to be configured properly. To configure the repository, run the following commands on the command line (bash):

sudo rpm -iUhv http://smartlabs-public:6vTh5WVrQlgF@repo.smartlabs.tv/repo/public/centos/7/x86_64/smartlabs-smartmedia-v-repo-1.0-1.el7.centos.x86_64.rpm

Configure SELinux

SmartMEDIA installation packages do not include SELinux rules. You can configure them by yourself using permissive mode.

If you’re going to disable SELinux, run the following command on the command line:

sudo setenforce 0

In the /etc/selinux/config file, set SELINUX to disabled:

SELINUX = disabled

After the reboot, check the status of SELinux:

sudo getenforce

The command should return Disabled.

Make Basic Configuration for IPTables Firewall

In this document, we assume that IPTables is used as the firewall with the default policy set to DROP for all the chains of the Filter table.

To install IPTables instead of FirewallD on CentOS7/RHEL7, run the following commands:

sudo systemctl stop firewalld

sudo systemctl disable firewalld

sudo yum -y install iptables iptables-services

sudo systemctl enable iptables

After setting up IPTables, the default policy for all chains of the filter table will be set to ACCEPT. Be careful while switching it to DROP and ensure you will not loose the access to the server.

Allow traffic for already established TCP connections and traffic on the loopback interface:

# IPTables basic rules

sudo iptables -I INPUT -i lo -m comment –comment “Allow Loopback traffic” -j ACCEPT

sudo iptables -I INPUT -p tcp -m state -state ESTABLISHED -m comment –comment “Allow incoming traffic for ESTABLISHED TCP connections” -j ACCEPT

sudo iptables -I OUTPUT -o lo -m comment –comment “Allow Loopback traffic” -j ACCEPT

sudo iptables -I OUTPUT -p tcp -m state -state ESTABLISHED -m comment –comment “Allow outgoing traffic for ESTABLISHED TCP connections” -j ACCEPT

After completing the installation and configuration of SmartMEDIA, remember to save the configured IPTables rules with:

sudo /usr/libexec/iptables/iptables.init save

Installing Packages

Quick “All-in-one” Installation

To install basic SmartMEDIA packages, run the following command:

sudo yum install smartmedia

After execution of this command:

  • MongoDB will be installed;
  • the following SmartMEDIA packages will be installed: smartmedia-conveyor, smartmedia-plgen, smartmedia-utils, smartmedia-nginx;
  • the /video directory will be created;
  • the time will be synchronized from the Internet resource clock.isc.org over the NTP protocol and the following services will be started:
    • ntpd,
    • mongod,
    • smartmedia-nginx,
    • smcvr,
    • smplgen.

To install other components, see the Individual Component Installation section.

Configure the IPTables rules as follows:

  • Allow incoming TCP connections to ports 80 and 443 for the Nginx service:

sudo iptables -I INPUT -p tcp –dport 80 -m state –state NEW -m comment –comment “SM: Allow HTTP requests from Media Streamers” -j ACCEPT

sudo iptables -I INPUT -p tcp -dport 443 -m state -state NEW -m comment –comment “SM: Allow HTTPS requests from Media Streamers” -j ACCEPT

  • Allow incoming multicast streams for the Conveyor service:

Bash (Unix Shell)

sudo iptables -I INPUT -d 224.0.0.0/4 -m comment –comment “SM: Allow incoming multicast” -j ACCEPT

# Outgoing multicast traffic (JOIN requests)

sudo iptables -I OUTPUT -d 224.0.0.0/4 -m comment –comment “SM: Allow outgoing multicast” -j ACCEPT

Individual Component Installation

SmartMEDIA components can be installed independently on different servers or virtual machines. Also, you can partially use the existing infrastructure (e.g. HTTP servers or an existing MongoDB installation), or configure a MongoDB cluster with replication.

Stream Processing and Record Servers

Install SmartMEDIA Conveyor:

sudo yum install smartmedia-conveyor

Configure IPTables rules:

# Incoming multicast traffic

sudo iptables -I INPUT -d 224.0.0.0/4 -m comment –comment “SM: Allow incoming multicast” -j ACCEPT

# Outgoing multicast traffic (JOIN requests)

sudo iptables -I OUTPUT -d 224.0.0.0/4 -m comment –comment “SM: Allow outgoing multicast” -j ACCEPT

# Outgoing traffic to MongoDB and S3 storage

sudo iptables -I OUTPUT -d <mongodb-ip-subnet> -p tcp –dport 27017 -m state –state NEW -m comment –comment “SM: Allow outgoing connections to MongoDB” -j ACCEPT

sudo iptables -I OUTPUT -d <s3-ip-subnet> -p tcp –dport <s3-port> -m state –state NEW -m comment –comment “SM: Allow outgoing connections to S3 Data Storage”  j ACCEPT

If you’re going to use POSIX storage (local disk, RAID array, iSCSI volume) to store media data, install the HTTP server too and allow incoming TCP connections to port 80:

# Install nginx http server

sudo yum install smartmedia-nginx

# IPTables rules for incoming connections:

sudo iptables -I INPUT -s <streamers-ip-subnet> -p tcp –dport 80 -m state –state NEW -m comment –comment “-M ACCEPT

If you are using HTTP or HLS stream sources, configure the appropriate IPTables rules for outbound connections to source servers.

Playlist Generator

Install the SmartMEDIA Playlist Generator package:

sudo yum install smartmedia-plgen

Configure IPTables rules:

# Incoming traffic

sudo iptables -I INPUT -s <streamers-ip-subnet> -p tcp –dport 9000 -m state –state NEW -m comment –comment “SM: Allow FastCGI requests to plgen from Media Streamers” -j ACCEPT

# Outgoing traffic

sudo iptables -I OUTPUT -d <mongodb-ip-subnet> -p tcp –dport 27017 -m state –state NEW -m comment –comment “SM: Allow outgoing connections to MongoDB” -j ACCEPT

Index Storage Servers (MongoDB)

Install the MongoDB database management software:

sudo yum install mongodb-org

To ensure fault tolerance, configure MongoDB replication (clustering).

As an option you can host MongoDB nodes on the playlist generation servers. This will increase the speed of data access and reduce server-to-server traffic when generating playlists. It is undesirable to use sharding, because it excludes the ability to retrieve all data from the local replica for generating playlists.

According to MongoDB recommendations, the odd number of nodes is preferred for replicated setup.

For more details on MongoDB replication, see https://docs.mongodb.com/manual/replication/.

Allow incoming requests to port 27017 from the record servers (to record indexes) and Playlist Generators (for reading indexes for playlists generation):

# Incoming traffic

sudo iptables -I INPUT -s <conveyor-ip-subnet> -p tcp –dport 27017 -m state –state NEW -m comment –comment “SM: Allow incoming connections to MongoDB from conveyor servers” -j ACCEPT

sudo iptables -I INPUT -s <plgen-ip-subnet> -p tcp –dport 27017 -m state –state NEW -m comment –comment “SM: Allow incoming connections to MongoDB from plgen servers” -j ACCEPT

HLS/DASH Streamers

Install the smartmedia-nginx package on servers that will deliver content to the end users:

sudo yum install smartmedia-nginx

Configure IPTables Rules:

# IPTables rules for incoming connections from everywhere:

sudo iptables -I INPUT -p tcp –dport 80 -m state –state NEW -m comment –comment “SM: Allow HTTP requests from Media Streamers” -j ACCEPT

sudo iptables -I INPUT -p tcp –dport 443 -m state –state NEW -m comment –comment “SM: Allow HTTP requests from Media Streamers” -j ACCEPT

For more information about SmartMEDIA components and their functionality, see “Services and Components.”

The complete list of packages included in the SmartMEDIA is shown below:

  • smartmedia-conveyor,
  • smartmedia-transcoder,
  • smartmedia-plgen,
  • smartmedia-utils,
  • smartmedia-nginx,
  • smartmedia-cets,
  • smartmedia-mpicker,
  • smartmedia-pvr,
  • smartmedia-rtspserver,
  • smartmedia-hlsredirector.

Installing Third-Party Components for Transcoding Support

The transcoding functionality is performed by the SmartMEDIA Conveyor service or by the SmartTranscoder service using the Intel QuickSync Video (QSV)/Intel Media SDK libraries. To enable this functionality, install the following packages on the transcoding servers:

  • Linux Kernel 3.10.0-514 (exact version is required),
  • intel-linux-media — Intel Media SDK/Driver,
  • kmod-ukmd — QSV Kernel Module (kernel version 3.10.0-514.el7.x86_64 required),
  • libdrm — Direct Rendering Manager runtime library,
  • libva — Video Acceleration API,
  • intel-gpu-tools — a set of utilities for Intel graphics processors.

You can do this by running the single command:

yum install smartmedia-trc

As a result, all necessary packages will be installed.

If current kernel version differs from the required, reboot the OS after the command execution to switch to the installed kernel version.

Installing the License

When you start SmartMEDIA services for the first time after installation, they will start and immediately stop with an error indicating the absence of a license file. Information about the error can be found in the services log files (in the /var/log/smartmedia directory):

[error] [default] Can not read license file “/opt/smartlabs/smartmedia/license.bin”, error = No such file or directory

[info] [default] SmartMEDIA license verification failed, exit

To add the license:

  1. Send the system UUID to the address support@smartlabs.tv. The UUID can be found in the log of any service after its launch. For example:

[2017-06-01 13: 15: 32.687637] [0x00007f0c77d7a777] [info] [default] System UUID: 00000000-0000-0000-0000-0011101DD111

  1. Obtain a license file from the SmartLabs support service.
  2. Copy the resulting file to /opt/smartlabs/smartmedia/license.bin on the server.
  3. Repeat the procedure for each server on which SmartMEDIA is installed.

First Start

After installing the license, start the SmartMEDIA services. For example, Conveyor and Playlist Generator are run as follows (other components are the same):

sudo systemctl reset-failed

sudo systemctl start smcvr smplgen

After the server reboot, SmartMEDIA services will be started automatically.

To get started, edit the SmartMEDIA component configuration files (see the Configuration Reference sections). In particular, specify the addresses of the channel sources to be recorded on the video server in the configuration file of the SmartMEDIA Conveyor component:

/opt/smartlabs/smartmedia/conveyor/config/channels.json

Changes in the channels.json file are applied automatically, service restart is not required.

The process of updating channel settings can be controlled using the Conveyor’s log.

Performance Optimization

Disk Subsystem

When using storage on local disks or RAID arrays you should paid an attention to I/O subsystem settings. Below are some recommendations that are applicable in most cases.

Use the deadline scheduler for all block devices responsible for storing content

You can install the scheduler for the sdX device with the following command:

echo ‘deadline’ > /sys/block/sdX/queue/scheduler

Do not forget that these settings will be reset and need to be made again after the OS restart. To persist, you can add them to the file /etc/rc.local or create an init.d script.

To configure the scheduler globally, add the elevator=deadline parameter to the kernel configuration string GRUB_CMDLINE_LINUX in the file /etc/default/grub, then rebuild the grub configuration (grub.cfg). For example:

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR=$(sed’s, release .*$,,g’ /etc/system-release)

GRUB_DEFAULT=saved

GRUB_DISABLE_SUBMENU=true

GRUB_TERMINAL_OUTPUT=“console”

GRUB_CMDLINE_LINUX=“vconsole.font=latarcyrheb-sun16 vconsole.keymap=us rd.lvm.lv=vgroot/root elevator=deadline crashkernel=auto rhgb quiet”

GRUB_DISABLE_RECOVERY=“true”

You can rebuild the bootloader configuration with these commands:

  • on servers with BIOS: # grub2-mkconfig -o /boot/grub2/grub.cfg
  • on servers with UEFI (RHEL7): # grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
  • on servers with UEFI (CentOS7): # grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Ensure that you have enough RAM

The amount of RAM should be sufficient to accommodate the “hot” data of OS’s PageCache. As you know, the amount of memory reserved for PageCache can be recognized using the command free (column “buff/cache” or “cache”, depending on OS version):

# free -m

             total        used        free      shared  buff/cache   available

Mem:         257756        5999        2003      241580      249753        8852

Swap:             0           0           0

Zero or low values (in conjunction with the zero value of the “free” column) can be the sign of low memory and associated low performance.

Avoid using swap. If it cannot be disabled, reduce the probability of using it:

sysctl vm.swappiness=0

echo “vm.swappiness=0”>> /etc/sysctl.conf

Select the appropriate readahead values

Read Ahead can increase the speed of data access by reading multiple blocks in a row instead of reading one requested data block. Reading is done into the PageCache (we do not consider the case with the O_DIRECT flag set, because it is inappropriate for the expected load), so the query of the next block will not lead to an I/O operation, but will be processed from the RAM.

Setting too small readahead values will increase the number of IOPS for the same number of read requests. Setting too large values can result in “knocking out” the necessary data from the PageCache before it was used, by unnecessary blocks (those ones that will not be used or will be used after they will be “knocked out” from the cache by another request).

The readahead value can be applied to a block device. You can find out the current value for the sdX device as follows:

blockdev –getra /dev/sdX

Set the value for the sdX device:

blockdev –setra N /dev/sdX

where N is the number of sectors (512 bytes).

Do not forget that these settings will be reset and need to be made again after the OS restart. To persist, you can add them to the file /etc/rc.local or create an init.d script.

Use the optimal file system settings

Disable files access time modification (atime) and write boundaries:

mount -o remount,noatime,nobarrier /your/mountpoint

Do not forget to make the appropriate changes to /etc/fstab.

If you are using the XFS file system over a RAID array, optimize the file system settings for the RAID array you are using. In particular, set the values sunit, swidth, agcount, agsize according to the number of disks and stripe size of your array. More information can be found in XFS FAQ.

The XFS file system allows you to put the journal on a separate partition. This can lead to increased performance (if you are using a solid-state drive (SSD) for logging tasks), or reduce it (if one device serves the logs of several file systems, but it hasn’t enough performance).

File deletion from XFS filesystem is too slow. We don’t recommend to use it with “file-per-chunk” storage scheme. Use ext4 filesystem or large segments.

Note that most of the parameters that optimize XFS performance can only be set at the time the filesystem is created and can not be overridden at the time of mounting.

For more information about XFS, see man mkfs.xfs and man mount.

Use WriteBack for hardware RAID controllers with a backup battery (BBU)

WriteBack allows you to significantly increase recording performance by combining several small write operations into single one. The use of WriteBack is especially important for RAID5/RAID6 arrays, in which the checksum also must be recalculated and rewritten each time a single block is going to be written.

DO NOT USE WRITE-BACK MODE WITHOUT BACKUP BATTERY OR BATTERY FAILURE! THIS MAY LEAD TO DATA LOSS!

Align the HDD partitions

Sometimes, when using discs with Advanced Format, you need to align the partitions so that the partition beginning coincides with the physical sector beginning, otherwise performance degradation is possible.

To check whether partitions are created correctly, you can use the parted utility:

root@smartmedia:~# parted /dev/sdb “align-check”

alignment type(min/opt) [optimal]/minimal?

Partition number? 1

1 aligned

To automatically align the partition at the creation stage, pass the -a optimal option to the parted utility:

root@smartmedia:~# parted -a optimal /dev/sdb

GNU Parted 3.2

Using /dev/sdb

Welcome to GNU Parted! Type ‘help’ to view a list of commands.

(parted)

For more details about parted, see man parted or https://www.gnu.org/software/parted/manual/html_node/index.html.

Monitor the hardware

The smartctl system utility and the smartd service allow you to monitor the state of the block devices: the number of HDD corrupted blocks, the SSD health, etc.

smartctl can be used both for controlling single disks, and, in most cases, for controlling disks in a hardware RAID array.

Network Subsystem

Use the manufacturer’s recommended drivers and firmware for network adapters

Often, the low performance of the network subsystem is caused by drivers and low-level firmware of network adapters (NIC). Use recommended versions of drivers and firmware (as a rule, these are the latest publicly available versions).

Reduce the number of interrupts (IRQs) and distribute interrupts across multiple cores

Most of modern network adapters (NICs) allow you to configure the frequency of interrupts and the number of send (Tx) and receive (Rx) queues depending on the number of CPU cores. In some cases, the number of queues is set automatically, but for some adapters this value must be set manually when the NIC driver is loaded.

Use the irqbalance service to distribute interrupts across various OS kernels. Do not allow a large number of interrupts to be concentrated on one core.

In some cases, irqbalance redistributes interrupts too often, which can result in more than necessary NUMA memory accesses and performance degradation. In this case, it may make sense to stop the irqbalance service or manually redistribute the interrupts without it.

To find out the current interrupts distribution by CPU cores (the total number of interrupts processed by each kernel), you can run the following command:

cat /proc/interrupts

Unfortunately, the Linux OS does not allow to reset the interrupt counters after the kernel interrupts are redistributed.

Use the hardware acceleration capabilities of network adapters

In most cases, TCP Offloading and UDP Offloading allow to reduce CPU load while calculating TCP/UDP checksums and their defragmentation, as well as the number of interrupts, which also reduces the CPU load.

Optimize the OS network stack

Linux provides a wide range of network subsystem settings via procfs or using the sysctl utility.

For more information about OS network stack settings, see here.

Choose the best congestion control algorithm for TCP

The Linux network stack can use various congestion control algorithms for TCP. The list of algorithms loaded into the kernel and the currently used algorithm can be obtained using the sysctl utility:

# sysctl net.ipv4.tcp_available_congestion_control

net.ipv4.tcp_available_congestion_control = cubic reno

# sysctl net.ipv4.tcp_congestion_control

net.ipv4.tcp_congestion_control = cubic

The list of available modules in the system can be obtained as follows:

# find /lib/modules/`uname -r`/kernel/net/ipv4 -name tcp_*

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_diag.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_hybla.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_westwood.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_illinois.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_lp.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_veno.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_highspeed.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_dctcp.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_scalable.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_vegas.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_yeah.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_bic.ko

/lib/modules/3.10.0-514.el7.x86_64/kernel/net/ipv4/tcp_htcp.ko

You can load the module to the system using the modprobe command:

# modprobe tcp_yeah

You have mail in /var/spool/mail/root

# lsmod | grep yeah

tcp_yeah               12635  0

tcp_vegas              13839  1 tcp_yeah

Depending on the characteristics of the data transmission channel (RTT, packet loss, throughput), different algorithms will show different results. For example, mechanisms that work well at low losses (for example, cubic) can give unsatisfactory results at high losses (> 3–5%) and large RTT (> 100ms), and vice versa.

According to our observations, the yeah algorithm is suitable for most circumstances, but we recommend you to conduct your own testing and choose the best algorithm for your conditions.

HTTP Server (nginx)

Turn on the use of sendfile

Using the sendfile system call allows to significantly reduce the number of memory copying operations, reduce the CPU load and increase the overall system performance.

When using HTTPS or data compression (gzip), sendfile is not used, even if the appropriate setting is present (because the data must be encrypted and/or compressed before sending to the socket).

To enable sendfile globally, in the http section of the nginx configuration file, specify:

http {

   sendfile on;

}

The sendfile system call allows you to initiate the data transfer from a file descriptor to a TCP socket (or other non-blocking socket). The call will be terminated either after sending all the necessary data, or after the socket buffer is full and it becomes not ready for transmitting.

For very fast connections, this can mean that the blocking sendfile call will be completed only after the whole file is transferred. To avoid this, specify the maximum amount of data nginx will try to send per one sendfile call:

http {

   sendfile_max_chunk 131072;

}

Decreasing sendfile_max_chunk can lead to too many reads (can be partially compensated by read ahead, see above), increasing — to too long blocking of the primary execution thread or worker thread (see below) to send data.

Enable AIO threads on servers that perform blocking I/O

All read and write operations on block devices (disks, RAID arrays, SSDs, etc.) in Linux are blocking — the main execution thread goes into the D-state and waits for the operation to complete. In the case of nginx, when one thread serves a large number of client requests, this leads to the blocking of all requests by single I/O intensive query.

To prevent the thread from blocking by the I/O task, Linux supports asynchronous operations (AIO). But using AIO requires, at first, disabling the use of PageCache (operations must be performed with the O_DIRECT flag) and leads to a number of other shortcomings.

To work around the problem of using the system AIO, nginx (since version 1.7.11), supports the use of a thread pool to handle I/O operations. All blocking operations can be transferred to a separate thread pool, which eliminates the blocking of the main execution thread.

To enable the thread pool:

  1. Configure the thread pool in the main context of the configuration file, for example: thread_pool iopool threads=32 max_queue=65536; 
  2. Enable AIO for the desired location:

location /video/ {

   sendfile on;

   aio threads=iopool;

}

AIO threads do not make sense to include on locations that are reading from tmpfs (if swap is not used).

The expediency of using AIO threads on proxying data locations (without caching) depends on the probability of recording this data to a “slow” device (disk/SSD) — respectively, on the data type and the total system load.

Select a sufficient number of workers

Typically, the optimal number of workers is equal to the number of cores or number of threads (in case of HyperThreading) CPU.

Increasing the number of workers makes sense only if the workers go into the I/O wait mode (the so-called “D-state”), but in this case, it is usually better to use the thread pools.

Optimize the nginx service performance

Nginx has a large number of configuration options, allowing you to configure the interaction with a network stack, OS, memory for specific loads.

The basic settings can be:

timer_resolution 1ms;

events {

   worker_connections 10240;

   use epoll;

}

http {

   keepalive_timeout 60;

   tcp_nodelay on;

   tcp_nopush on;

}

Solving Main Tasks

This part presents instructions for implementation of key SmartMEDIA Content Delivery System services.

Live Streams Recording

Prepare the source streams

The streams in the MPEG2-TS container delivered by one of the following protocols can be used as the source streams for the SmartMEDIA server:

  • UDP over IP Multicast (without RTP encapsulation);
  • HTTP Stream (SmartMEDIA acts as an HTTP client);
  • HLS according to draft-pantos-http-live-streaming-07, without encryption.

If you do not have streams that meet these requirements, you can create test streams in any available way:

  • Broadcast an existing TS file using the tsplay utility (included in the tstools package).
    For example:
    tsplay -loop test.ts 239.65.9.1:5000
  • Broadcast a static image using ffmpeg.
    For example:
    ffmpeg -loop 1 -i teaser_1920x1080.jpg -f lavfi -i “sine=frequency=1000” -c:v libx264 -pix_fmt yuv420p -b:v 1000k -g 75 -r 25 -c:a aac -ac 2 -ar 48000 -ab 128k -f mpegts “udp://@239.65.9.13:5000?pkt_size=1316&buffer_size=131070&reuse=1&ttl=10”
  • Broadcast existent TS file using the service smartMPicker.
  • Any other way you prefer.

Ways to Configure the Channel Recording

Channel recording with the SmartMEDIA Conveyor service can be set up in two ways: via JSON configuration files or web-based console. This article explains the simple setup of recording via configuration files. For a description of the configuration via the console, see here.

Determine the storage type and make the appropriate settings

Local POSIX Storage

POSIX storage should be available on the SmartMEDIA Conveyor server as a local mount point. The /video directory is a standard directory for the SmartMEDIA Conveyor server used in the basic configuration.

In the main Conveyor service configuration file, add the POSIX storage section (the configuration for /video is already present in the basic configuration) to the data_storages section:

{

 “data_storages”: [

   {

     “id”:“fs_hdd”,

     “fs”: {

       “path”:“/video”

     }

   },

   {

     “id”:“fs_tmpfs”,

     “fs”: {

       “path”:“/video-tmpfs”

     }

   }

 ]

}

Object Storage with Access Using S3 protocol

You will need to find out the following information for configuration:

  • storage HTTP URL,
  • bucket identifier,
  • the access key,
  • the access key identifier.

In the main Conveyor service configuration file, add the S3 storage section to the data_storages section:

{

 “data_storages”: [

   {

     “id”:“s3”,

     “s3”: {

       “host”:“192.168.2.12:8080”,

       “bucket”:“test”,

       “access_key_id”:“60ZXGDH7Z8L2K86L6AJ3”,

       “access_key”:“Bnc19iicY61Lc8Y9x3zbqB7FmW89EokGCJ3p9FrO”,

       “authorization_version”:“v4”,

       “max_connections”:50

     }

   }

 ]

}

Make other settings for the service

If you plan to use the encryption, add the drms section with the DRM-specific configurations in the main Conveyor configuration file:

{

 “drms”: [

   {

     “id”:“verimatrix”,

     “verimatrix”: {

       “address”:“192.168.32.32”,

       “port”:12684,

       “key_update_period_sec”:1800

     }

   },

   {

     “id”:“widevine_test”,

     “cenc”: {

       “url”:“http://10.10.10.10/cenc/getkey”,

       “signer_name”:“conveyor”,

       “signer_key”:“1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9”,

       “signer_iv”:“d58ce954203b7c9a9a9d467f59839249”,

       “crypto_period_length”:0,

       “crypto_period_count”:0,

       “key_server_type”:“udrm”

     }

   }

 ]

}

Define a channel and configure the basic properties of the channel

In the Conveyor channel configuration file, in the channels section, add the channel element:

{

 “id”:“CH_TEST1”,

 “container_type”:“mp4”,

 “index_storage”:“mongo_local”,

 “data_storages”: [

   “fs_hdd”

 ],

 “recording_window”:“1d”

}

Set the source for the recording channel

In the Conveyor channel configuration file, add the sources and demuxers sections to the configuration of the created channel:

{

 “sources”: [

   {

     “id”:“ts_multicast_1”,

     “url”:“udp://239.255.0.55:1136”

   }

 ],

 “demuxers”: [

   {

     “id”:“dmx1”,

     “source”:“ts_multicast_1”,

     “tracks”: [

       “vid0”,

       “aud0”,

       “aud1”

     ]

   }

 ]

}

Set the transcoding of incoming streams (if necessary)

To support transcoding, the Conveyor or SmartTranscoder services must be installed on equipment supporting the Intel QSV technology, and the Nvidia NVENC technology for the SmartNvidiaTranscoder service. For details, see “Requirements for transcoding servers“.

In the Conveyor channel configuration file , add video_transcoders and audio_transcoders sections to the channel:

{

 “video_transcoders”: [

   {

     “id”:“vtrc”,

     “source”:“dmx1:vid0”,

     “use_qsv”:true,

     “out”: [

       {

         “bitrate”:“2800K”,

         “gop_size”:“60”,

         “width”:“1280”,

         “height”:“720”

       },

       {

         “bitrate”:“2200k”,

         “gop_size”:“60”,

         “width”:“1280”,

         “height”:“720”

       },

       {

         “bitrate”:“1300k”,

         “gop_size”:“60”,

         “width”:“720”,

         “height”:“576”

       }

     ]

   }

 ],

 “audio_transcoders”: [

   {

     “id”:“atrc_eng”,

     “source”:“dmx1:aud0”,

     “out”: [

       {

         “bitrate”:“384k”

       }

     ]

   },

   {

     “id”:“atrc_afr”,

     “source”:“dmx1:aud1”,

     “out”: [

       {

         “bitrate”:“128k”

       }

     ]

   }

 ]

}

To use the SmartTranscoder service add its configuration to the network_transcoders section of the channel. Afterwards set the appropriate transcoder ID with the net_trc option:

{

 “network_transcoders”: [

   {

     “id”:“QSV_SERVER_1_56”,

     “host”:“192.168.1.56”,

     “port”:7783

   }

 ],

 “video_transcoders”: [

   {

     “id”:“vtrc”,

     “source”:“dmx1:vid0”,

     “use_qsv”:true,

     “net_trc”:“QSV_SERVER_1_56”,

     “out”: [

       {

         “bitrate”:“2800K”,

         “gop_size”:“60”,

         “width”:“1280”,

         “height”:“720”

       },

       {

         “bitrate”:“2200k”,

         “gop_size”:“60”,

         “width”:“1280”,

         “height”:“720”

       },

       {

         “bitrate”:“1300k”,

         “gop_size”:“60”,

         “width”:“720”,

         “height”:“576”

       }

     ]

   }

 ]

}

Configure the stream recording

In the Conveyor channel configuration file, add the muxers section to the channel:

{

 “muxers”: [

   {

     “bw”:“3000000”,

     “dir”:“video/bw3000000”,

     “sources”: [

       {

         “master”:“true”,

         “source”:“vtrc:vid0”

       }

     ]

   },

   {

     “bw”:“2200000”,

     “dir”:“video/bw2200000”,

     “sources”: [

       {

         “source”:“vtrc:vid1”

       }

     ]

   },

   {

     “bw”:“1300000”,

     “dir”:“video/bw1300000”,

     “sources”: [

       {

         “source”:“vtrc:vid2”

       }

     ]

   },

   {

     “bw”:“384000”,

     “dir”:“audio/eng/aac”,

     “lang”:“en”,

     “sources”: [

       {

         “source”:“atrc_eng:aud0”

       }

     ]

   },

   {

     “bw”:“128000”,

     “dir”:“audio/afr/aac”,

     “lang”:“af”,

     “sources”: [

       {

         “source”:“atrc_afr:aud0”

       }

     ]

   }

 ]

}

Configure the encryption (if necessary)

In the Conveyor channel configuration file in the channel muxers section, add the encryptor section:

{

 “encryptor”: {

   “drm”:“widevine_test”

 }

}

Check out the result

If you use the MP4 container, the recorded content will be available as DASH and as HLS with the mp4 container. The URL for the channel playback in this case will look like:

  • for DASH: http://streamer1.example.com/dash/CH_TEST1/playlist.mpd
  • for HLS: http://streamer1.example.com/hls/CH_TEST1/master.m3u8

When using the MPEG2 TS container, the recorded content will be available only as HLS: http://streamer1.example.com/hls/CH_TEST_TS/variant.m3u8

You can check the playback on any player supporting the corresponding protocol. For example:

  • for DASH — Shaka Player (https://shaka-player-demo.appspot.com/demo/). Please note that the security settings of modern browsers do not allow the use of HTTP and HTTPS on the same page at the same time, therefore, the channel playback via HTTP or with an untrusted / expired certificate may not be available without additional browser settings;
  • for HLS — http://osmfhls.kutu.ru/ or any Apple device (iPad, iPhone, Mac). To play a channel on Apple devices, just open its URL in the Safari browser.

Configuring Channel Recording via Web Console

SmartMEDIA Admin Console — a web-based interface allowing you to configure the recording and transcoding of source media streams. The console is compatible with almost all popular web browsers. This article describes the console features you can use to configure the channel recording.

Interface Overview

For the address and access details of the console, please contact the SmartLabs Support Team or your system administrator. The login page looks like this:

Image1

Login page

After you enter login and password, the Home page opens:

Image3

Home page

The main menu allowing you to switch between 3 spaces:

  • Channels — a space for setting up the recording and transcoding of source media streams;
  • Users — a space for managing the Admin Console users;
  • Server — a space for operator-controlled SmartMEDIA server settings.

Setting Up Channel Recording

To add a new channel, click . After that, on the right side of the page you will be prompted to edit channel settings:

Image2

Channel settings

The channel settings are divided into several sections arranged in the order of original media stream processing. Depending on requirements, certain sections may not be filled (remain empty). Examples of typical channel configuration are shown in the section “Channel Configuration Examples“. Each processing step (section) will be described in the following chapters.

Basic Settings

This section allows you to edit the basic settings of the channel recording.

  • ID — the unique channel identifier
  • Recording window — the default content storage period, in units of time.
  • Use wallclock instead PTS — If the option is enabled, when recording SCTE-35 events, the system time is saved instead of the time encoded in the event.
  • Container type — the container type in which the content should be recorded: ts or mp4.
  • Index storage — the identifier of the index database configuration. The list of available storages is determined by the global configuration of the SmartMEDIA Conveyor service.
  • Offset — the system time offset when recording SCTE-35 events, if the Use wallclock instead PTS option is enabled.

Data storages

The Data storages section allows you to select a storage for recording ready-to-broadcast content. You can add one or several available storages, the list of which is determined by the global configuration of the SmartMEDIA Conveyor service.

Content can be recorded to POSIX storage (local file systems, NFS, external storage) and to external object storage using Amazon S3 protocol.

Sources

This section contains the settings of the source TV streams (multicast or unicast in the TS container) received by the SmartMEDIA Conveyor service.

Incoming streams must meet the following requirements:

  • Container: SPTS or MPTS MPEG2-TS (ISO/IEC 13818-1, ITU-T).
  • Protocols:
    • UDP over IP Multicast (without RTP encapsulation);
    • HTTP (MPEG2-TS stream over HTTP);
    • HLS according to draft-pantos-http-live-streaming-05, without encryption.
  • Supported video codecs: H.262/MPEG2, H.264/AVC, H.265/HEVC.
  • Video resolution: up to 4K, up to 60fps. Both progressive and interlaced streams are supported.
  • Supported audio codecs: AAC, AC3, MP2, MP3, DTS.

Parameters to configure:

  • ID — the unique source identifier.
  • url — URL of the source TS stream (HTTP or UDP).
    • Format for multicast sources: udp://224.5.6.7:5000
    • Format for HTTP sources (HLS or continuous HTTP stream) — regular URLs are specified.
  • hls.stream_type — HTTP stream type. If the parameter value is HLS and the url parameter has an HTTP URL, SmartMEDIA Conveyor will work with this stream over HLS protocol.
    • Select the HLS value, if the master playlist is specified in the url parameter and then you want to set the profile (hls.bandwidth) that will be selected as the source.
    • Select the HLS_STREAM value, if the url parameter contains a specific profile playlist.
  • hls.bandwidth — (only for hls.stream_type=HLS) the bandwidth, by which the stream will be selected from the variant playlist. If the parameter value is 0, the first stream in the playlist is used.

Demuxers

This section defines the parameters of the source streams demultiplexing.

SmartMEDIA supports 2 recording modes:

  • Main mode — recording with re-multiplexing
    The incoming stream is completely demultiplexed, only the desired tracks (audio and video) are used. Then the elementary stream is encrypted if necessary, packed into the desired container (MPEG2-TS or ISO BMFF) and written into the storage.
    To work in this recording mode, the incoming stream should not be encrypted, otherwise all information about encryption will be lost and it will not be possible to reproduce it.
    If you are going to use this mode, you must fill in the fields in the
    Demuxers section to determine which video, audio, or subtitle tracks you want to extract from the source stream. The number and type of tracks in the source stream can be found using third-party utilities such as ffprobe.
  • Pass-Through
    Incoming TS-stream is written in the form as it comes to the server. The stream is not remuxed, it is divided into chunks and written into the storage. In particular, all timestamps are stored in the stream, as well as CC errors, if they were present in the incoming thread.
    In this mode, the server can also accept encrypted TS streams if the TS packet structure is preserved and the NAL-unit headers are not encrypted (for example, DVB Simulcrypt or Common Encryption for MPEG2-TS encrypted streams).
    This mode does not require demultiplexing, so the fields of the “Demuxers” section should remain empty.

Parameters to configure:

  • ID — the unique demuxer identifier
  • source — the TS stream source identifier
  • MPTS program number —  ID of the program to be demultiplexed from the MultiProgram MPEG-TS stream. If the program ID is not set (equal to zero), and several PMT PIDs are detected in the PAT table, an error warning is written to the log.
  • Preset — an option that defines how to track PSS changes in H264 video streams:
    all — all PSSs found in the stream are compared. If the PSS has changed, headers with initialization data are created for each stream and recording of a new period is started. The PPS is not added into chunks.
    first — only the first PSS found in the stream is stored when starting or restarting the recording process. In this case, the first and all subsequent PPSs are stored during chunk muxing.
  • Remove filler data — an option allowing to drop NAL units with the FILLER_DATA type when remuxing H264 and H265 streams. Some SmartTV models are not able to correctly play streams with FILLER_DATA, so it is recommended to enable this option. If you need to keep FILLER_DATA in the stream for some reason, leave this option unchecked.
  • Parse SCTE 35 — flag to enable/disable parsing of the SCTE-35 markers with their subsequent saving to the database.
  • Interpret all I-Frames as IDR — an option allowing to split the stream into chunks not only by IDR IFrame, but also by non-IDR IFrame. In standard mode, SmartMEDIA Conveyor service searches for an IDR frame to start a new chunk. However, some non-standard streams may not contain IDR frames, but only non-IDR Iframes. To work with such streams, enable this option.
  • AAC – decode first sample — for some AAC streams, it is not enough to get the samplingFrequencyIndex value from the ADTS header, as a result, the actual sampling frequency is doubled. This option enables the decoding of the first sample when starting (restarting) the recording using ffmpeg.
  • tracks — the list of output tracks in the format <type><number>. For example: vid0, aud1 or sub0. The following types are supported: vid — video, aud — audio, sub — subtitles (DVB Subtitles (ETSI EN 300 743) or Teletext (ETS 300 706)). For Teletext subtitles the page number can be defined as an argument, e.g. sub0?777 for page #777. The default page number is 888.

Network transcoders

After demultiplexing, transcoding can be applied to the extracted video streams. Video transcoder functions include decoding, filtering, and encoding, which can be performed by network transcoders.   Typically, their installation and configuration are carried out by SmartLabs. If so, please contact SmartLabs Support Team to get the settings for this section.

You can also configure the network transcoders yourself or find out the settings for this section using the information from the Configuration reference of the SmartTranscoder and SmartNvidiaTranscoder services.

Parameters to configure:

  • ID — the unique identifier of a network transcoder.
  • host, Port — IP address and port of the network transcoder.

In this section, network transcoders are only connected to the system. Their configuration is performed in the next section — Video transcoders.

Video transcoders

This section describes the settings for both network and local transcoders (if the configured SmartMEDIA server also has GPUs intended for transcoding). The incoming stream must be unencrypted (otherwise it cannot be decoded).

The following filters can be applied to video streams:

  • Deinterlacing (applied automatically if the incoming stream is interlaced);
  • Frame resize;
  • Logo overlay;
  • Frame crop.

Target formats can be:

  • Video codecs: H.264/AVC, H.265/HEVC;
  • Video format: up to 4K, up to 60fps, progressive scan;

Parameters to configure:

  • ID — the unique identifier of the video transcoder configuration.
  • Decode encrypted — if the original multicast stream has a reference to any CAS in PMT, then such stream is considered encrypted and cannot be decoded. But in certain cases, the stream is “encrypted“ with an encryption level of ”0”. Such a stream can be decoded with this function.
  • Source — the video stream ID for transcoding, specified together with the demuxer. Example: dmx0:vid0, where dmx0 — demuxer ID, vid0 —  video stream ID.
  • Transcoder — the unique identifier of the local or network transcoder.
  • Max input resolution — maximum input stream resolution expected by the transcoder for the channel. Valid values are: sd, hd and uhd.
    SmartMEDIA License defines the maximum number of SD, HD and UHD streams to be transcoded. If the configuration has more transcoders with the specified resolution than allowed by the license, warning is written in the log file and transcoder service stops. However, licenses for higher resolutions can be used to process channels with lower resolutions (for instance, UHD license can be used to process HD and SD streams, or HD license can be used to process SD streams).
    Furthermore, besides checking the configuration, transcoder continuously checks the input stream resolution whether it corresponds to the declared value. If the stream resolution exceeds the declared one (for instance,
    sd is declared, but stream is 1920×1080 pixels) channel processing stops.
  • Use MFE — enables the Intel Multi-Frame Encoding technology when transcoding with Intel QSV-enabled CPUs.
    MFE improves GPU utilization while encoding multiple streams with low resolution (less then 1080p), especially for the most powerful GPUs (Intel Iris Pro Graphics 580 and better). If Multi-Frame Encoding is enabled for the transcoder, all output streams described in
    Outs section can be encoded in parallel. However, the technology doesn’t affect encoding of multiple streams of different channels because they are encoded in different QSV sessions.
    See the Intel MediaSDK documentation for more details.
  • Enable closed captions — a flag to enable decoding of EIA-608/708 Closed Captions from the H264/H265 video stream and to include them into the output H264/H265 video streams. QSV supports only H264 video streams, Nvidia supports H264/H265 video streams. Subtitles of this type are passed in SEI (Supplemental Enhanced Information) messages within the video track, so the separate track is not created in the playlist and their processing is part of the video transcoding.
  • Degree of parallelism — the degree of parallelism when executing tasks inside the Intel MediaSDK. Specifies the number of asynchronous operations that the application can run before explicit synchronization (waiting) is required to get the result. This value applies to the decoder, encoder, and VPP filters, meaning that each pipeline component can run the specified number of asynchronous operations. Values > 1 can improve GPU utilization and performance, especially if a small number of low-resolution channels are transcoded and a value = 1 does not lead to full GPU utilization. However, increasing this value also leads to increased resource consumption, in particular, it is necessary to allocate more surfaces for storing decoded frames. Usually, a value > 5 does not lead to a noticeable performance improvement but leads to increased resource consumption. If GPU utilization is already achieved due to the fact that a large number of channels are transcoded into several bitrates, then it may be advisable to reduce the Degree of parallelism (for example, to 2) for balanced resource consumption. If GPU utilization is already achieved by running transcoding of a large number of channels in several bitrates, then it may be advisable to reduce the value (for example, to 2) for balanced resource consumption.
  • Enable double-rate deinterlacing — flag to double the frame rate when deinterlacing.
  • logo — a section with settings for the logo overlaid on top of the video stream (the Logo Overlay filter). If omitted, the logo is not overlaid.
    For best transcoding performance, only one image is overlaid on a video frame at a time. If you need to overlay several graphic elements at the same time, combine them into a single image in a graphics editor in advance.
  • URL — HTTP URL or path in the local file system to the PNG image (32-bit truecolor RGBA) that will be overlaid as a static logo. It can be used to set a single permanent logo or placeholder when using dynamic Timed Logos. In the second case, the static logo will be displayed when there is no active dynamic Timed Logo in the scheduler. The image is downloaded from the specified URL each time the channel recording starts. If the image cannot be downloaded, a warning is displayed in the log and the channel is recorded without the logo overlay.
    If the URL is not specified, then the static logo is not used, but dynamic Timed Logos created via the JSON-RPC API and stored in the database can be overlaid.
  • X, Y — horizontal and vertical coordinate of the upper-left corner of the logo on the original video frame (before scaling), in pixels. Used only if a static logo URL is specified.
  • Opacity — defines the logo opacity from 0 to 100, where 0 — completely transparent, 100 — completely opaque. The parameter must be known when the transcoder starts, therefore it is set in the transcoder configuration and cannot be changed when creating dynamic Timed Logos via JSON-RPC API.
  • Transparent color — grayscale color from white to black, which is considered transparent when overlaying the logo using the Luma Keying method, i.e. only the brightness component of the color (Luma) from 0 to 255 is used to determine the transparent areas of the logo. The color is set in the FFmpeg color format, i.e. in the form of a name (black, white, red) or in the format #RRGGBB. So it is possible to specify colors other than gray such as red or blue, but since only the brightness component is used, light gray, light red and light blue colors will be the same.
    The parameter must be known when the transcoder starts, therefore it is set in the transcoder configuration and cannot be changed when creating dynamic Timed Logos via JSON-RPC API. This parameter is also used as a flag to enable the dynamic Timed Logo scheduler. To be able to configure time-bound logos via the JSON-RPC API, you must first set the color for Luma Keying (common to all logos) in the transcoder configuration.
  • Crop — the section responsible for configuring a rectangular area for cropping the edges of the video frame (Crop filter). If not specified, the cropping is not applied.
    If the Logo Overlay feature is configured, the logo is positioned in the coordinates of the cropped video frame, not the full decoded frame. For example, if the
    logo.x = 0 and crop.x = 100, then the logo will not be cropped.
  • Width, Height — the width and height of the cropping rectangular area, in pixels. If not set, the source frame width and height are used. If set, it is limited to the range [from 2 to input width and height].
  • X, Y — the horizontal and vertical coordinate of the left side of the rectangular cropping area, in pixels. If not set, it is calculated as (input width – Crop.Width)/2 and (input height – Crop.Height)/2, i.e. the area is horizontally aligned to the center of the frame. If set, it is limited to the [0, input width – Crop.Width] and [0, input height – Crop.Height] range.
  • Outs — output video streams settings.
  • bitrate — the target output steam bitrate. Specified in size units.
  • Max bitrate — the maximum bitrate for the output stream, in bits/s. Specified in size units . If it is set (not equal to 0) and is equal to the target bitrate (bitrate field), then the Constant Bitrate Control (CBR) mode is used, otherwise — Variable Bitrate Control (VBR). For the VBR mode, this parameter specifies the maximum bitrate at which encoded frames are sent to the Video Buffering Verifier (VBV). For the VBR mode, this parameter determines the maximum bitrate of encoded frames to be delivered to the Video Buffering Verifier (VBV). If set to 0, VBR mode will be used and the parameter will be calculated by Intel MediaSDK based on the target bitrate, frame rate, codec profile and level, and other parameters.
  • codec — the video codec to be used to encode the stream: h264 or h265.
  • VBV buffer size — the size of the Video Buffering Verifier (VBV) buffer, in bits. Affects the variability and deviation of the bitrate from the average value. The smaller the buffer, the closer the bitrate is to the average value, less spikes, but the image quality may degrade. It is recommended to start with a buffer size sufficient for 2 seconds of video with a maximum bitrate of Max bitrate, that is, VBV buffer size = 2 * Max bitrate. Then decrease or increase it depending on the requirements for the bitrate variability. If the client device has a small buffer (for example, old STBs), then you can reduce the VBV buffer size to a size of one Max bitrate. If you need to strictly limit the bitrate fluctuations, you can reduce the buffer to half of the Max bitrate or less. But in this case, it is recommended to check that the image quality remains acceptable. If the buffer size is insufficient, the encoder has less room for optimization and efficient encoding, so the quality can be reduced (increased Quantization Parameter, QP) for large frames (for example, I-frames) so that they fit into the bitrate limit. This can be represented as the periodic appearance of blurry and fuzzy frames. This is especially true for the Constant Bitrate Control (CBR) mode. In this case, it is recommended to switch to Variable Bitrate Control (VBR) mode and use an enlarged VBV buffer.
    If the parameter is not set (equal to
    0), the Intel MediaSDK uses the automatically calculated value.
  • Initial VBV buffer occupancy —  the initial filling of the VBV buffer in bits, after which the decoder starts decoding. This parameter, along with the bitrate, Max bitrate, and VBV buffer size parameters, is used to control the output bitrate and is part of the common Video Buffering Verifier (VBV) or Hypothetical Reference Decoder (HRD) model. This is a simplified model assuming that data enters a buffer of a fixed VBV buffer size according to the individual size of the encoded frames, and exits the buffer with a constant bitrate bitrate. The decoder starts decoding after the buffer is filled to the size of Initial VBV buffer occupancy. The purpose of the encoder is to prevent this hypothetical buffer from overflowing or underflowing.
    If the parameter is not set (equal to
    0), the Intel MediaSDK uses the automatically calculated value.
  • gop_size — the duration of the GOP structure (distance between adjacent IFrames) of the output video stream, in frames.
  • Width, Height — the frame width and height of the output video stream, in pixels.
  • pix_fmt — output pixel format that describes the number of bits per color component and pixels representation method. The following values are supported:
    nv12 — planar format YUV 4:2:0, 8 bit/color. Used for the H264 and HEVC MAIN Profile codecs. In ffmpeg terms, this format is called yuv420p.
    p010 — planar format YUV 4:2:0, 10 bit/color. Used for the HEVC MAIN10 Profile codec. In ffmpeg terms — yuv420p10le.
  • Preset — a value that sets the balance between the quality of the output video and the transcoding speed. The following values are supported:
    best_speed — maximum transcoding speed with acceptable video quality;
    balanced — balance between speed and quality;
    best_quality — best video quality, slow transcoding.
    When using Intel QSV technology, it is recommended to start with the value
    best_speed and reduce the speed only if the video quality is not objectively satisfactory. The peculiarity of Intel QSV is that when using best_speed, the video quality virtually does not decrease (according to a note from Intel MediaSDK Release Notes, sometimes the quality is even better than when using balanced), and the speed increases significantly.
  • Quality — the desired level of image quality that affects the degree of frame quantization (QP). Valid values: from 1 (best quality) to 51 (worst quality). If the quality is set (not equal to 0), the Quality Variable Bitrate Control (QVBR) mode will be used, since the traditional VBR and CBR modes do not support specifying the quality, but only the bitrate limits. The QVBR algorithm is some hybrid of the well-known Constant Rate Factor (CRF) algorithm and the usual Variable Bitrate Control (VBR), suitable for video streaming purposes. Traditional CRF allows you to set the quality level without bitrate limits, so large bitrate fluctuations make it more suitable for file transcoding (VOD) than for Live video, which is transmitted over channels of limited bandwidth. QVBR tries to achieve the desired subjective level of quality (i.e., at the level of human perception, rather than at the level of more formal metrics such as PSNR) by limiting fluctuations near the target bitrate and maintaining compatibility with the Video Buffering Verifier (VBV) or HRD model.
    If the desired quality is not set (equal to
    0), then only the bitrate limits and the traditional VBR or CBR mode are applied.
  • Frame rate numerator &  denominator — frame rate numerator and denominator. The frame rate is set as a rational number. Only reducing the input stream frame rate is supported.

Audio transcoders

Along with demultiplexed video streams, audio streams can be transcoded. Audio transcoder functions include decoding, filtering, and encoding. The incoming stream must be unencrypted (otherwise it cannot be decoded).

The original bitrate of the audio stream can be converted.

The AAC codec is used as the target format.

Parameters to configure:

  • ID — the unique identifier of the audio transcoder.
  • Decode encrypted — if the original multicast stream has a reference to any CAS in PMT, then such stream is considered encrypted and cannot be decoded. But in certain cases, the stream is “encrypted“ with an encryption level of ”0”. Such a stream can be decoded with this function.
  • Source — the audio stream ID for transcoding, specified together with the demuxer. Example: dmx0:aud0, where dmx0 — demuxer ID, aud0 —  audio stream ID.
  • Outs — settings of the audio transcoder outputs.
  • bitrate — the bitrate of the output audio stream. Specified in size units.
  • channels count — number of audio channels of the output stream
  • sample rate — audio sampling rate for the output stream

Muxers

This section allows you to multiplex (pack) transcoded or source media streams into a container of a given format. If adaptive streaming (ABR) is intended, create several streams in this section according to the operator platform requirements.

To protect against unauthorized viewing, copying, etc. during the recording process, the content can be encrypted according to one of the following standards:

  • HLS-AES — only the MPEG2-TS container is supported and subsequent delivery over the HLS protocol. The entire chunk, including the headers of TS packets, is encrypted using the AES-CBC algorithm with PKCS#7 padding. Information about encryption can only be added to the HLS playlist (#EXT-X-KEY tag).
  • ISO/IEC 23001-7: 2015 Part 7 (Common encryption in ISO base media file format files), abbreviated to CENC. The ISO BMFF/MP4 Fragmented container is supported. Only the elementary stream (payload) is encrypted, the container and the headers of the NAL packets of the video stream remain unencrypted. The data is encrypted using the AES-CTR algorithm.

To encrypt with this standard, select the widevine value in the encryptor.drm field, what is corresponding to the Google Widevine DRM system.

It also should be considered that:

  • if you’re going to use adaptive bitrate streaming (ABR), all video streams should have the same GOP structure and have synchronous key frames (I-frames);
  • the value of DTS counters for audio and video samples should not differ by more than 1.5 seconds;
  • the value of DTS counters should increase monotonically;
  • if the PMT table in the MPEG2-TS container was changed, a  table version change is required;
  • there should be no CC errors in the TS-stream.

Playlist generation for the recorded content is performed by the SmartMEDIA Playlist Generator component on the subscriber device request.

HLS playlist generation is supported for unencrypted content, as well as encrypted with the HLS-AES standard content recorded in the MPEG2-TS container.

DASH playlists generation is supported for content recorded in the ISO BMFF/MP4 Fragmented container.

Parameters to configure:

  • bw — the bandwidth required to play the stream. Used to generate DASH or HLS+MP4 playlists.
  • dir — the subdirectory (for POSIX storages) or URL prefix (for S3/object storages) relative to the channel directory to which the stream will be recorded; must be unique within the channel.
  • lang — the two-letter designation of the stream language (used for audio) in accordance with ISO 639-1:2002.
  • encryptor.drm — the DRM settings identifier defined in the global configuration. If not specified, the stream is not encrypted.
  • encryptor.key_type — the key type: SD, HD or AUDIO. Attention! If you use SmoothStreaming streams, the keys on all tracks — both video and audio — must be the same (e.g. SD).
  • role —  sets the role for Adaptation in the DASH manifest according to the “5.8.5.5 DASH role scheme” clause of the “ISO/IEC 23009-1” standard. Possible values: caption, subtitle, main, alternate, supplementary, commentary, dub. The role can be used to mark the DescribedVideo track in the manifest with the commentary value.
  • PVR skip — if the option is enabled, this track won’t be used for the nPVR program recording. The disabled option leaves the track in the nPVR record as-is. This parameter can be used to optimize the storage space for nPVR records.
  • Save text subtitles in TTML — if the option is enabled, text subtitles are saved in the TTML format; if disabled — VTT.
  • sources — list of sources of media samples for the recorded stream.
  • source — the name for the TS stream (when recording without remuxing) or sample source track.
  • master — the main source flag for synchronizing chunks (there should be only one within the channel). It is recommended to select the source containing the video track with the maximum bitrate.

Thumbnails

The section for creating of thumbnail images from the keyframes of the track specified by the Source track for thumbnails option. These images can be used by the player for better visualization during seek.

Unlike Thumbnails mosaic, each JPEG file contains a picture only for a single frame.

Parameters to configure:

  • Dir — the filesystem subdirectory (for POSIX storages) or URL prefix (for S3/object storages) relative to the channel directory/URI to which the thumbnails are recorded. Must be unique within the channel.
  • Width, Height — the width and height of the preview image. The original video width and height are used if the value is not set.

Thumbnails mosaic

This section allows you to create a thumbnail mosaic from the keyframes of the track specified by the Source track for thumbnails option.

A single JPEG image contains multiple thumbnails, a “thumbnails mosaic cols x thumbnails mosaic rows” matrix of pictures, that can be used by the player for preview when seeking. This feature allows to speed up loading of thumbnails to the client device.

Parameters to configure:

  • thumbnails mosaic cols, rows — the number of columns and rows in the thumbnail mosaic.
  • Dir — the filesystem subdirectory (for POSIX storages) or URL prefix (for S3/object storages) relative to the channel directory/URI to which the thumbnail mosaics are recorded. Must be unique within the channel.
  • Width, Height — the width and height of the preview image. The original video width and height are used if the value is not set.
  • Source track for thumbnails — the identifier of the video track, which is to be used for thumbnails generation. Thumbnail generation is off if the value is not set. Thumbnails are generated as JPEG images. They could be used in the media players for preview purposes during seek.
  • Accessibility 608 — the value of the Accessibility tag in the MPD playlist for schemeIdUri=”urn:scte:dash:cc:cea-608:2015″

Channel Configuration Examples

Example 1: single-bitrate MP4 DASH content recording without transcoding and encryption, with subtitles

Basic settings

  • ID = CH_MP4_TTXSUBB
  • Container type = mp4
  • Recording window = 30m
  • Index storage = mongo_local

Data storages

s3

Sources

  • ID = src0
  • url = udp://239.8.8.8:1234
  • hls.stream_type = Empty field
  • hls.bandwidth = 0

Demuxers

  • ID = dmx0
  • source = src0
  • tracks → Track = vid0
  • tracks → Track = aud0
  • tracks → Track = sub0?888

Video transcoders

Empty fields

Audio transcoders

Empty fields

Muxers

Video stream

  • bw = 2500000
  • dir = video/bw2500000
  • lang = Empty field
  • encryptor.drm = Empty field
  • encryptor.key_type = SD (by default)
  • sources → source = dmx0:vid0
  • sources → master = ✔️

Audio stream

  • bw = 128000
  • dir = audio/eng
  • lang = en
  • encryptor.drm = Empty field
  • encryptor.key_type = SD (by default)
  • sources → source = dmx0:aud0
  • sources → master = Empty field

Subtitles

  • bw = 4000
  • dir = sub/eng
  • lang = en
  • encryptor.drm = Empty field
  • encryptor.key_type = SD (by default)
  • sources → source = dmx0:sub0?888
  • sources → master = Empty field

The playlist URL in this example might look like this: http://streaming_server_address/dash/CH_MP4_TTXSUB/playlist.mpd

Example 2: multi-bitrate MP4 DASH content recording with transcoding, without encryption

Basic settings

ID

CH_MP4_TRANS

Container type

mp4

Recording window

30m

Index storage

mongo_local

Data storages

s3

Sources

ID

src0

url

udp://239.8.8.8:1234

hls.stream_type

Empty field

hls.bandwidth

0

Demuxers

ID

dmx0

source

src0

tracks → Track

vid0

tracks → Track

aud0

Video transcoders

ID

vtrc

Decode encrypted

Empty field

Source

dmx0:vid0

Video stream 1

Outs → bitrate

4500k

Outs → codec

h264

Outs → gop_size

30

Outs → width

1920

Outs → height

1080

Video stream 2

Outs → bitrate

2500k

Outs → codec

h264

Outs → gop_size

30

Outs → width

1280

Outs → height

720

Audio transcoders

ID

atrc

Decode encrypted

Empty field

Source

dmx0:aud0

Audio stream 1

Outs → bitrate

128k

Muxers

Video stream 1

bw

4500000

dir

video/high

lang

Empty field

encryptor.drm

Empty field

encryptor.key_type

SD (by default)

sources → source

vtrc:vid0

sources → master

✔️

Video stream 2

bw

2500000

dir

video/low

lang

Empty field

encryptor.drm

Empty field

encryptor.key_type

SD (by default)

sources → source

vtrc:vid1

sources → master

Empty field

Audio stream

bw

128000

dir

audio/rus

lang

ru

encryptor.drm

Empty field

encryptor.key_type

SD (by default)

sources → source

atrc:aud0

sources → master

Empty field

Subtitles

bw

4000

dir

sub/eng

lang

en

encryptor.drm

Empty field

encryptor.key_type

SD (by default)

sources → source

dmx0:sub0?888

sources → master

Empty field

The playlist URL in this example might look like this: http://streaming_server_address/dash/CH_MP4_TRANS/playlist.mpd

Example 3: single-bitrate TS HLS content recording without remuxing

Basic settings

ID

CH_TS_SINGLE

Container type

ts

Recording window

30m

Index storage

mongo_local

Data storages

s3

Sources

ID

src0

url

udp://239.8.8.8:1234

hls.stream_type

Empty field

hls.bandwidth

0

Demuxers

Empty fields

Video transcoders

Empty fields

Audio transcoders

Empty fields

Muxers

bw

2700000

dir

bw2700000

lang

Empty field

encryptor.drm

Empty field

encryptor.key_type

SD (by default)

sources → source

src0

sources → master

✔️

The playlist URL in this example might look like this: http://streaming_server_address/hls/CH_TS_SINGLE/variant.m3u8

Example 4: multi-bitrate TS HLS content recording without remuxing

Basic settings

ID

CH_TS_ADAPTIVE

Container type

ts

Recording window

30m

Index storage

mongo_local

Data storages

s3

Sources

Source 1

ID

src1

url

udp://239.8.8.1:1234

hls.stream_type

Empty field

hls.bandwidth

0

Source 2

ID

src2

url

udp://239.8.8.2:1234

hls.stream_type

Empty field

hls.bandwidth

0

Source 3

ID

src3

url

udp://239.8.8.3:1234

hls.stream_type

Empty field

hls.bandwidth

0

Demuxers

Empty fields

Video transcoders

Empty fields

Audio transcoders

Empty fields

Muxers

Stream 1

bw

3700000

dir

high

lang

Empty field

encryptor.drm

Empty field

encryptor.key_type

SD (by default)

sources → source

src1

sources → master

✔️

Stream 2

bw

2500000

dir

med

lang

Empty field

encryptor.drm

Empty field

encryptor.key_type

SD (by default)

sources → source

src2

sources → master

Empty field

Stream 3

bw

1300000

dir

low

lang

Empty field

encryptor.drm

Empty field

encryptor.key_type

SD (by default)

sources → source

src3

sources → master

Empty field

The playlist URL in this example might look like this: http://streaming_server_address/hls/CH_TS_ADAPTIVE/variant.m3u8

Used Data Types and Formats

URL Format

Protocol

Description

udp://<address>:<port>[?<URL params>]

UDP stream, unicast and multicast addresses supported. URL params:

  • interface — IPv4 address of the local network interface to bind the socket.
  • socket_buffer — socket buffer size, in bytes.
  • source_ip — IP address of the UDP data source; required when using the IGMPv3 with SSM,

http://<address>[:<port>]/<path>

HTTP server.

file://<path>

The file on the local file system, the path must be absolute. Additional params:

  • cycled — cyclic reading of the file (when the end of the file is reached, the reading continues from the beginning).

Examples:

file:///video/spart.ts
udp://10.1.0.2:7556
udp://233.1.1.0:5000?socket_buffer=4194304&interface=10.5.1.34
udp://239.65.2.1:5000?source_ip=185.5.40.63
http://wolf/spart.ts

Specific Field Types

  • Time. Allows you to specify the duration in convenient units of time. If no postfix is specified, the time unit is considered to be a second.

    d — days
    h — hours
    m — minutes
    s — secondsExample:

    1d — 1 day; 2h — 2 hours; 3s — 3 seconds.

  • Data size. Allows you to specify the size using multipliers (Kilo-, Mega-, GigaBytes). If no postfix is specified, the size unit is considered to be megabytes.

    k, K — kilobytes
    m, M — megabytes
    g, G — gigabytesExample:

    1k, 2g, 3M.

Preparing VoD Content

Prepare the original content

To prepare VoD content, the original content must be in one of the following containers: MKV, TS, MP4. The correspondence of containers to supported codecs is given in the table:

Container

Video Codec

Audio Codec

MKV

H.264

AAC

TS

H.262, H.264, H.265

AAC, AC3, MP3, DTS

MP4/ISO BMFF

H.264

AAC, AC3

DTS

DTS

If the source files don’t meet these requirements or you want to prepare adaptive content from the master copy, the content must be pre-transcoded (for example, using ffmpeg).

Convert the content to the required format

Once you have prepared the content with the necessary profiles, you need to prepare the playlists and segment content using the vodconvert utility (if necessary).

Examples of running the vodconvert utility for preparing VoD content can be found here.

Redundancy and Fault Tolerance

The SmartMEDIA architecture allows to create the IPTV/OTT broadcasting system without a single point of failure and with guaranteed high availability of content and services. Depending on business objectives, budget and other factors, the system administrator can design an optimal redundant architecture.

SmartMEDIA allows you to build the redundant system in two main ways:

  1. Building fault-tolerant clusters allows you to achieve high availability of the service by reserving individual components (storage, Conveyor services, playlist generators, HTTP servers). Failure of any of the components does not lead the cluster to fail and is invisible to the end user. Usually, it is used for reservation on the one site scale (data center). Below are typical solutions description that will help you to understand the SmartMEDIA architecture better and choose the most suitable clustering scheme.
  2. Load balancing and redundancy by redirecting the client to the nearest working server/cluster. Unfortunately, even the most reliable clusters can not provide 100% availability of services — the “human factor” still remains (for example, the administrator removes data from the cluster storage) , the probability of one of the fail-safe components failure (for example, an index database cluster failure) or a whole data center failure (power outage, communication failure, etc.). Improving service availability can be achieved by switchover between individual servers, clusters or entire data centers.

Building Failover Clusters

Redundancy of VoD Services

The VoD broadcasting service redundancy can be implemented by providing fault tolerance for files storage and data delivery over HTTP. Due to triviality of this task, it will not be described in detail in this document.

The following things should be considered when building the system:

  • Failures during the content preparation stage are possible. For example, failure can occur during the transcoding or segmentation and the resulting file will be recorded partially.
  • So, it is necessary to provide the content verification after each preparation step (transcoding, segmentation by the vodconvert utility) before writing to the storage/storages. Content duration for each track should be checked, as well as the list of tracks.
  • Otherwise, the client may receive incomplete content or the content not suitable for playback;
  • Content should be verified after writing to each of the storages;
  • Using of several separate storages is more reliable than using one “cluster” storage because the probability of a complete cluster failure is remained, as well as the probability of data corruption in the clustered storage due to external factors.
  • Using of multiple storages requires more careful verification of data on each of the storages. In some cases, such solution is more complex in terms of load balancing between storages as well.

Redundancy of LiveTV-based Services (Live, nDVR, TSTV, etc.)

The nDVR service provisioning system is distinguished by a more complex architecture and, as a result, more complex backup schemes. Examples of various solutions, their benefits and drawbacks will be discussed below.

Solution 1: Record and Storage Servers Duplication

The solution is to record each channel to several independent servers. Each of them runs all the services and components necessary for the Live/nDVR services functioning. The data is stored in the local POSIX storage.

Because data recording on different servers is not synchronized, the content can be segmented in different moments, media chunks will differ and you cannot get the same chunk from different servers — that’s why you cannot use simple load balancing in this case. Redundancy is provided by redirecting initial requests for playlist/manifst to a working server using HTTP Redirector.

The disadvantage of such a solution is that in the event of a failure of any service or server, content delivery to the subscriber will be interrupted until the content will be re-requested from SmartMEDIA Redirector. In this case, SmartMEDIA Redirector will redirect the client to a working server after the failure detection on one of the servers.

Solution 2: Using S3 Object Storage

Recording services redundancy — 2N (Active/Standby); other services redundancy — N+M (Active/Active)

The solution is to provide recording servers redundancy in Active/Standby mode. Each servers’ pair works with its own group of TV channels.

Recording and storage of nDVR content is performed on an external service (local or cloud — for example, Amazon S3), compatible with the S3 protocol.

In this architecture, all the recording and streaming servers in the cluster share the same copy of the index database. Its relevance on all nodes is maintained by the MongoDB internal mechanisms.

Because all the streaming servers of the same cluster (“Video Server” in the diagram) have access to the same copy of the content (via S3 protocol) and to the same index database, load balancing between them can be implemented both by the SmartMEDIA HTTP Redirector service and standard HTTP load balancing tools (e.g. Virtual IP addresses + DNS RoundRobin, LVS, hardware HTTP balancer and others).

Each content delivery server (Video Server) is both a playlist generation server and an HTTP access proxy to the S3 storage: the HTTP reverse proxy requests a playlist from the Playlist Generator component and returns it to the device; after that it starts to send the nDVR content from the S3 storage system to the subscriber.

Solution 3: Using an S3 Object Storage and Redundant SmartMEDIA Services (All-in-One)

Recording services redundancy — 2N (Active/Standby); other services redundancy — N+M (Active/Active)

Solution 3 differs from the previous one by moving of recording servers (primary and backup) from individual servers to delivery servers. This solution reduces the cost of equipment, but increases the load on media servers and increases the requirements for the stability of data transmission over the network (losses, jitter, etc.).

Solution 4: Using a Ceph (S3) Object Storage, Combined With the Record Service

Recording services redundancy — 2N (Active/Standby); other services redundancy — N+M (Active/Active)

The Ceph is an example of a relatively inexpensive and reliable storage solution with S3 access. Other solutions, such as SwiftStack and others, can also be used as storage.

The Ceph cluster (not included in the SmartMEDIA product) can consist of any number of storage servers (“MSTORx” in the diagram). The local disks of each server are joined into a single cluster, which provides a sufficiently high level of nDVR content storage reliability. The load between storages is balanced by Ceph internal mechanisms.

The SmartMEDIA Conveyor component (primary or backup) can share the hardware with the Ceph storage. If the primary service fails, the live streams recording switches to the standby one. Some servers in the cluster can only perform the nDVR content storage function.

Similar to the “Solution 2”, the load on playlists generation and nDVR content broadcasting is distributed among several video servers running in parallel.

Number of SmartMEDIA Conveyors’ pairs can vary — as well as the number of Ceph storage servers.

Load Balancing

Uniform and flexible load balancing between multiple video servers or their groups can be provided by the SmartMEDIA Redirector component, which:

  • allows you to define server groups and load balancing rules within the group and between groups, depending on the location of the client and the requested content;
  • redirects subscriber requests to working servers if one or more source servers fail;
  • monitors the servers’ performance;
  • checks the content availability.

IP addresses of subscriber devices are grouped into several subnets. Each of subnets can be assigned to and serviced by a group of video servers. Subnets allocation and their service procedure maintenance is performed by the system administrator taking into account the network organization, number of subscribers, etc. To add new video servers under the SmartMEDIA Redirector control, you must specify them in the Redirector’s configuration.

The component has two services:

  • for protocols based on HTTP (HLS, DASH, SmoothStreaming) — httpRedirector;
  • for the RTSP protocol — rtspRedirector.

The simplified diagram of HTTP Redirector workflow is shown below:

SmartMEDIA Redirector accepts content viewing requests from subscriber devices, identifies video servers with the best content access conditions and redirects subscribers to these video servers.

When the request is received, Redirector determines the group of video servers (so-called “farm”), that processes requests from devices on this subnet. Video servers of each group process incoming requests in accordance with the specified load balancing method (see below). In general, Redirector selects the next video server from the group and checks the requested content availability in its repository:

  • if the content exists, Redirector forwards the request to the selected video server;
  • otherwise Redirector switches to the next video server in the group;
  • if none of the servers in the group can process the request, redirector tries to determine another most suitable group;
  • if no group can process the request, an error is returned to the subscriber device. Information about the cause of the error is recorded in the log file.

Selection of the request processing server within the group are performed according to one of the following policies:

  • On the first server responded. If some server is underloaded, it will respond faster than others and the probability of its selection increases.
  • By content ID. In this case, the content (TV channel, VoD, etc.) is “anchored” to the serving server. This increases the chance of cache using on this server, but may result in uneven load distribution between servers.

In addition to the balancing policy, a “weight” parameter can be assigned to each server in the group. When all other conditions are equal, the request will be redirected to the server with a higher weight.

SmartMEDIA Redirector monitors the status of video servers, periodically sending requests to prevent the request redirection to a failed video server. Information about the unavailability of the server or content is cached for a specified time. If the server or content is unavailable, the server is re-checked after some configured time. When the operability of the video servers is restored, HTTP Redirector begins to distribute requests taking into account the changed state of video servers.

Redundancy and Load Balancing with HTTP Redirector

The HTTP Redirector service is designed to provide redundancy of streaming servers, balance the load between them and optimize traffic flows from the platform to subscribers. It allows you to configure server groups (farms) and the weight of each server within the group. Also you can assign your own balancing policy for the group.

The redirections section within the farms array defines farms with their names (identifiers) and servers list.

The locations array defines subnets lists and a farms list in the order in which the content and servers availability will be polled.

An example of the configuration with requests distribution between sites is given below:

{
    “core”:{
        “port”:9201,
        “interface”:“0.0.0.0”
    },

    “redirection”:{
        “vod_range_cache_time_sec”:20,
        “request_timeout_sec”:5.0,
        “channel_regex”:“([^/]+)/.*”,
        “server_status_cache_time_sec”:30.0,
        “uri_path”:“/”,
        “live_cache_time_sec”:10,
        “clear_cache_interval_sec”:60,
        “channel_regex_index”:1,
        “range_cache_time_fraction”:0.05,
       
        “farms”:[ 
            { 
                “name”:“site6”,
                “servers”:[ 
                    { “url”:“http://10.72.10.18:80/”  },
                    { “url”:“http://10.72.10.110:80/” }
                ]
            },
            {
                “name”:“site1”,
                “servers”:[
                    { “url”:“http://10.72.10.50:80/”  },
                    { “url”:“http://10.72.10.106:80/” }
                ]
            },
            {
                “name”:“default”,
                “servers”:[
                    { “url”:“http://10.72.5.4:80/” },
                    { “url”:“http://10.72.5.5:80/” },
                    { “url”:“http://10.72.5.8:80/” }
                ]
            }
        ],

        “locations”:[
            {
                “farms”:[ “site6”, “default” ],
                “uri_regex”:“.*”,
                “ip_mask”:[
                    “172.21.128.0/17”,
                    “172.22.0.0/17”,
                    “172.27.0.0/20”
                ]
            },
            {
                “farms”:[ “site1”, “default” ],
                “uri_regex”:“.*”,
                “ip_mask”:[
                    “172.24.112.0/20”,
                    “172.24.192.0/19”,
                    “172.25.0.0/18”
                ]
            },
            {
                “farms”:[ “default” ],
                “uri_regex”:“.*”,
                “ip_mask”:[
                    “10.65.1.97/32”,
                    “172.16.0.0/12”,
                    “0.0.0.0/0”
                ]
            }
        ]
    }
}

Using Content Protection Systems (CAS / DRM)

SmartMEDIA can use third-party content protection systems (PlayReady, Widevine, etc.) to encrypt content before recording to the storage.

The content protection functionality is implemented in the components Conveyor, SmartCETS, vodconvert and cets. CAS/DRM access settings and file encryption parameters are specified in the components’ configuration files or in the utilities’ command line parameters.

SmartMEDIA encrypts DASH and HLS content with keys retrieved from CAS/DRM systems, indexes it, records encrypted content to the storage and delivers to the client devices. The encryption keys are stored only in the external CAS/DRM system, which transmits them securely to the subscriber device using proprietary protocols.

Depending on the end-user devices used, delivery protocols, media containers, and content security requirements (in particular, the DRM system), content encryption methods may also vary.

Encrypt Live and nDVR Content

HLS (AES-128)

HLS-AES encryption standard is supported for chunks recorded in the MPEG2-TS container. As a DRM server, Verimatrix Adaptive CAS or another server that implements the VCAS Scrambler HTTP protocol can be used.

The content is encrypted using the AES-CBC algorithm with a key length of 128 bits and PKCS#7 padding.

Some SmartTV models and possibly some other subscriber devices decrypt the stream incorrectly: PKCS#7 padding is not discarded, random “garbage” appears at the end of each chunk and that’s why the first TS packet of each followed chunk will be decoded incorrectly. As a workaround for this problem, you can enable the insertion of a PAT/PMT table to the beginning of each chunk. With this workaround applied, the first TS packet in each chunk will always be PAT, it will be decoded incorrectly and rejected by the TS demuxer, but media data will not be affected. For more information about adding PAT/PMT to the beginning of the chunk, see the document “SmartMEDIA Configuration Reference.”

HLS and DASH with the ISOBMFF Container (MP4 Fragmented)

The ISO BMFF container supports ISO Common Encryption standard (cenc and cbcs schemes). SmartMEDIA services can interact with the key server through the Widevine Modular DRM Encryption API and SmartLabs UDRM Encryption API (which is an extension of the Widevine Modular DRM Encryption API).

Until the first key for the track is received, the SmartMEDIA Conveyor will skip all media data and won’t record the content of this track.

To improve the content security, Conveyor supports the periodic updates of encryption keys (key rotation).

Depending on the requirements of content owners and internal operator’s policies, the duration of the period of using one key can be adjusted from one second to the complete rotation disabling. It should be taken into account that the smaller rotation interval will increase security, but, as well, it will increase the load on the key generation servers (on the encryption side) and, especially, the license servers (from the client devices side).

Most DRM system vendors recommends to use different keys for different track types — at least, separate audio and video encryption keys. The reason of such enforcements is simple: on most modern devices video decryption path is implemented in hardware (and is secure by design), but audio decryption is still performed in software and can be the cause of encryption keys leaks.

Legacy Microsoft PlayReady DRM clients (PlayReady 2.x SDK and older) don’t support neither key rotation nor different keys for different track types.

To avoid using the same encryption key for audio and video track and keep the same copy of the content for legacy PlayReady and more modern devices secure, some streaming services leave audio track clear.

Encryption settings are specified in the drms section of the main SmartMEDIA Conveyor configuration file.

For the key rotation, the entire timeline can be divided into periods of fixed duration, each of these periods has an unique sequence number. The number of periods for which keys are requested within the single request to the key server is specified in the configuration parameter crypto_period_count (the default value is 5); the duration of one period should be defined in crypto_period_length parameter (by default — 1 hour).

Depending on the functionality and settings of the key generation server, the response may contain both the one PSSH for all periods (which in turn contains as many keys as requested), and various PSSHs for each period (each contains only one key).

Google WideVine Modular DRM cloud service supports only PSSH generation with one key per PSSH.

For details about encryption settings, see the document “SmartMEDIA. Configuration Reference.”

HLS and RTSP for IPTV Systems (DVB Simulcrypt)

A stream already encrypted using DVB Simulcrypt standards can be injected to the SmartMEDIA Conveyor input. Recording is possible only in the MPEG2-TS container “as is”, without remultiplexing and other transformations in the stream.

This method is not standard for the HLS protocol, but it’s often used in IPTV systems that historically inherited the DVB CAS.

For more information on setting the “pass through” mode, see the document “SmartMEDIA Configuration Reference.”

Encryption of Multicast MPEG2-TS Content

The SmartCETS service and the cets utility encrypt MPEG-TS content in real time according to ISO/IEC 23001-9 (Common encryption of MPEG-2 transport streams). After receiving the list of input multicast streams, SmartCETS/cets requests encryption keys from the key server using the Common Encryption API for Widevine DRM (hereinafter Widevine API) or SmartLabs UDRM Encryption API. Encrypted content can be either written to a file, or broadcasted to a multicast group using the UDP protocol. For the SmartCETS service, the list of multicast groups of input streams for encryption along with other parameters must be specified in the configuration file. For the cets utility, all parameters are passed by command-line arguments.

The following formats are supported:

  • Video: H.262, H.264, H.265;
  • Audio: AAC / ADTS, AC3, DTS.

To improve the encryption security of streaming content, the SmartCETS service supports the periodic rotation of encryption keys. It requires using of SmartLabs UDRM Encryption API because of support of multiple keys in one PSSH.

The cets utility does not support the keys rotation.

The encryption and keys rotation settings are similar to the SmartMEDIA Conveyor service for encrypting the ISO BMFF container.

Configuring Steps

In the global section of the SmartCETS configuration file, you’ll need to set the values for key_server_url, signer_name, signer_key, signer_iv. Then, in the streams section, list content IDs, source URLs and destination URLs in udp://GROUP:PORT format .

Example:

{

 “key_server_url”:“http://10.10.10.10/cenc/getkey”,

 “signer_name”:“cets”,

 “signer_key”:“1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9”,

 “signer_iv”:“d58ce954203b7c9a9a9d467f59839249”,

 “crypto_period_length”:“24h”,

 “crypto_period_count”:“3”,

 “key_request_policy”:“each_key_expires”,

 “smooth_transmission_by_pcr”:“true”,

 “packets_between_pssh”:200,

 “msec_between_audio_ecm”:50,

 “streams”: [

   {

     “content_id_string”:“R24.ism”,

     “source_url”:“udp://239.65.40.4:5001”,

     “sink_url”:“udp://239.65.70.4:5001”

   },

   {

     “content_id_string”:“CH_7_145_LOCAL”,

     “source_url”:“udp://239.253.7.145:1234”,

     “sink_url”:“udp://239.253.8.145:1234”

   },

   {

     “content_id_string”:“CH_7_96_LOCAL”,

     “source_url”:“udp://239.253.7.96:1234”,

     “sink_url”:“udp://239.253.8.96:1234”

   }

 ]

}

VoD Encryption

Encryption of VoD content is performed by the utility vodconvert. Description of the vodconvert parameters is presented in the “Configuration Reference” section. Examples of vodconvert running can be found here.

Configuration Reference

In this section, you can find configuration references for SmartMEDIA Content Delivery System components.

General Information

Configuration of SmartMEDIA Components

Configuration settings of each component are located in the corresponding configuration file. All configuration files are in JSON format. By default, they can be found by the following paths:

Component

Default Configuration File Path

Conveyor

/opt/smartlabs/smartmedia/conveyor/config/config.json

Playlist Generator

/opt/smartlabs/smartmedia/plgen/config/config.json

HTTP Redirector

/opt/smartlabs/smartmedia/redirector/config/config.json

RTSPServer

/opt/smartlabs/smartmedia/rtspServer/config/config.json

SmartPVR

/opt/smartlabs/smartmedia/pvr/config/config.json

SmartMPicker

/opt/smartlabs/smartmedia/smartMPicker/config/config.json

SmartTranscoder

/opt/smartlabs/smartmedia/transcoder/config/config.json

SmartNvidiaTranscoder

/opt/smartlabs/smartmedia/nvidia-transcoder/config/config.json

SmartMEDIA HTTP Cache

/opt/smartlabs/smartmedia/smhttpcache/config/config.json

SmartMEDIA Recryptor

/opt/smartlabs/smartmedia/smrecrypt/config/config.json

The Conveyor service also has a web console that allows you to configure channel recording in a convenient GUI. Its description can be found here.

Data Types and Configuration Description Rules

Base Types

  • Integer;
  • Unsigned integer;
  • Floating point value (float);
  • Boolean;
  • String;
  • Unix timestamp — an unsigned integer describing the time as the number of seconds since January 1, 1970;
  • Arrays.

SmartMEDIA Specific Types

  • URL (see section URL Format in SmartMedia Services)
  • Time Units. Allows you to specify the duration in convenient units of time. If no postfix is specified, the time unit is considered to be a second. Example: 1d — 1 day; 2h — 2 hours; 3s — 3 seconds.
  • Data size units. Allows you to specify the size using multipliers (Kilo-, Mega-, GigaBytes). If no postfix is specified, the size unit is considered to be megabytes. Example: 1k, 2g, 3M.
  • Binary data encoded as Base64 string (RFC 2045).
  • Binary data represented as HEX string: an array of bytes, each byte is described by two hex digits. Spaces between numbers are not allowed.

Sections and Nested Data Types

The JSON format allows you to partition the data and create a hierarchical structure of the configuration file. A field in a JSON document can correspond not only to a simple data type, such as a string or a number, but also to a nested object or array.

In order to show and describe the nested structure of configuration files, the following rules apply in this document:

  • Nested objects that occur once and are not used in the other configuration sections are described after the main parameter description. The main parameter type in this case is specified as “section”. For example:

section — section parameter;

section → param — nested parameter.

In the configuration file, the section section with the param parameter will look like this:

{
   
“section”: {
       
“param”: 100
    }
}

  • Nested objects that occur multiple times or nested arrays of objects are defined as a separate type with its own description. In this case, the type of the object parameter will be specified as “ObjectType object”, the type of the array parameter will be specified as “array of ObjectType objects”.

For example: for some configuration can be defined:

  • a param_obj_arr parameter of type “array of ObjectType objects”;
  • a param_obj_v parameter of type “ObjectType object”;
  • an ObjectType type with a set of parameters, one of them is ot_param1.

In the configuration file, it will look like this:

{
   
“param_obj_arr”: [
       {
           …
           
“ot_param1”: “Param Value”,
           …
       }
   ],
   
“param_obj_v”: {
       …
       
“ot_param1”: “Param Value”,
       …
   }
}

URL Format in SmartMEDIA Services

Format

Protocol

Description

udp://<address>:<port>[?<URL arguments>]

UDP stream, unicast and multicast addresses supported.

http://<address>[:<port>]/<path>

HTTP server.

file://<path>

The file on the local file system, the path must be absolute.

URL Arguments

Argument

Description

UDP

interface

IPv4 address of the local network interface to bind the socket.

socket_buffer

Socket buffer size, in bytes.

ttl

Time to live (TTL) value of outgoing UDP packets. For incoming URLs is not used.

HTTP

No URL arguments accepted.

File

cycled

Cyclic reading of the file (when the end of the file is reached, the reading continues from the beginning).

Examples:

file:///video/spart.ts
udp://10.1.0.56:7556
udp://233.1.1.0:5000?ttl=255
udp://233.1.1.0:5000?ttl=255&socket_buffer=4194304&interface=10.65.5.70
http://wolf/spart.ts

Logging Setup

The logging service configuration file must be in JSON format and can contain the following parameters:

log_file_mask, string

Default value: component_%Y-%m-%d_%H-%M-%S.%N.log

The mask for the log file name in which the following parameters will be replaced: %Y — year, %m — month, %d — day of month, %H — hours, %M — minutes, %S — seconds, %N — rotation number.

allow_tags, string

A regular expression for the components to be logged. If empty, everything is logged.

deny_tags, string

A regular expression for components that will not be logged. If empty, everything is logged.

rotation_size, integer

Default value: 100*1024*1024 (100 MBytes)

Maximum log file size, in bytes, upon which rotation occurs.

severity_level, string

Default value: trace

Logging level. Possible values are: trace, debug, info, warning, error, fatal.

rotation_time, string

Default value: 00:00:00

The log file rotation time. A string containing of 3 or 4 values.

Last 3 values define duration in minutes, hours and seconds. If four values are specified, the first of them defines the day of the week (starts with the “w”) or the day of the month (starts with “m”).

The countdown of the day begins with 1. The values can be separated by “,”:”;” or by a space.

For example:

  • 00:00:00 or 0 0 0 — rotation at midnight;
  • w3 12:00:00 — noon on Wednesdays;
  • m13 22:40:00 — 13th of each month at 22:40.

console_log, boolean

Default value: true

Logging will be duplicated to the console (STDOUT/STDERR) when set to ‘true’.

auto_flush, boolean

Default value: false

Whether to write a string to the log file immediately, without caching. It is recommended to enable only for debugging, as it can lead to a significant consumption of CPU resources.

syslog_address, string

The IP address or domain name of the syslog server. If not specified, logging via syslog is disabled.

syslog_port, integer

Default value: 514

The port of the syslog server. Valid values are from 1 to 65535.

syslog_add_timestamp, boolean

Default value: true

Whether to add a timestamp in each log string in addition to the timestamp written by the syslog server.

prefix, string

The prefix added to the beginning of each log string.

Example Configuration

JSON

{

 “log_file_mask”:“fhls_%Y-%m-%d_%H-%M-%S.%N.log”,

 “severity_level”:“trace”,

 “allow_tags”:“libfcgi|default”,

 “deny_tags”:“libfcgi”,

 “rotation_time”:“w2 15:10:30”,

 “console_log”:true,

 “auto_flush”:true

}

RTSPServer

The SmartMEDIA RTSPServer (RTSPServer) application is designed to support RTSP-enabled consoles that do not support the HLS protocol (currently in priority). It can translate RTSP requests transparently to HLS (with FastHLS-specific implementation features). Supports playback and fast forward/rewind.

Command Line Arguments

–help, -h

Print the help to the console and exit.

–version, -v

Print the version to the console and exit.

–config-file, -c

Default value: rtspServerConfig.json

The path to the configuration file.

–log-config, -l

Default value: rtspServer.log.json

The path to the logging configuration file.

–log-file

Default value: rtspServer_%Y-%m-%d_%H-%M-%S.%N.log

Log file name pattern. This option is ignored if –log-config is specified.

The following variables can be used in the file name:

  • Y — year,
  • m — month,
  • d — day,
  • H — hour,
  • M — minute,
  • S — second,
  • N — the file number among files with the same name.

If no variables are defined, the file will be rotated only on service restart.

Configuration File

port, integer 

Default value: 50000

The RTSP port.

user, string 

Default value: empty string

The name of the user whose rights the rtspServer process will have. If no parameter value is specified (an empty string), the process is delegated the rights of the user who started it.

group, string 

Default value: empty string

The name of the group whose rights the rtspServer process will have. If no parameter value is specified (an empty string), the process is delegated the rights of the user group that started it.

rpc_port, integer 

Default value: 49999

The RPC port.

scales, string 

Default value: “8 -8 16 -16 32 -32”

The supported rewind speeds.

stat_print_period, float 

Type: float
Default value: 10

The output interval of packet return statistics for each client, in seconds.

hls_host, string 

Default value: empty string

HLS server URL.

session_prefix, string 

Default value: empty string

The prefix for all session IDs transmitted in Session headers over RTSP and HLS protocols.

session_in_hls_url, boolean 

Default value: 0

If the value is true, the session ID will be added to the HLS request URL.

default_playlist_timeout, float 

Type: float
Default value: 1

The minimum interval before HLS playlist re-requesting, in seconds.

min_hls_pauselive_offset, float 

Type: float
Default value: -10

The minimum interval between the time of data requested by the client application and the current time when playing Pause Live. This interval is required to record the live data. For example, a value of -10 means that if data is requested 5 seconds before the current time, 10 seconds will be returned.

max_npt_gap, float 

Type: float
Default value: 0

The maximum positioning fluctuation (offset from requested position time) when playing local files, in seconds. If set to 0, the fluctuation is not limited.

hls_window_size, float 

Type: float
Default value: 1800

The HLS playlist window size, in seconds.

send_thread_count, integer 

Default value: 4

The number of threads to send data to clients.

read_thread_count, integer 

Default value: 4

The number of threads to receive data from HLS server and read local files.

rtsp_thread_count, integer 

Default value: 4

The number of threads for processing RTSP messages.

max_broken_packets, integer 

Default value: 100

The maximum number of consecutive broken TS packets before the broadcast stops.

session_timeout, integer 

Default value: 120

The KeepAlive interval for RTSP clients, in seconds.

max_hls_retry_count, integer 

Default value: 3

The maximum number of repeated HLS requests in case of server error.

hls_retry_timeout, integer 

Default value: 1000

The interval between repeated HLS requests, in milliseconds.

disable_trick_delimiters, string 

Default value: empty string

A regular expression disabling the addition of P-frame delimiters between I-frames during rewind. Applies to the User-Agent RTSP header.

enable_pcr_correction, string 

Default value: empty string

A regular expression enabling PCR alignment mode during rewind. Applies to the User-Agent RTSP header.

max_pcr_gap, integer 

Default value: 110

The maximum allowed interval between PCR, in milliseconds.

cache_size

Type: size
Default value: 5m

The size of the RTSP streamer cache in bytes.

kreatel_time_offset, integer 

Default value: 300000

The NPT indent when working with Kreatel STB (see the create_user_agent parameter). This is the time in seconds from which NPT tags in Range headers will be calculated: the time from which NPT tags are counted during playback (for STB and server communication). Calculated using the following formula: (the time in URL) – kreatel_time_offset.

kreatel_user_agent, string 

Default value: “.Kreatel.”

A regular expression to determine the Kreatel STB by the User-Agent header.

key_url_regex, string 

Default value: empty string

A regular expression to change the key URL to decrypt the stream. If no value is specified, the original URL is used.

key_url_replace, string 

Default value: empty string

A replacement string for the regular expression specified in the key_url_regex parameter.

Example Configuration

JSON

{

 “port”:50000,

 “content_root”:“/video”,

 “force_hls”:1,

 “hls_host”:“http://127.0.0.1:8802/hls”,

 “has_content_hls_timeout”:3,

 “rtsp_thread_count”:4,

 “read_thread_count”:4,

 “send_thread_count”:4,

 “session_timeout”:60,

 “disabletrick_delimiters”:“.*zyxel.*”,

 “key_url_regex”:“https://[^//]+/(.+)$”,

 “key_url_replace”:“http://sml-smartdrm.int.smlabs.net:12684/$1”

}

Supported RPC Methods

See also the “RPC Methods Common to all Services” chapter.

GetSessionCount()

The method returns the number of active sessions.

GetSessions()

The method returns a list of active session IDs. The ID is an IP address: port.

GetSessionDescription(session_ID)

The method returns the session description by its ID, namely the following fields:

url

Client request URI

scale

Rewind speed

command

The last RTSP command received from the client.

bitrate

Output stream bitrate

userAgent

Client User-Agent

sessionID

Session ID

transportType

RTSP transport. For example, RAW/UDP.

lastActivityTime

Time of the last client request (Unix time).

Usage Example

Bash (Unix Shell)

$ ./rpcClient -s videoserver -p 49911

smartmedia> info

       Method name: GetConfig                     Description: Return main configuration file data

       Method name: GetMethodDescription          Description: Return description of specified method

       Method name: GetMethods                    Description: Return all supported methods

       Method name: GetServiceName                Description: Return service name

       Method name: GetSessionCount               Description: return actual session count

       Method name: GetSessionDescription         Description: return session details

       Method name: GetSessions                   Description: return all actual sessions  [address:port]

       Method name: GetUptime                     Description: Return service uptime in seconds

       Method name: GetVersion                    Description: Return version

smartmedia> GetSessionCount

{

   “result”: “1”

}

smartmedia> GetSessions

{

   “result”: [

       “192.168.0.111:41414”

   ]

}

smartmedia> GetSessionDescription 192.168.0.111:41414

{

   “result”: [

       “url: CH_R03_1TV?pauselife”,

       “scale: 1”,

       “comand: PLAY”,

       “bitrate: 3906 Kb/s”,

       “userAgent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.01.13)”,

       “sessionID: 102dPXVyQYSPWdFvMnI”,

       “transportType: RAW/UDP”,

       “lastActivityTime: 1447406522.1009436”

   ]

}

smartmedia> exit

Conveyor

SmartMEDIA Conveyor has two configuration files: the main configuration file and the channels’ configuration file.

The path to the main configuration file can be specified by the –config-file (or -c) command line argument. By default, the main configuration file is named config.json and placed in the directory /opt/smartlabs/smartmedia/conveyor/config/.

The path to the channels’ configuration file is specified with the channel_set parameter of the main configuration file.

Both configuration files are JSON documents with structure described below.

The main configuration file includes

  • basic settings required for service start (number of threads, sockets, etc.),
  • global parameters used for all channels (for example, streams multiplexing settings)
  • a list of named sections (storage configurations, DRM, etc.), which can be referenced in other parts of the configuration — both global and individual channel settings.

These named sections let you organize repetitive settings and simplify configuration.

Channels’ settings configuration file defines the stream processing sequences for each channel. It lets you build a stream processing chain and use one element of this chain as an input for another element.

For example, sources are data providers for demultiplexors, and demultiplexors can act as a source for transcoders (video_transcoders or audio_transcoders) or for recorders, and so on.

Command Line Arguments

–help, -h

Print the help to the console and exit.

–version, -v

Print the version to the console and exit.

–config-file, -c

Default value: config.json

The path to the main configuration file.

–console-log

Tells Conveyor to ignore the –log-config and –log-file parameters and print the log to the console with the default formatting.

–log-config, -l

Default value: log4SR.json

The path to the logging configuration file.

–log-file

Default value: conveyor_%Y-%m-%d_%H-%M-%S.%N.log

Log file name pattern. This option is ignored if –log-config is specified.

The following variables can be used in the file name:

  • Y — year,
  • m — month,
  • d — day,
  • H — hour,
  • M — minute,
  • S — second,
  • N — the file number among files with the same name.

If no variables are defined, the file is rotated only on service restart.

Main Configuration

Basic Settings

channel_set, string 

Default value: ./channels.json

The path to the file with the channel list and channels’ configurations settings. For a description of the file format, see the Channels’ Configuration section below.

channel_set_update_method, string 

Default value: file

The way to update the channel list. Valid values:

  • file — to track the updates of the channels’ configuration file by timer (with an channel_set_update_period_sec interval) and, if possible, with inotify mechanism, ignoring changes over RPC. In this case, the “method not found” error is returned in response to the RPC calls StartRecord and StopRecord;
  • rpc — do not respond to channels’ configuration file changes that was made without RPC; channels’ configuation can be changed only by calling StartRecord and StopRecord RPC methods. In this case, the initial channel list is taken from the channels’ configuration file at the service start, and is rewritten by next RPC calls. The file is overwritten while the Conveyor service stops. Therefore, in the case of rpc, any changes to the file during the Conveyor operation is ignored, and the file is overwritten.
channel_set_update_period_sec, integer 

Default value: 30

The interval of checking the channel list file for updates, in seconds. Not used when updating channel list via RPC.

If the Conveyor can use the inotify mechanism (depending on the OS settings), the changes is applied automatically when the settings file is updated. Otherwise, the channel settings file is re-loaded every channel_set_update_period_sec seconds seconds.

content_manager, {object} 

The Content Manager configuration section. It configures deleting stale records from the storage.

channel_index, {object} 

The MongoDB configuration section for the Content Manager.

SmartMEDIA Conveyor stores channel recording settings in MongoDB — not only the current configuration, but also its previous versions, because they may be needed to generate nPVR records or delete stale content. It also stores the storage settings (POSIX and S3) and index database settings.

IMPORTANT: This section should differ from the Index Database settings for channels channels (index_storages).

channel_table, string 

The MongoDB collection name for the Content Manager’s channels list.

db, string 

The MongoDB database name for the Content Manager’s data.

file_storage_table, string 

The MongoDB collection name for the Content Manager’s history of the POSIX storages configurations, configured in section data_storages.

mongo_index_storage_table, string 

The MongoDB collection name for the Content Manager’s history of the index strages configurations, configured in section index_storages.

s3_storage_table, string 

The MongoDB collection name for the Content Manager’s history of the S3 storages configurations, configured in section data_storages.

uri, string 

The MongoDB connection URI for the Content Manager.

cleanup_period, time units 

Default value: 1800s

The content removal procedure is called each cleanup_period interval. This procedure deletes content older than recording_window (for more information, see “Removing Stale Content”).

enabled, boolean 

Default value: false

If true, the content management process (a.k.a. removing of stale records) is enabled.

recording_window, time units 

Default value: 10d

The default recording window duration. Can be overridden in the channel settings.

max_batch_size, integer 

Default value: 100

The max number of items (files on a disk or S3 storage objects) to be deleted in one batch. After deleting of each batch of items from the storage, their indexes are deleted from the DB. Deletion is performed by entire multitrack objects (chunk or header), i.e. files belonging to the same multitrack chunk (or header) cannot be divided into different batches. Content Manager tries to fill the batch to the specified number of files (assets), but always with an integer number of multitrack chunts (or headers).

For S3 storage, all items of the same batch are passed in a single deletion request. For details, please follow the link: https://docs.aws.amazon.com/AmazonS3/latest/API/multiobjectdeleteapi.html.

s3_deleter, {object} 

The content management settings section for S3 storages.

threads, integer 

Default value: 3

Specifies the maximum connection pool size (maximum number of simultaneous connections) to each S3 storage.

If S3 storage supports HTTP KeepAlive, the connection pool is created and one connection to the server is used multiple times for different requests.

If HTTP KeepAlive is not supported, a new connection is created for each request, but the total number of simultaneous connections is not exceed the number specified in this setting.

events_deleter, {object} 

Section of settings for deleting outdated events from the database.

uri, string 

URI for connecting to the event database.

db, string 

Name of the event database.

table, string 

Name of the collection with event data.

storage_time, time units 

Default value: 14d

Time to store events before deleting.

threads, integer 

Default value: 2

Specifies the number of threads for content management tasks.

In case of removing data from POSIX storage:

  1. The list of files to remove is generated from the index database (MongoDB).
  2. Each file is removed from the file system.
  3. The records corresponding to these files are removed from the index database (MongoDB).

In case of removing data from S3 storage:

  1. The list of files to remove is selected from the index database (MongoDB).
  2. The list is divided into groups of size content_manager → s3_deleter → batch_size.
  3. An asynchronous delete request/requests for each group of files is sent to S3 storage. No more than content_manager → s3_deleter → connections simultaneous requests is sent to the same storage, other requests is queued. The Content Manager execution thread is released and can perform tasks on another channel.
  4. After files removal from the storage is completed, the first free Content Manager thread deletes records corresponding to these files from the index database (MongoDB).
logo_storage_time, integer

Default value: 14 * 24 * 3600 (2 weeks in seconds)

Storage depth of dynamic Timed Logo in the DB table, in seconds. Logos older than the specified time are removed when the outdated content is cleared. In addition to the metadata about the logo, such as the ID, start and end time, and coordinates, the table also stores binary data of the image. Therefore, it is advisable to limit the storage depth to the minimum required.

data_storages, [array{object}] 

Each element of the array describes the content storage settings.

IMPORTANT: be careful of storage configuration modifications/deleting. This affects the removing of previously recorded content and nPVR content recording.

Changing this storage configuration (without changing the ID) should be done only if the data has been transferred manually or if the access settings to the same data storage are changed.

Changing the ID makes the old data unavailable for Content Manager (since there is no way to get the storage settings with the old ID), so the media content is not deleted.

If you need to change the storage to which the channel should be recorded, you need to create a new storage, specify its ID in the channel settings. After that a new channel version is created in the Content Manager database and information about the old storage is not lost. Once all the data has been deleted from the old storage, you can delete the information about it from the configuration.

fs, {object} 

The section with settings of the local POSIX file storage.

path, string 

The root directory in the local file storage for recorded TS/MP4 files.

A separate directory for each channel is created in the root directory.

s3, {object} 

The section with settings of a storage with S3-like interface.

host, string 

S3 storage server’s address (hostname or IP address).

bucket, string 

S3 storage bucket name.

access_key_id, string 

S3 Storage access key ID.

access_key, string 

S3 Storage access key.

max_connections, integer 

Default value: 10

The maximum number of simultaneous connections to the S3 storage server.

If your S3 storage supports HTTP KeepAlive, the connection pool is created and one connection to the server is used multiple times for different requests.

If HTTP KeepAlive is not supported, a new connection is created for each request, but the total number of simultaneous connections is not exceed the number specified in this setting.

timeouts, {object} 

Connection timeouts settings for interaction with the S3 storage.

resolve_msec, integer 

Default value: 0

The timeout for resolving a domain name to an IP address (DNS), in ms.

Value 0 means that timeout is absent.

connect_msec, integer 

Default value: 0

The timeout for establishing TCP connection to S3 storage, in ms.

Value 0 means that timeout is absent.

send_msec, integer 

Default value: 0

The timeout for a confirmation (packet with the ACK flag from the server) when sending the data, in ms.

If after this time the S3 storage doesn’t accept the data and doesn’t send a response packet with the ACK flag, the connection is closed.

Value 0 means that timeout is absent.

read_msec, integer 

Default value: 0

The timeout for reading a response from the S3 storage, in ms.

The timeout is set only between two successive read operations, not for the transmission of the whole response. If the S3 storage does not send anything within this time, the connection is closed.

Value 0 means that timeout is absent.

total_msec, integer 

Default value: 0

The timeout (in ms) of a whole write operation, including all the steps:

  • domain name resolution (timeout can be set separately with resolve_msec option)
  • TCP connection to S3 storage establishement (timeout can be defined separately with connect_msec option)
  • data sending (can contain multiple operations, timeout for each operation can be set with send_msec option);
  • response headers and data reading (can contain multiple operations, timeout for each operation can be set with read_msec option);

Value 0 means that timeout is absent.

drms, [array{object}] 

The section containing the configuration of DRM systems for encryption.

cenc, {object} 

The section contains keys retreival settings for Common Encryption (ISO/IEC 23001-7) algorythm.

crypto_period_count, integer 

Default value: 3

The number of keys requested from the server in a single request. Makes sense only when the key rotation is enabled (crypto_period_length value greater than zero).

crypto_period_length, time units 

Default value: 30 minutes

The lifetime of a single key pack (received for a single period). If the value is zero, key rotation is not performed, crypto_period_count property is not included in the request to the key server.

key_request_policy

Default value: last_key_expires

The keys requesting algorithm, valid values are each_key_expires and last_key_expires. See below for details.

key_request_timeout, time units 

Default value: 30 seconds

Defines the timeout for the key server response.

If the timeout for the next key exceeds key_request_timeout, the current request to the key server is canceled and a new request is performed.

If the value is zero, the wait continues until a server response is received or a connection error occurs (not a best choice).

key_server_type

Default value: udrm

The type of key server using for key requests. Supported values are udrm and widevine.

If set to udrm and crypto_period_length > 0, the UDRM key server specific option crypto_period_duration equal to crypto_period_length is added to the key query in addition to the usual parameters.

If set to widevine, the query parameters are fully compatible with Widevine Modular DRM Encryption API.

max_connections, integer 

Default value: 10

The maximum number of connections to the key server. If the key server supports HTTP keep-alive, the connections is opened once upon receipt of a keys request from the encryptor and then used by the all encryptors together. If HTTP keep-alive is not supported, each encryptor opens a new connection for each request, but no more than max_connections connections is opened at the same time.

min_time_between_requests, time units 

Default value: 2

The minimum time between requests retries to the key server in case of an error, in seconds. The value must be less than crypto_period_length.

If the value is zero, the keys for the current period is not re-requested and the content is encrypted with the keys for the previous period in case of a key retrieval failure.

signer_iv, HEX-string 

Default value: empty string

The initialization vector (IV) to encrypt the key request to the key server. IV size must be equal to 16 bytes.

signer_key, HEX-string 

Default value: empty string

The key to encrypt the key request to the key server. The key size can be 16, 24 or 32 bytes.

signer_name, string 

Default value: empty string

The identifier of the signer to sign the key request.

url, string 

Default value: empty string

The key server URL.

write_encryption_info_to_fragment, boolean 

Default value: false

Enforces the encryption information (KeyID and IV size) to be recorded into the each MP4 fragment. When the value is set to false the encryption information is recorded:

  • into each media segment (moof atom) when key rotation for the channel is on;
  • only into the initialization data segment (moov atom) when key rotation is off. Thus, media segments cannot be decrypted without the corresponding initialization data segment;

This setting may be useful for cases when key rotation for the channel is off but each MP4 fragment should be decryptable without an initialization data segment containing moov atom.

align_cenc_subsamples, boolean 

Default value: true

Disable the `Subsamples` alignment for the `cenc` scheme, when the size of the encrypted area `Subsample.BytesOfProtectedData` becomes a multiple of 16. Such alignment is not required for the `cenc` scheme and is not used for the `cbcs` scheme according to the Common Encryption (ISO/IEC 23001-7) standard. In order to use the re-encryption of recorder MP4 chunks “on-the-fly” using the service SmartMEDIA Recryptor (smrecrypt), set it to `false`.

cbcs_crypt_byte_block, integer 

Default value: 0 — CBCS encryption scheme is not applied

The number of encrypted blocks in the pattern for the CBCS encryption scheme. If specified, encryption with the [N:10-N] pattern is applied. The sum of encrypted and open blocks in the pattern must be equal to 10, so you only need to set the number of encrypted blocks. The recommended pattern is [1:9]. For example, the Apple FairPlay encryption uses this pattern.

id, string 

The unique identifier of the encryption settings section

verimatrix, {object} 

This section contains configuration for connecting to the Verimatrix Adaptive CAS server to obtain HLS-AES encryption keys.

address, string 

Verimatrix CAS server address (IP address or hostname).

key_update_period_sec, integer 

Default value: 1800

The key update period, with which the Conveyor encrypts the content, and hence the time interval between the Conveyor key requests to the Verimatrix server, in seconds.

port, integer 

Default value: 12684

A TCP port (a.k.a. “Scrambler Port” in Verimatrix documentation) on which Verimatrix CAS listens for incoming connections.

request_timeout_sec, integer 

Default value: 10

The key request timeout from the Verimatrix CAS server, in seconds.

index_storages, [array{object}] 

Each element of this array describes the index database settings. Currently, only storing indexes in the MongoDB database is supported.

IMPORTANT: be careful of index database settings modifications/deleting. This affects the removing of previously recorded content and nPVR content recording.

Changing settings without changing the ID should be done only if the data has been transferred to the new MongoDB database manually or if the access settings to the same database are changed (for example, password or hostname).

Changing the ID makes the old indexes unavailable for Content Manager (since there is no way to get the database settings with the old ID), the media content is not deleted from the storage, and the indexes — from the database.

If you need to store indexes in another database, you need to create a new record (IndexDatabaseConfiguration object) and specify its identifier in the channel settings. After that, a new version of the channel is created in the Content Manager configuration and the information about the previous database is not lost.

The settings of the old index database should be deleted only after the record window for all stored in it content has expired.

id, string 

The unique identifier of the index database configuration section.

The identifier is used in the channel settings.

mongo, {object} 

The section with index recording settings in MongoDB.

uri, string 

The connection URI (a.k.a. “connection string”) to the MongoDB database. Format of this URL is described in MongoDB documentation.

db, string 

The MongoDB database name.

mp4_header_table, string 

Default value: “mp4_header”

The collection name to store information about MP4 headers for channels in MP4-fragmented format.

mp4_index_table, string 

Default value: “mp4_index”

The collection name to store information about MP4 media chunks for channels in MP4-fragmented format.

ts_header_table, string 

Default value: “ts_header”

The collection name to store information about the stream for channels in MPEG2-TS format.

ts_index_table, string 

Default value: “ts_index”

The collection name to store information about the chunks for channels in MPEG2-TS format.

logo_table, string 

Default value: “logos”

Name of the table storing data about dynamic Timed Logos that are overlaid on top of the video during transcoding (Logo Overlay filter).

max_channels, integer 

Default value: 1000

The maximum number of channels to record which can be specified in the Conveyor channels configuration file.

The value must not exceed the number of channels defined in the license. Paused channels are not counted when checking this limit.

reader_threads, integer, integer 

Default value: 1

The number of threads reading data from sources (multicast socket and/or HTTP/HLS).

threads, integer, integer 

Default value: 4

The number of threads writing data to storages (POSIX and/or S3).

net_trc_threads, integer 

Default value: 1

The number of system threads used by clients of network transcoders to serve TCP exchange.

user, string 

Default value: nobody

The name of the user whose rights the smcvr process have. If the parameter value is not specified (an empty string), the nobody user is used.

In some cases, the service requires superuser privileges to initialize resources (open log files, initialize hardware resources for transcoding, etc.), so it is recommended to start the process as root and drop root privileges with the user and group settings.

group, string 

Default value: nobody

The name of the group the rights of which is granted to the Conveyor process (smcvr). If the value is not specified, the rights of the nobody group is used.

Stream Processing Settings

Global settings that apply to each channel individually.

socket_buffer_size, data size 

Default value: 2M

The read (recv) buffer size for multicast sockets.

read_buffer_size, data size 

Default value: 640K

The size of the intermediate buffer between the system socket and the stream analyzer for each data source.

The socket’s system buffer must be constantly flushed, because overfilling causes the timestamp of a datagram is not longer reflect the time of datagram arrival. As soon as data appears in the system buffer, it should be passed on to the intermediate buffer.

idle_time_limit, integer 

Default value: 30

The time to wait for data from the source, in seconds. If there is no data at the Conveyor input during this period, the source is considered offline, all buffered data is recorded to the storage, the channel is restarted, and the data source is reopened.

In case of multicast input, it sends IGMP Leave/IGMP Join for the source group. If multiple streams are delivered within one multicast group (on different ports) and only one stream is lost, IGMP Leave is not sent.

When the timer is triggered, messages of removing and adding a channel appear in the conveyor’s log:

[info] [default] Removing channel XXX
[info] [default] New channel XXX

max_seconds_between_iframes, integer 

Default value: 30

The time interval during which Conveyor expects to receive at least one IFrame of a video stream. If an IFrame was not found, Conveyor writes the following message to the log:

No IFrame seen for <time interval> seconds! Check <channel name> for errors.

IFrames should occur in a stream regularly, their absence is an abnormal situation.

This setting affects only the HLS recording without remuxing.

packets_to_iframe, integer 

Default value: 60000

The Conveyor service tries to start the recording of a new chunk so that it starts with the IFrame. Thus, when it needs to switch to a new file, Conveyor starts the next IFrame lookup. The packets_to_iframe parameter specifies the number of packets the Conveyor should wait for the next IFrame.

If Conveyor does not find the IFrame in the specified number of packets, and HLS recording is performed without remuxing, the new file is started forcibly, and the following message is written to the log:

Hard limit of <packets_to_iframe value> reached: no IFrame!

The same logic works for the very first chunk: Conveyor is not start recording a channel stream until it finds an IFrame or processes packets_to_iframe packets.

If the IFrame in the specified number of packets is not found and the recording is performed with remuxing, the data in the buffer is discarded and the IFrame lookup starts again.

packets_to_ecm, integer 

Default value: 5000

This setting is similar to packets_to_iframe, but instead of IFrame, Conveyor looks for all ECMs listed in the PMT CAS descriptors. If there are no CAS descriptors in PMT, the ECM search is not performed.

This setting affects only the HLS recording without remuxing.

ignore_iframes, boolean 

Default value: false

The flag that allows to disable an IFrame lookup in the video stream. If set to true, Conveyor looks for PES packet headers in a video track instead of an IFrame.

This allows you to maintain the specified length of the DASH chunk (a fragment inside MP4 file) more accurately: when this option is enabled, the fragment length coincides with the chunk_duration_msec value up to the duration of one frame, whereas deviations from the specified duration within the GOP structure duration (the interval between adjacent IFrames) are possible by default (when the IFrame search is enabled).

When this option is enabled packets_to_iframe and max_seconds_between_iframes belong to the PES-packets.

This setting affects only the HLS recording without remuxing.

max_pcr_jitter_msec, integer 

Default value: 200

The maximum allowed value of a PCR jump in a stream, in milliseconds.

If the difference modulus between adjacent PCR values is greater than max_pcr_jitter_msec, a message about PCR jump is written in the log, and information about stream interruption is added to the playlist:

  • in case of HLS the EXT-X-DISCONTINUITY tag is added;
  • in case of MPEG-DASH a new period is started.
audio_iframe_length_msec, integer

Default value: 2500

The approximate length of an IFrame for indexing non-video streams. In the case of audio content, an IFrame is an audio content segment of a certain duration, consisting of one or several consecutive PES packets, the duration is measured with PTS.

This setting affects only the HLS recording without remuxing.

container_type, string 

Default value: ts

The string defining the default container type for recorded content. It only affects the content recording with remuxing.

Two variants are supported:

  • ts — the original MPEG TS is recorded;
  • mp4 — the payload is placed in ISO base media file format with MP4 brand.
chunk_duration_msec, integer 

Default value: 10000

The expected duration of the chunk, in milliseconds. The default value for all channels.

The actual chunk duration may differ from the expected one within the interval between adjacent IFrames in the stream, since each chunk must begin with an IFrame (also see the parameter packets_to_iframe).

recording_failures_before_channel_restart, integer 

Default value: 5

The number of unsuccessful attempts to write the index into MongoDB, after which the channel is restarted. Cases when MongoDB responds slowly or connection errors occur (i.e., during migration of the PRIMARY node to another server) are considered normal and should not cause the channel recording to fail. So multiple write attempts are made.

interpret_all_iframes_as_idr, boolean 

Default value: false

An option allowing to split the stream into chunks not only by IDR IFrame, but also by non-IDR IFrame. In standard mode, Conveyor searches for an IDR frame to start a new chunk. However, some non-standard streams may not contain IDR frames, but only non-IDR Iframes. To work with such streams, set the true value. The value can be redefined for a specific channel’s demuxer.

drop_nal_filler_data, boolean 

Default value: true

An option allowing to drop NAL units with the FILLER_DATA type when remuxing H264 and H265 streams. Some SmartTV models are not able to correctly play streams with FILLER_DATA, so the option is set to true by default. If you need to keep FILLER_DATA in the stream for some reason, set the option to false. The value can be redefined for a specific channel’s demuxer.

h264_pps_comparison_method, string 

Default value: all

A string that defines how to track PSS changes in H264 video streams. The value can be redefined for a specific channel’s demuxer.

Two options are supported:

  • all — all PSSs found in the stream are compared. If the PSS has changed, headers with initialization data are created for each stream and recording of a new period is started. The PPS is not added into chunks.
  • first — only the first PSS found in the stream is stored when starting or restarting the recording process. In this case, the first and all subsequent PPSs are stored during chunk muxing.
complete_frame_in_nalu, boolean 

Default value: true

A flag to inform the decoder that each NAL unit contains a full video frame. This allows the decoder not to wait for the beginning of the next frame to decode the current one. It may be necessary to reset this flag for cases where a full frame consists of multiple NALUs. For example, an interlaced video in which Top Field and Bottom Field are passed in different NALUs (mediainfo returns Scan type, store method: Separated fields for such a video). This value can be overridden for the video transcoder of a specific channel.

sync, {object} 

The section contains stream synchronization settings

These settings can be overridden in channels’ sync section.

max_samples_in_buffer, integer 

Default value: 1500

Maximum number of the samples (video frames and/or audio samples) in the buffer during tracks synchronization process.

max_dts_synchronization_jitter_usec, integer 

Default value: 80000

The maximum difference between the DTS values of key frames from different tracks of the same channel, at which they are still considered synchronous.

chunk_desync_time_usec, integer 

Default value: 5000000

When a channel recording starts, Conveyor captures the DTS value of the upstream’s master track and the current system time. Subsequently, the increase of the DTS value and the increase of the system time should occur simultaneously – i.e. the one-second in system time should be accompanied by a 90,000-unit increase in DTS (for MPEG2-TS input).

If DTS grows faster (for example, 90001 units per second) or slower than the system time, sooner or later the difference between the two values exceed the value of chunk_desync_time_usec and the flow is considered interrupted.

Most often, this parameter may need to be changed in the following cases: – The DTS of the source stream grows faster / slower than expected (as a rule, this is a problem on the MPEG2-TS multiplexer side). In this case, it is desirable to set relatively low values (up to 5 seconds); – There is a big delay when writing content to the storage. This leads to the fact that the incoming TS-packet is gathered from the input buffer with a delay and the extraction time from the buffer is not correspond to the actual arrival time of the packet.. In this case, it makes sense to increase the value of chunk_desync_time_usec up to the expected the write delay (but it’s much better, of course, to deal with the causes of such delays and eliminate them).

Value should be set in microseconds.

search_policy, string 

Default value: any

The policy of multi-track sync point search, can be applied to reduce CPU load on low-quality streams. Possible values:

  • any — attempt to sync when any key sample (video, audio) appears. Highest CPU load;
  • video — only when a key video sample appears. In this case, the synchronization delay increases to the value of GOP;
  • master — only when a key sample appears in the master track;
  • video_and_n_audio — when each N-th audio sample appears, N is set by the skip_audio_samples parameter.
skip_audio_samples, integer 

Default value: 20

The number of the audio sample on which the track synchronization should be performed when using the video_and_n_audio synchronization policy. This parameter is not used for other policies.

mux, {object} 

The section contains settings for MP4 and MPEG2-TS multiplexors/processors.

These settings can be overriden in mp4 and passthrough sections of the channel configuration.

mp4, {object} 

The section contains MP4 multiplexer settings.

These settings can be overridden in mp4 section of the channel configuration.

time_in_utc, boolean 

Default value: true

When the parameter is set to true, the decode_time value in the corresponding MP4 atoms is bounded to the current wall-clock time.

When the parameter is set to false, the decode_time is taken from the DTS value of the input stream.

add_smooth_streaming_boxes, boolean 

Default value: false

If the parameter value is set to true, a set of Microsoft SmoothStreaming MP4 atoms is generated and recorded: UUIDTfrf, UUIDTfxd and UUIDTfrfBoxFragments boxes is added, and the standard styp and sidx boxes is not added.

smooth_streaming_cache_size, integer 

Default value: 2

Used when the value of the add_smooth_streaming_boxes parameter is true.

This parameter defines the number of UUIDTfrfBoxFragments MP4 boxes to be added to the chunk. To fill the parameters of these MP4 boxes the Conveyor service should keep the appropriate number of chunks in memory before writing to the storage. Therefore, increasing this number leads to the larger delay between the input stream and playback front.

required_timescale, integer 

Default value: 0

Allows to change the value of the timescale when you record MP4 content.

Zero (0) value (recommended) means leave without changes for the video (90000 for MPEG2-TS input streams) and use discretization frequency for the audio.

This setting can be overriden per-track with the required_timescale parameter of the muxer.

max_subtitle_duration_sec, integer 

Default value: 10

The maximum subtitles duration in seconds.

align_video_chunks, boolean 

Default value: false

The flag enables the correction of samples’ DTS values by the master track to avoid different names of chunks accross the same “adaptation set”. Required for the SmoothStreaming with ABR. Can lead to the synchronization problems for unstable input streams.

dvbsub_exoplayer_compatible, boolean 

Default value: true

Flag for disabling the compatibility mode of DVB subtitles with ExoPlayer used on Android devices. In this mode, additional parameters are added into the subtitles’ XML description (in particular, extent in the <tt> tag), which are necessary for the correct subtitles display on Android devices.

passthrough, {object} 

The section contains the global settings of the passthrough-mode recording.

These settings can be overriden in the passthrough section of the channel configuration.

drop_pids, string 

Default value:empty string

The TS stream PID list (each PID — positive integer, delimiters — commas with spaces), the packets with which is dropped before writing. PID — a decimal or the word null. null means null-PID, i.e. 8191.

IMPORTANT: this parameter does not cause any changes in PMT.

This setting affects only the HLS recording without remuxing.

insert_pat_pmt, boolean 

Default value: false

The flag enables PAT/PMT insertion into the beginning of each MPEG2-TS chunk.

Required by some HLS players.

Can be overriden in the insert_pat_pmt channels’ configuration parameter.

file_source, section 

The section contains settings for reading streams from MPEG-TS files.

The file source prebuffers cache_duration_sec of content from the file, but not more than the cache_size buffer size. It then sends portions of data (multiples of a UDP datagram) for processing at PCR timestamps, simulating the arrival of Live stream packets at a specific rate. Since the service is designed to process and record Live streams, it is necessary to maintain the tempo for synchronization and recording to work correctly. To be used as a source, the MPEG-TS file must have correct PCR timestamps that comply with the standard (at least 100 ms).

The value specified by the max_pcr_jitter_msec setting is also used to determine the maximum allowable PCR jump in an MPEG-TS file.

cache_size,  size units 

Default value: 8M

The buffer size of the file source.

cache_duration_sec, integer 

Default value: 2

Maximum duration of the buffered stream in seconds.

Logging, Management and Diagnostics

bitrate_report_period_sec, integer 

Default value: 30

The period of collecting and recording statistics on bitrate and errors for one multicast stream. The statistics are logged at the DEBUG level and also placed in the event queue to be requested via the RPC interface.

The following message is recorded in the log:

overall reading: <bitrate in megabits> Mb/sec. Stream <channel name>.

total_bitrate_report_period_sec, integer 

Default value: 300

The period of collecting and recording statistics on total bitrate and errors. The statistics are logged at the DEBUG level and also placed in the event queue to be requested via the RPC interface.

The following message is recorded in the log:

total bitrate: <bitrate in megabits> Mb/sec. Index generation excluded.

error_sampling_period_sec, integer 

Default value: 30

The period of data aggregation over TS stream errors, PCR jumps, and file system errors, in seconds.

When the error_sampling_period_sec period expires, one event for each type of error with a multiplicity indication is placed in the RPC polling RPC queue for each channel.

For example, if 4 PCR jumps and 2 file system errors occurred during error_sampling_period_sec seconds, 2 events is queued: one for PCR with multiplicity 4, and other — for file system errors with multiplicity 2. The error_sampling_period_sec parameter does not affect the interval of multicast stream loss checking; the multicast stream loss is checked every idle_time_limit seconds.

chunk_slow_writing_threshold, integer 

Default value: 100

The threshold, calculated as a fraction of a specific segment duration, is used to calculate the maximum time which writing of the segment to a storage can take. When storage is too slow and write operation takes longer time, the corresponding line is written to the log file. Can be used for storage performance problems diagnosis.

Value can be more than 100%.

mongo_retry_period_sec, integer 

Default value: 10

MongoDB write operation re-try interval (in seconds).

If the database is unavailable for writing, segments writing to the storage (POSIX or S3) is paused and repeated tries are performed until all the index information has been persisted in the MongoDB.

Such behaviour helps to avoid creation of “ghost” segments which don’t have a corresponding record in the database and cannot be deleted from the storage during the cleaning process.

rpc_port, integer 

Default value: 0

The RPC server port. If the value is zero, the RPC server is disabled.

rpc_event_queue_size, integer 

Default value: 0

The size of the statistics message queue.

udp_queue_monitor, {object} 

The section contains settings of monitoring for the fullness of the multicast stream receiving sockets. When monitoring is enabled, Conveyor runs a separate thread to poll the /proc/net/udp contents with a sampling_period_sec period.

If the buffer is filled with more than warning_limit_percent, critical_limit_percent, or if data loss (datagrams dropped due to buffer overflow) is detected during sampling_period_sec, Conveyor sends messages to the event queue for the RPC request and write them to the log with the appropriate level (WARNING — if exceeding the warning_limit_percent parameter, CRITICAL — if exceeding the critical_limit_percent parameter).

These messages is logged and placed in the RPC polling queue with an error_sampling_period_sec period, not sampling_period_sec. In most cases, it make sense to collect statistics from /proc/net/udp more frequently than generating events and logging.

enabled, boolean 

Default value: false

If the parameter value is true, monitoring is enabled.

sampling_period_sec, integer 

Default value: 10

The polling period of /proc/net/udp directory to get information about buffer filling.

warning_limit_percent, integer 

Default value: 50

When the socket buffer is filled with more than warning_limit_percent, the UDP receive queue too big event is placed in the RPC polling queue.

critical_limit_percent, integer 

Default value: 90

When the socket buffer is filled with more than critical_limit_percent, the UDP receive queue about to overflow, packet drop imminent event is placed in the RPC polling queue; the UDP receive queue too big event is not generated in this case.

Example Configuration

JSON

{

 “threads”:4,

 “channel_set”:“channels.json”,

 “rpc_port”:49977,

 “rpc_event_queue_size”:5000,

 “error_sampling_period_sec”:10,

 “chunk_duration_msec”:2000,

 “idle_time_limit”:30,

 “index_storages”: [

   {

     “id”:“mongo_local”,

     “mongo”: {

       “uri”:“mongodb://localhost”,

       “db”:“mydb”,

       “mp4_index_table”:“mp4_index”,

       “mp4_header_table”:“mp4_header”,

       “ts_index_table”:“ts_index”,

       “ts_header_table”:“ts_header”

     }

   }

 ],

 “data_storages”: [

   {

     “id”:“fs”,

     “fs”: {

       “path”:“/video”

     }

   }

 ],

 “content_manager”: {

   “enabled”:“true”,

   “cleanup_period”:60,

   “recording_window”:“24h”,

   “channel_index”: {

     “uri”:“mongodb://localhost”,

     “db”:“db_cm”,

     “channel_table”:“channels”,

     “s3_storage_table”:“s3_config”,

     “file_storage_table”:“file_config”,

     “mongo_index_storage_table”:“mongo_config”

   }

 },

 “drms”: [

   {

     “id”:“verimatrix”,

     “verimatrix”: {

       “address”:“10.10.30.30”,

       “port”:12684,

       “key_update_period_sec”:600

     }

   },

   {

     “id”:“widevine_test”,

     “cenc”: {

       “url”:“http://10.10.20.20/cenc/getkey”,

       “signer_name”:“client1”,

       “signer_key”:“bb … bb”,

       //HEXAESKey

       “signer_iv”:“aa … aa”,

       //HEXAESIV

       “crypto_period_length”:“0”,

       “crypto_period_count”:0,

       “key_server_type”:“udrm”

     }

   }

 ],

 “sync”: {

   “max_dts_synchronization_jitter_usec”:80000

 },

 “mux”: {

   “mp4”: {

     “time_in_utc”:true,

     “add_smooth_streaming_boxes”:true

   }

 }

}

Channels’ Configuration

Channel List Settings

The channel list is specified as a JSON array named ‘channels’.

The channel structure can contain the following types of data sources:

  • TS stream, received over UDP (multicast or unicast) or HTTP;
  • Media samples source:
    • Demultiplexer. Described in the demuxers section. Produces elementary streams from a MPEG2-TS stream.
    • Transcoder. Described in video_transcoders and audio_transcoders sections. Receives samples from the demuxer.

The channel recording can be configured in the muxers section; each multiplexor can only receive data from one source at a time. Thus, if the source is a TS stream, recording is possible only without remultiplexing (respectively, in MPEG2-TS, in the same form as the server receives the stream).

If the source produces an elementary stream (media samples), they can be multiplexed both in TS and MP4 container. It is prohibited to combine the recording with or without remuxing within the same channel.

All streams to the recorder input (muxers) must be synchronized and have the same GOP structure. For the streams transcoded by SmartMEDIA Conveyor it’s made by the transcoder by default.

id, string 

The unique channel identifier.

drm_id, string 

Unique content ID for the DRM system used to get encryption keys. If not specified, the field id is used.

index_storage, string 

Defines the identifier of the index storage defined in index_storages section in the main configuration file.

data_storages, [array of strings] 

The data storages configuration section identifier. The storages must be defined in the system configuration file.

IMPORTANT: for now, only one storage for one channel is supported.

Example: data_storages=[“s3storage”]

container_type, string 

Default value: ts

The container type which is used for content recording. Valid values are:

  • ts — the payload should be encapsulated into MPEG2-TS container and recorded;
  • mp4 — the payload should be encapsulated into ISO base media file format with ‘MP4’ brand.

Overrides the container_type parameter of the system settings file.

segment_duration, time units 

Default value: 0

The duration of the file to which several consecutive chunks should be written (a.k.a. segment). When the specified duration is reached, the file is being closed and a new one begun (the segments rotation is being performed).

The segments are also rotated if a write error to at least one of the files for one of the tracks or one of the storages occurs.

The segment files for all tracks have the same name based on a master track timestamp (NPT) in microseconds.

If the value is set to ‘0’ each chunk is written to a separate file and no “large segments” is used.

Using segments is supported (and makes sense at all) only with POSIX filesystems – it’ll reduce the number of files in the filesystem which is significant for most POSIX filesystems and can lead to performance degradation.

sources, [array{object}] 

The array of channel sources’ settings.

Each stream source has its own URL and can contain one or more tracks. The source can be recorded “as is” in a MPEG2-TS container for later playback via HLS (see passthrough section) or demultiplexed.

id, string 

The unique source identifier.

url

Type: URL

The source stream URL (HTTP or UDP).

For multicast sources, URLs looks like:

udp://224.5.6.7:5000

For HTTP sources (HLS or continuous HTTP stream) their normal HTTP/HTTPS URLs should be specified.

hls, {object} 

The section responsible for the HLS source settings.

It is specified only if the HTTP source should work on the HLS protocol.

stream_type, string 

HTTP stream type.

If the value is hls and the url parameter is set to a valid HTTP URL, Conveyor retrieves the stream over HLS protocol, parses the playlist as a variant playlist and looks for a media playlist with defined bandwidth inside it.

If the value is hls_stream and the url parameter is set to a valid HTTP URL, Conveyor retrieves the stream over HLS protocol and parses the playlist as a media playlist.

bandwidth, integer 

Default value: 0

Only for stream_type = hls.

The bandwidth, by which the stream is selected from the variant playlist. If the parameter value is ‘0’, the first stream in the playlist is used.

demuxers, [array{object}] 

Demultiplexers’ settings.

id, string 

The unique demuxer identifier.

source, string 

The MPEG2-TS stream source identifier.

tracks

Type: array of strings

The string array describing the output tracks in the format <type><number>. For example: vid0 or aud1. The following types are supported:

  • vid — video,
  • aud — audio,
  • sub — subtitles (DVB Subtitles (ETSI EN 300 743) or Teletext (ETS 300 706)).

For Teletext subtitles the page number can be defined as an argument, e.g. “sub0?777” for page #777. The default page number is 888.

program_id, integer 

Default value: 0

ID of the program to be demultiplexed from the MultiProgram MPEG-TS stream. If the program ID is not set (equal to zero), and several PMT PIDs are detected in the PAT table, an error warning is written to the log.

aac_decode_first_sample, boolean 

Default value: false

For some AAC streams, it is not enough to get the samplingFrequencyIndex value from the ADTS header, as a result, the actual sampling frequency is doubled. This option enables the decoding of the first sample when starting (restarting) the recording using ffmpeg.

interpret_all_iframes_as_idr, boolean 

An option allowing to split the stream into chunks not only by IDR IFrame, but also by non-IDR IFrame. In standard mode, Conveyor searches for an IDR frame to start a new chunk. However, some non-standard streams may not contain IDR frames, but only non-IDR Iframes. To work with such streams, set the true value. If the value is omitted, the value specified in the main configuration file is used.

drop_nal_filler_data, boolean 

An option allowing to drop NAL units with the FILLER_DATA type when remuxing H264 and H265 streams. Some SmartTV models are not able to correctly play streams with FILLER_DATA, so the option is set to true by default. If you need to keep FILLER_DATA in the stream for some reason, set the option to false. If the value is omitted, the value specified in the main configuration file is used.

h264_pps_comparison_method, string 

If set, it overrides the value specified in the main configuration file.

video_transcoders, [array{object}] 

Transcoders’ settings for video tracks.

id, string 

The unique transcoder ID.

source, string 

ID of the source to be used as a samples’ source for the transcoder.

use_qsv, boolean 

Default value: false

The flag that allows you to enable the use of Intel QuickSync Video hardware acceleration for video transcoding. To use QSV, you need to make sure that the CPU and GPU of the server support this technology and that the Intel MediaSDK library is correctly installed in the system. More information can be found in the Intel MediaSDK documentation.

async_depth, integer 

Default value: 4

The degree of parallelism when executing tasks inside the Intel MediaSDK. Specifies the number of asynchronous operations that the application can run before explicit synchronization (waiting) is required to get the result. This value applies to the decoder, encoder, and VPP filters, meaning that each pipeline component can run the specified number of asynchronous operations. Values of async_depth > 1 can improve GPU utilization and performance, especially if a small number of low-resolution channels are transcoded and a value of async_depth = 1 does not lead to full GPU utilization. However, increasing this value also leads to increased resource consumption, in particular, it is necessary to allocate more surfaces for storing decoded frames. Usually, a value of async_depth > 5 does not lead to a noticeable performance improvement but leads to increased resource consumption. If GPU utilization is already achieved due to the fact that a large number of channels are transcoded into several bitrates, then it may be advisable to reduce the async_depth (for example, to 2) for balanced resource consumption. If GPU utilization is already achieved by running transcoding of a large number of channels in several bitrates, then it may be advisable to reduce the async_depth value (for example, to 2) for balanced resource consumption.

use_mfe, boolean 

Default value: false

Enables the Intel Multi-Frame Encoding technology when transcoding with Intel QSV-enabled CPUs.

MFE improves GPU utilization while encoding multiple streams with low resolution (less then 1080p), especially for the most powerful GPUs (Intel Iris Pro Graphics 580 and better). If Multi-Frame Encoding is enabled for the transcoder all output streams described in out section can be encoded in parallel. However, the technology doesn’t affect encoding of multiple streams of different channels because they are encoded in different QSV sessions.

Compatible only with the Intel QSV transcoder, when use_qsv value is set to true.

See Intel MediaSDK documentation for more details.

a53cc, boolean 

Default value: false

A flag to enable decoding of EIA-608/708 Closed Captions from the H264/H265 video stream and to include them into the output H264/H265 video streams. QSV supports only H264 video streams, Nvidia supports H264/H265 video streams. Subtitles of this type are passed in SEI (Supplemental Enhanced Information) messages within the video track, so the separate track is not created in the playlist and their processing is part of the video transcoding.

net_trc, string 

The Network Transcoder ID to be used for transcoding.

If the network transcoding is configured, Conveyor sends a demultiplexed stream of samples to a remote transcoding server, receive transcoded streams from it, perform processing (synchronization, multiplexing, splitting into chunks) and write to the storage.

Since transcoding is a very resource-intensive operation, it can significantly reduce the load on the recording server and record more channels on a single server. It also allows you to share network transcoders with appropriate hardware resources, such as support for Intel QuickSync Video technology.

decode_encrypted, boolean 

Default value: false

When true, transcoder tries to decode the stream even when it’s marked as encrypted.

For the false value transcoder rejects the encrypted stream and prints the error message to the log.

Can be used for the ‘pseudo-encrypted’ streams with ‘scrambled’ flag set but with no encrypted samples.

deinterlacing, string 

Default value: auto

The VPP Deinterlacing filter mode. Values supported:

  • auto — by default, the deinterlacing is disabled and it is enabled, if the input frames are explicitly determined as progressive;
  • off — deinterlacing is always disabled, even for the interlaced input.
double_rate_deinterlacing, boolean 

Default value: false

Doubling the frame rate when deinterlacing.

complete_frame_in_nalu, boolean 

Type: boolean
Default value: true

A flag to inform the decoder that each NAL unit contains a full video frame. This allows the decoder not to wait for the beginning of the next frame to decode the current one. It may be necessary to reset this flag for cases where a full frame consists of multiple NALUs. For example, an interlaced video in which Top Field and Bottom Field are passed in different NALUs (mediainfo returns Scan type, store method: Separated fields for such a video). This value overrides the global setting.

input_resolution, string 

Default value: hd

Maximum input stream resolution expected by the transcoder for the channel. Valid values are: sd, hd and uhd.

SmartMEDIA License defines the maximum number of SD, HD and UHD streams to be transcoded. If the configuration has more transcoders with the specified resolution than allowed by the license, warning is written in the log file and transcoder service stops. However, licenses for higher resolutions can be used to process channels with lower resolutions (for instance, UHD license can be used to process HD and SD streams, or HD license can be used to process SD streams).

Furthermore, besides checking the configuration, transcoder continuously checks the input stream resolution whether it corresponds to the declared value. If the stream resolution exceeds the declared one (for instance, sd is declared, but stream is 1920×1080 pixels) channel processing stops.

logo, {object} 

Section with settings for the logo overlaid on top of the video stream (the Logo Overlay filter). If omitted, the logo is not overlaid.

For best transcoding performance, only one image is overlaid on a video frame at a time. If you need to overlay several graphic elements at the same time, combine them into a single image in a graphics editor in advance.

opacity, integer 

Default value: 100

Defines the logo opacity from 0 to 100, where 0 — completely transparent, 100 — completely opaque.

The parameter must be known when the transcoder starts, therefore it is set in the transcoder configuration and cannot be changed when creating dynamic Timed Logos via JSON-RPC API.

transparent_color, string 

Grayscale color from white to black, which is considered transparent when overlaying the logo using the Luma Keying method, i.e. only the brightness component of the color (Luma) from 0 to 255 is used to determine the transparent areas of the logo. The color is set in the FFmpeg color format, i.e. in the form of a name (black, white, red) or in the format #RRGGBB. So it is possible to specify colors other than gray such as red or blue, but since only the brightness component is used, light gray, light red and light blue colors is the same.

The parameter must be known when the transcoder starts, therefore it is set in the transcoder configuration and cannot be changed when creating dynamic Timed Logos via JSON-RPC API. This parameter is also used as a flag to enable the dynamic Timed Logo scheduler. To be able to configure time-bound logos via the JSON-RPC API, you must first set the color for Luma Keying (common to all logos) in the transcoder configuration.

url, string 

HTTP URL or path in the local file system to the PNG image that is overlaid as a static logo. It can be used to set a single permanent logo or placeholder when using dynamic Timed Logos. In the second case, the static logo is displayed when there is no active dynamic Timed Logo in the scheduler. The image is downloaded from the specified URL each time the channel recording starts. If the image cannot be downloaded, a warning is displayed in the log and the channel is recorded without the logo overlay.

If the URL is not specified, then the static logo is not used, but dynamic Timed Logos created via the JSON-RPC API and stored in the database can be overlaid.

x, integer 

Default value: 0

Horizontal coordinate of the upper-left corner of the logo on the original video frame (before scaling), in pixels.

Used only if a static logo URL is specified.

y, integer 

Default value: 0

Vertical coordinate of the upper-left corner of the logo on the original video frame (before scaling), in pixels.

Used only if a static logo URL is specified.

crop, {object} 

The section responsible for configuring a rectangular area for cropping the edges of the video frame (Crop filter). If not specified, the cropping is not applied.

If the Logo Overlay feature is configured, the logo is positioned in the coordinates of the cropped video frame, not the full decoded frame. For example, if the logo.x = 0 and crop.x = 100, then the logo is not cropped.

x, integer 

Default value: (inputWidth – crop.w)/2

The horizontal coordinate of the left side of the rectangular cropping area, in pixels. If not set, it is calculated as (inputWidth – crop.w)/2, i.e. the area is horizontally aligned to the center of the frame. If set, it is limited to the [0, inputWidth – crop.w] range.

y, integer 

Default value: (inputHeight – crop.h)/2

The vertical coordinate of the upper side of the rectangular cropping area, in pixels. If not set, it is calculated as (inputHeight – crop.h)/2, i.e. the area is vertically aligned to the center of the frame. If set, it is limited to the [0, inputHeight – crop.h] range.

w, integer 

Default value: inputWidth

The width of the cropping rectangular area, in pixels. If not set, the source frame width is used. If set, it is limited to the [2, inputWidth] range.

h, integer 

Default value: inputHeight

The height of the cropping rectangular area, in pixels. If not set, the source frame height is used. If set, it is limited to the [2, inputHeight] range.

out, [array{object}] 

Output video streams settings.

codec, string 

Default value: h264

The video codec to be used to encode the stream. Supported values are h264 and h265.

pix_fmt, string 

Default value: nv12

Output pixel format that describes the number of bits per color component and pixels representation method. The following values are supported:

  • nv12 — planar format YUV 4:2:0, 8 bit/color. Used for the H264 and HEVC MAIN Profile codecs. In ffmpeg terms, this format is called yuv420p.
  • p010 — planar format YUV 4:2:0, 10 bit/color. Used for the HEVC MAIN10 Profile codec. In ffmpeg terms — yuv420p10le.
preset, string 

Default value: best_speed

A value that sets the balance between the quality of the output video and the transcoding speed. The following values are supported: – best_speed — maximum transcoding speed with acceptable video quality; – balanced — balance between speed and quality; – best_quality — best video quality, slow transcoding.

When using Intel QSV technology, it is recommended to start with the value ‘best_speed’ and reduce the speed only if the video quality is not objectively satisfactory. The peculiarity of Intel QSV is that when using best_speed, the video quality virtually does not decrease (according to a note from Intel MediaSDK Release Notes, sometimes the quality is even better than when using ‘balanced’), and the speed increases significantly.

bitrate, data size 

Default value: 1024k

The target output steam bitrate.

maxrate, data size 

Default value: 0

The maximum bitrate for the output stream, in bits/s. If it is set (not equal to 0) and is equal to the target bitrate bitrate, then the Constant Bitrate Control (CBR) mode is used, otherwise — Variable Bitrate Control (VBR). For the VBR mode, this parameter specifies the maximum bitrate at which encoded frames are sent to the Video Buffering Verifier (VBV). For the VBR mode, this parameter determines the maximum bitrate of encoded frames to be delivered to the Video Buffering Verifier (VBV). If set to 0, VBR mode is used and the parameter is calculated by Intel MediaSDK based on the target bitrate, frame rate, codec profile and level, and other parameters.

bufsize, data size 

Default value: 0

The size of the Video Buffering Verifier (VBV) buffer, in bits. Affects the variability and deviation of the bitrate from the average value. The smaller the buffer, the closer the bitrate is to the average value, less spikes, but the image quality may degrade. It is recommended to start with a buffer size sufficient for 2 seconds of video with a maximum bitrate of maxrate, that is, bufsize = 2 * maxrate. Then decrease or increase it depending on the requirements for the bitrate variability. If the client device has a small buffer (for example, old STBs), then you can reduce the bufsize to a size of one maxrate. If you need to strictly limit the bitrate fluctuations, you can reduce the buffer to half of the maxrate or less. But in this case, it is recommended to check that the image quality remains acceptable. If the buffer size is insufficient, the encoder has less room for optimization and efficient encoding, so the quality can be reduced (increased Quantization Parameter, QP) for large frames (for example, I-frames) so that they fit into the bitrate limit. This can be represented as the periodic appearance of blurry and fuzzy frames. This is especially true for the Constant Bitrate Control (CBR) mode. In this case, it is recommended to switch to Variable Bitrate Control (VBR) mode and use an enlarged VBV buffer.
If the parameter is not set (equal to 0), the Intel MediaSDK uses the automatically calculated value.

rc_init_occupancy, data size 

Default value: 0

The initial filling of the VBV buffer in bits, after which the decoder starts decoding. This parameter, along with the bitrate, maxrate, and bufsize parameters, is used to control the output bitrate and is part of the common Video Buffering Verifier (VBV) or Hypothetical Reference Decoder (HRD) model. This is a simplified model assuming that data enters a buffer of a fixed bufsize size according to the individual size of the encoded frames, and exits the buffer with a constant bitrate bitrate. The decoder starts decoding after the buffer is filled to the size of rc_init_occupancy. The purpose of the encoder is to prevent this hypothetical buffer from overflowing or underflowing.
If the parameter is not set (equal to 0), the Intel MediaSDK uses the automatically calculated value.

quality, integer 

Default value: 0

The desired level of image quality that affects the degree of frame quantization (QP). Valid values: from 1 (best quality) to 51 (worst quality). If the quality is set (not equal to 0), the Quality Variable Bitrate Control (QVBR) mode is used, since the traditional VBR and CBR modes do not support specifying the quality, but only the bitrate limits. The QVBR algorithm is some hybrid of the well-known Constant Rate Factor (CRF) algorithm and the usual Variable Bitrate Control (VBR), suitable for video streaming purposes. Traditional CRF allows you to set the quality level without bitrate limits, so large bitrate fluctuations make it more suitable for file transcoding (VOD) than for Live video, which is transmitted over channels of limited bandwidth. QVBR tries to achieve the desired subjective level of quality (i.e., at the level of human perception, rather than at the level of more formal metrics such as PSNR) by limiting fluctuations near the target bitrate and maintaining compatibility with the Video Buffering Verifier (VBV) or HRD model.
If the desired quality is not set (equal to 0), then only the bitrate limits and the traditional VBR or CBR mode are applied.

width, integer 

Default value: 720

Output video resolution – width.

height, integer 

Default value: 576

Output video resolution – height.

gop_size, integer 

Default value: 25

The GOP size – number of frames between the two keyframes.

frame_rate_numerator, integer 

Default value: 0

Frame rate numerator. The frame rate is set as a rational number. Only reducing the input stream frame rate is supported.

frame_rate_denominator, integer 

Default value: 1

Frame rate denominator. The frame rate is set as a rational number. Only reducing the input stream frame rate is supported.

bframes_num, integer 

Default value: 0

Number of B-frames between non B-frames. Must be an integer between -1 and 16. 0 means that B-frames are disabled. If a value of -1 is used, it chooses an automatic value depending on the encoder.

audio_transcoders, [array{object}] 

Transcoders’ settings for audio tracks.

id, string 

The unique transcoder ID.

source, string 

The identifier of the source to be used as a samples’ source for the transcoder.

net_trc, string 

The Network Transcoder ID to be used for transcoding.

If the network transcoding is configured, the Conveyor sends a demultiplexed stream of samples to a remote transcoding server, receives transcoded streams from it, performs processing (synchronization, multiplexing, chunking) and writes streams to the storage, and indexes — to the DB.

decode_encrypted, boolean 

Default value: false

When value is true the transcoder tries to decode the stream even if it is marked as scrambled.

When value is false and the stream is scrambled, the transcoder logs the error and stops decoding of the stream.

Setting could be used to process a ‘pseudo-scrambled’ stream where ‘scrambled’ flag is set but, however, stream is not encrypted (for instance, when ‘encryption ratio’ is set to 0% on scramblers).

out, [array{object}] 

Settings of the audio transcoder outputs.

bitrate, data size 

Default value: 128k

Target bitrate of the audio stream.

channels_count, integer 

Default value: 2

Number of audio channels of the output stream

sample_rate, integer 

Default value: 48000

Audio sampling rate for the output stream

muxers, [array{object}] 

Multiplexing and recording settings for individual channel streams.

bw, integer 

Default value: 0

The network bandwidth required to play the stream. Used for DASH or HLS+MP4 playlists generation.

dir, string 

The filesystem subdirectory (for POSIX storages) or URL prefix (for S3/object storages) relative to the channel directory/URI to which the stream is recorded. Must be unique within the channel.

lang, string 

The two-letter designation of the stream language (used for audio) in accordance with ISO 639-1:2002.

role, string 

Sets the role for Adaptation in the DASH manifest according to the “5.8.5.5 DASH role scheme” clause of the “ISO/IEC 23009-1” standard. Possible values: caption, subtitle, main, alternate, supplementary, commentary, dub. The role can be used to mark the DescribedVideo track in the manifest with the commentary value.

required_timescale, integer 

Default value: 0

Allows to set the timescale value for the specific track or leave the source timescale as-is (the 0 value, recommended).

For example, it can be helpful while solving the playback issues on some SmartTVs, which can support only 10 000 000 timescale.

encryptor, {object} 

The section for configuring the current stream encryption. If not specified, the stream won’t be encrypted.

drm, string 

The DRM settings identifier defined in the global configuration.

key_type, string 

Default value: UNKNOWN

The type of the key corresponding to the type field in the key request. Supported values: SD, HD, AUDIO.

If not specified, the type is selected according to the track type (SD for video, AUDIO for audio).

sources, [array{object}] 

An array of sections; each defines a media samples source for the recorded stream.

IMPORTANT: only one source is currently supported.

source, string 

The name for the TS stream (when recording without remuxing) or sample source track.

master, boolean 

Default value: false

The main source flag for synchronizing chunks (there should be only one within the channel). It is recommended to select the source containing the video track with the maximum bitrate.

pvr_skip, boolean 

Default value: false

If the value is set to true this track won’t be used for nPVR programms recording. The false value leaves the track in the nPVR record as-is.

This parameter can be used to optimize the storage space for nPVR records.

mp4, {object} 

MP4 (ISO BMFF) container multiplexing settings.

Overrides the global settings defined in mux.mp4 section of the main configuration file.

passthrough, {object} 

Settings for MPEG2-TS streams recording without remultiplexing.

Overrides the global settings defined in mux.passthrough section of the main configuration file.

drop_pids, string 

Overrides the global drop_pids configuration parameter for a channel/stream; i.e. only the PIDs listed here is dropped, not the global drop_pids + channel’s drop_pids.

insert_pat_pmt, boolean 

Default value: false

The flag enables PAT/PMT insertion into the beginning of each MPEG2-TS chunk.

Required by some HLS players.

The parameter overrides the global parameter insert_pat_pmt.

check_pat_crc, boolean 

Default value: true

The flag disables CRC checking in MPEG2-TS PAT.

If the PAT does not pass the CRC check, that PAT is considered invalid and is discarded. Accordingly, if there are only such PATs in the stream, the stream won’t be recorded.

check_pmt_crc, boolean 

Default value: true

This parameter is similar to check_pat_crc: the flag to disable CRC checking of the current stream PMT.

sync, {object} 

Track synchronization settings for ABR streams.

Overrides the global settings defined in sync section of the main configuration file.

thumbnails, [array{object}] 

Parameters for creating of thumbnail images from the keyframes of the track specified by the thumbnails_source option. These images can be used by the player for better visualization during seek.

Unlike thumbnails_mosaic, each JPEG file contains a picture only for a single frame.

dir, string 

See the dir configuration value definition of the Channel Recorder.

width, integer 

Width of the preview image. The original video width is used if the value is not set.

height, integer 

Height of the preview image. The original video height is used if the value is not set.

thumbnails_mosaic, [array{object}] 

Parameters for creating a thumbnail mosaic from the keyframes of the track specified by the thumbnails_source option.

A single JPEG image contains multiple thumbnails, a thumbnails_mosaic_cols x thumbnails_mosaic_rows matrix of pictures, that can be used by the player for preview when seeking. This feature allows to speed up loading of thumbnails to the client device.

dir, string 

See the dir configuration value definition of the Channel Recorder.

width, integer 

Width of the preview image. The original video width is used if the value is not set.

height, integer 

Height of the preview image. The original video height is used if the value is not set.

thumbnails_mosaic_cols, integer 

Default value: 0

The number of columns in the thumbnail mosaic.

thumbnails_mosaic_rows, integer 

Default value: 0

The number of rows in the thumbnail mosaic.

thumbnails_source, string 

The identifier of the video track, which is to be used for thumbnails generation. Thumbnail generation is off if the value is not set.

Thumbnails are generated as JPEG images. They could be used in the media players for preview purposes during seek.

scte35, {object} 

Parameters of the SCTE-35 events recording.

use_wallclock_time, boolean 

Default value: false

If true, when recording SCTE-35 events, the system time is saved instead of the time encoded in the event.

offset_msec, integer 

Default value: 0

The system time offset when recording SCTE-35 events, if the use_wallclock_time parameter is set to true.

accessibility_608, string 

The value of the Accessibility tag in the MPD playlist for schemeIdUri=”urn:scte:dash:cc:cea-608:2015″.

Example of a Channels’ configuration file (TS HLS Recording Without Remuxing, Single Channel)

JSON

{

 “channels”: [

   {

     “container_type”:“ts”,

     “data_storages”: [

       “fs”

     ],

     “id”:“CH_HLSTS”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“bw5000000”,

         “encryptor”: {

           “drm”:“verimatrix”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“ts_multicast_1”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.65.40.4:5001”

       }

     ]

   }

 ]

}

Example of a Channels’ configuration file with ISO BMFF Container Recording and Encryption

JSON

{

 “channels”: [

   {

     “id”:“CH_DASHMP4”,

     “container_type”:“mp4”,

     “data_storages”: [

       “fs”

     ],

     “demuxers”: [

       {

         “id”:“dmx1”,

         “source”:“ts_multicast_1”,

         “tracks”: [

           “vid0”,

           “aud0”

         ]

       }

     ],

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“video/bw5000000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“dmx1:vid0”

           }

         ]

       },

       {

         “bw”:“100000”,

         “dir”:“audio/bw150000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “source”:“dmx1:aud0”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.1.1.1:5001”

       }

     ]

   }

 ]

}

Recorded Content Management

To enable content management, set the content_manager.enabled flag to true. Content management is performed in a separate thread pool, so this function does not create an additional load on the recording parts of Conveyor service.

Removing Stale Content

When content management is enabled, Conveyor periodically (depending on the content_manage.cleanup_period parameter) deletes stale assets along with their index. An asset is considered obsolete if it expires no later than content_manager.recording_window time ago.

Symbolic links to assets on POSIX storages are not supported. In other words, a symbolic link is followed, but only the symbolic link itself is deleted, not the content it refers to. Since SmartMEDIA does not create symbolic links to content (neither to directories nor to assets), support for symbolic links to assets allow you to handle only rare cases of manual intervention in the directory structure created by the Conveyor.

Features of Track Recording, Remuxing and Synchronization

The content can be recorded in two ways:

  • Without remultiplexing. Only the MPEG2-TS container is supported. The container of the source stream is not changed. The TS stream is split into chunks. Additional service packs can be added before writing to chunks. The chunk can also be encrypted without compromising the container integrity.
  • With remultiplexing. Supported ISO BMFF (MP4) and MPEG2-TS containers. The source container is parsed to the sample level for each track. When recording, samples and service information (stored unsampled in the original container) are encrypted (if necessary) and packaged in a new container. The sample groups are also divided into chunks.

If several tracks are recorded, their chunks (when recording without remultiplexing) or samples (when recording with remuxing) must be synchronized. Synchronization is performed as follows:

If several tracks are recorded, their chunks (when recording without remuxing) or samples (when recording with remuxing) must be synchronized. Synchronization is performed as follows:

  • The presence of the master track is checked. It must be specified in the channel configuration file.
  • Samples/chunks begin to accumulate in the buffer.
  • The search for chunks/samples of keys from different tracks, DTS of which differs by no more than max_dts_synchronization_jitter_usec, is performed.
  • If synchronization points are found, then the chunk recording for each of the tracks begins.
  • If no synchronization points are found for one track at least and the number of samples/chunks in the buffer has reached max_samples_in_buffer (counted separately for each track), the buffered samples/chunks are discarded and the process starts again.

Supported RPC Methods

See also the “RPC Methods Common to all Services” chapter.

In the examples of calling RPC methods below, the library tinyrpc is used; conveyor — an object of the tinyrpc.RPCClient class.

The GetChannelParams and GetChannels methods are always available when the RPC server is running.

The SetChannelParams, StartRecord, StopRecord, CreateProgram, ProgramStatus, RemoveProgram, HaveContent methods are available only if the channel_set_update_method parameter is set to rpc. With a different channel_set_update_method value, when trying to call any of these methods, Conveyor returns the JSON error “Method not found”.

The CreateProgram, ProgramStatus, RemoveProgram, HaveContent methods are available only if the content_manager.enabled parameter is set to true. If content management is disabled, or the content_manager section is omitted, when trying to call any of these methods, Conveyor returns the JSON error “Method not found”.

GetChannelParams(npvr_channel_id, verbose)

Returns the current channel parameters in JSON format, or an empty JSON response if such a channel is unknown.

npvr_channel_id, string 

Channel ID.

verbose, boolean 

Default value: false

Flag to control the amount of JSON data retuned. If true, all the channel parameters are returned, including data not explicitly specified in the configuration (i.e. having default values). If false, the explicitly specified parameters are returned, as well as the state parameter.

Call Example (python)

The contents of the channels.json:

JSON

{

 “channels”: [

   {

     “container_type”:“ts”,

     “data_storages”: [

       “fs”

     ],

     “id”:“CH_HLSTS”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“bw5000000”,

         “encryptor”: {

           “drm”:“verimatrix”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“ts_multicast_1”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.65.40.4:5001”

       }

     ]

   },

   {

     “container_type”:“mp4”,

     “data_storages”: [

       “fs”

     ],

     “demuxers”: [

       {

         “id”:“dmx1”,

         “source”:“ts_multicast_1”,

         “tracks”: [

           “vid0”,

           “aud0”

         ]

       }

     ],

     “id”:“CH_DASHMP4”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“video/bw5000000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“dmx1:vid0”

           }

         ]

       },

       {

         “bw”:“100000”,

         “dir”:“audio/bw150000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “source”:“dmx1:aud0”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.1.1.1:5001”

       }

     ]

   }

 ]

}

After the call below

Python

rpcResult = conveyor.GetChannel(‘CH_HLSTS’)

the following response is returned to rpcResult:

JSON

{

 “container_type”:“ts”,

 “data_storages”: [

   “fs”

 ],

 “id”:“CH_HLSTS”,

 “index_storage”:“mongo_local”,

 “muxers”: [

   {

     “bw”:“6500000”,

     “dir”:“bw5000000”,

     “encryptor”: {

       “drm”:“verimatrix”

     },

     “sources”: [

       {

         “master”:“true”,

         “source”:“ts_multicast_1”

       }

     ]

   }

 ],

 “sources”: [

   {

     “id”:“ts_multicast_1”,

     “url”:“udp://239.65.40.4:5001”

   }

 ]

}

And after the call below

Python

rpcResult = conveyor.GetChannel(‘not a channel’)

the following response is returned to rpcResult:

{}

StartRecord(npvr_channel_id, params)

The method starts recording the channel. If the channel is already in the configuration file or its parameters are not correct, an error is returned.

npvr_channel_id, string 

Channel ID.

params, string 

JSON object with a list of channels.

Call Example (python)

The contents of the channels.json:

JSON

{

 “id”:“will_be_ignored”,

 “container_type”:“ts”,

 “data_storages”: [

   “fs”

 ],

 “index_storage”:“mongo_local”,

 “muxers”: [

   {

     “bw”:“6500000”,

     “dir”:“bw5000000”,

     “encryptor”: {

       “drm”:“verimatrix”

     },

     “sources”: [

       {

         “master”:“true”,

         “source”:“ts_multicast_1”

       }

     ]

   }

 ],

 “sources”: [

   {

     “id”:“ts_multicast_1”,

     “url”:“udp://239.65.40.4:5001”

   }

 ]

}

After the call below

Python

rpcResult = recorder.StartRecord(‘my_channel_id’, json.dumps(channelJson))

the channel receives the channel_id equal to my_channel_id.

StopRecord(channel_id)

The method stops recording the channel with the specified ID and removes it from the configuration file.

channel_id, string 

Channel ID.

If the channel with the specified channel_id is missing, the method returns an error.

Call Example (python)

Python

rpcResult = recorder.RemoveChannelParams(‘my_channel_id’)

GetChannels(id_filter, verbose)

The method returns a JSON object with a list of known channels and their configurations from the channels.json file.

id_filter, string 

Optional. Regular expression returning a list of channels whose ID matches this regular expression. By default, all channels known to Conveyor are returned.

verbose, boolean 

Default value: false

Flag to control the amount of JSON data retuned. If true, all the channel parameters are returned, including data not explicitly specified in the configuration (i.e. having default values). If false, the explicitly specified parameters are returned.

Parameters can be passed either in order or with a name.

Call Example (python)

The contents of the channels.json:

JSON

{

 “channels”: [

   {

     “container_type”:“ts”,

     “data_storages”: [

       “fs”

     ],

     “id”:“CH_HLSTS”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“bw5000000”,

         “encryptor”: {

           “drm”:“verimatrix”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“ts_multicast_1”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.65.40.4:5001”

       }

     ]

   },

   {

     “container_type”:“mp4”,

     “data_storages”: [

       “fs”

     ],

     “demuxers”: [

       {

         “id”:“dmx1”,

         “source”:“ts_multicast_1”,

         “tracks”: [

           “vid0”,

           “aud0”

         ]

       }

     ],

     “id”:“CH_DASHMP4”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“video/bw5000000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“dmx1:vid0”

           }

         ]

       },

       {

         “bw”:“100000”,

         “dir”:“audio/bw150000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “source”:“dmx1:aud0”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.1.1.1:5001”

       }

     ]

   }

 ]

}

After the call below

Python

rpcResult = recorder.GetChannels()

the following response is returned to rpcResult:

JSON

{

 “CH_HLSTS”: {

   “container_type”:“ts”,

   “data_storages”: [

     “fs”

   ],

   “id”:“CH_HLSTS”,

   “index_storage”:“mongo_local”,

   “muxers”: [

     {

       “bw”:“6500000”,

       “dir”:“bw5000000”,

       “encryptor”: {

         “drm”:“verimatrix”

       },

       “sources”: [

         {

           “master”:“true”,

           “source”:“ts_multicast_1”

         }

       ]

     }

   ],

   “sources”: [

     {

       “id”:“ts_multicast_1”,

       “url”:“udp://239.65.40.4:5001”

     }

   ]

 },

 “CH_DASHMP4”: {

   “container_type”:“mp4”,

   “data_storages”: [

     “fs”

   ],

   “demuxers”: [

     {

       “id”:“dmx1”,

       “source”:“ts_multicast_1”,

       “tracks”: [

         “vid0”,

         “aud0”

       ]

     }

   ],

   “id”:“CH_DASHMP4”,

   “index_storage”:“mongo_local”,

   “muxers”: [

     {

       “bw”:“6500000”,

       “dir”:“video/bw5000000”,

       “encryptor”: {

         “drm”:“widevine_test”

       },

       “sources”: [

         {

           “master”:“true”,

           “source”:“dmx1:vid0”

         }

       ]

     },

     {

       “bw”:“100000”,

       “dir”:“audio/bw150000”,

       “encryptor”: {

         “drm”:“widevine_test”

       },

       “sources”: [

         {

           “source”:“dmx1:aud0”

         }

       ]

     }

   ],

   “sources”: [

     {

       “id”:“ts_multicast_1”,

       “url”:“udp://239.1.1.1:5001”

     }

   ]

 }

}

After the call below

Python

rpcResultFiltered = recorder.GetChannels(id_filter =‘CH_DASH.*’)

the following response is returned to rpcResultFiltered:

JSON

{

 “CH_DASHMP4”: {

   “container_type”:“mp4”,

   “data_storages”: [

     “fs”

   ],

   “demuxers”: [

     {

       “id”:“dmx1”,

       “source”:“ts_multicast_1”,

       “tracks”: [

         “vid0”,

         “aud0”

       ]

     }

   ],

   “id”:“CH_DASHMP4”,

   “index_storage”:“mongo_local”,

   “muxers”: [

     {

       “bw”:“6500000”,

       “dir”:“video/bw5000000”,

       “encryptor”: {

         “drm”:“widevine_test”

       },

       “sources”: [

         {

           “master”:“true”,

           “source”:“dmx1:vid0”

         }

       ]

     },

     {

       “bw”:“100000”,

       “dir”:“audio/bw150000”,

       “encryptor”: {

         “drm”:“widevine_test”

       },

       “sources”: [

         {

           “source”:“dmx1:aud0”

         }

       ]

     }

   ],

   “sources”: [

     {

       “id”:“ts_multicast_1”,

       “url”:“udp://239.1.1.1:5001”

     }

   ]

 }

}

AddLogo(channel_id, params)

The method adds the dynamic Timed Logo in the scheduler and returns the ID of the object added. The fields url, x, and y have the same purpose as for a static logo. The utcstart and utcend fields set the logo overlaying period in UTC (the number of seconds from 01.01.1970).

The binary image data is downloaded from the specified URL and stored in DB along with the metadata. If the image cannot be downloaded, the method returns an error. If the logo overlaying period has expired, i.e. the utcend is in the past, an error is also returned.

channel_id, string 

Chanel ID.

params, string 

JSON object with a logo description.

Call Example (python)

JSON

{

 “channel_id”:“CH_TEST”,

 “url”:“http://example.com:8080/logo/eurosport.png”,

 “utcstart”:“1606485419”,

 “utcend”:“1606485420”,

 “x”:“100”,

 “y”:“100”

}

After the call below

Python

rpcResult = recorder.AddLogo(‘CH_TEST’, json.dumps(logoJson))

the following response is returned to rpcResult:

JSON

{

 “id”:“507f1f77bcf86cd799439011”

}

RemoveLogo(channel_id, logo_id)

The method removes the dynamic Timed Logo from the scheduler and DB. If the logo is currently active and is overlaid on the video by the transcoder, it disappears without waiting for the utcend moment. If the logo is not found, the method returns an error.

channel_id, string 

Chanel ID.

logo_id, string 

Logo ID.

Call Example (python)

After the call below

Python

rpcResult = recorder.RemoveLogo(‘CH_TEST’, ‘507f1f77bcf86cd799439011’)

an empty response is returned to rpcResult, confirming the successful removing of the object.

GetLogoList(channel_id)

The method returns logos for the specified channel in the form of a JSON object containing “key–value” pairs, where the logo_id is a key, and the JSON object (logo description) is a value.

channel_id, string 

Chanel ID.

Call Example (python)

After the call below

Python

rpcResult = recorder.GetLogoList(‘CH_TEST’)

the following response is returned to rpcResult:

JSON

{

 “507f1f77bcf86cd799439011”: {

   “id”:“507f1f77bcf86cd799439011”,

   “channel_id”:“CH_TEST”,

   “url”:“http://example.com:8080/logo/eurosport.png”,

   “utcstart”:“1606485419”,

   “utcend”:“1606485420”,

   “x”:“100”,

   “y”:“100”,

   “override_previous”:“true”

 },

 “507f1f77bcf86cd799439012”: {

   “id”:“507f1f77bcf86cd799439012”,

   “channel_id”:“CH_TEST”,

   “url”:“http://example.com:8080/logo/1ch_logo.png”,

   “utcstart”:“1606485430”,

   “utcend”:“1606485440”,

   “x”:“200”,

   “y”:“200”,

   “override_previous”:“true”

 }

}

Python

{

   “id” : “nvenc1”,

   “host” : “10.65.2.198”,

   “port” : “7789”,

   “box_parser_buffer_size” : “5M”,

   “queue_overflow_threshold” : “2M”,

   “name” : “Nvidia_T400”,

   “rpc_port” : “7889”

}

Playlist Generator

Command Line Arguments

–help, -h

Print the help to the console and exit.

–version, -v

Print the version to the console and exit.

–config-file, -c

Default value: /etc/fhls.json

The path to the configuration file.

–log-config, -l

Default value: fhls.log.json

The path to the logging configuration file.

–log-file

Default value: fhls.log

The logger output file. This option is ignored if –log-config is specified.

Configuration File

The default configuration file location: /opt/smartlabs/smartmedia/plgen/config/config.json

core, section

The basic process settings

threads, integer 

Default value: 5

The number of operating system threads to process incoming requests.

interface, string 

Default value: 0.0.0.0

The interface to listen for incoming FastCGI connections.

port, integer 

Default value: 9000

The port for incoming FastCGI connections.

user, string 

The name of the user the rights of which will be delegated to the smplgen process.

If no parameter value is specified (an empty string), the process is delegated the rights of the user group that started it.

group, string 

The name of the group the rights of which will be delegated to the smplgen process.

If no parameter value is specified (an empty string), the process is delegated the rights of the user group that started it.

rpc_port, integer 

Default value: 0

The port for JsonRPC clients to connect. If the value is “0”, JsonRPC is disabled.

rpc_event_queue_size, integer 

Default value: 1000

The size of the RPC message queue to send. If the queue size is too small and the polling period is too long, some messages may be lost.

behavior_stat, boolean 

Default value: false

Collection and processing of user request statistics. Setfalse to disable statistics collection and true to enable.

behavior_stat_limit_sec, integer 

Default value: 0

Limit the storage time of records on the user request statistics (in seconds, 0 — unlimited).

behavior_stat_limit_size, integer 

Default value: 100

Limit the number of records for one user receiving request statistics (0 — do not save statistics, the service launch without restrictions is not provided).

mongo, section 

MongoDB access settings for playlist generation.

uri, string 

MongoDB connection URI.

db, string 

Database name.

channels_table

Name of the table that stores information about recorded and deleted channels.

channels_db

Name of the database that stores information about recorded and deleted channels.

events_table

The name of the table containing events to be added to the playlist.

content, section 

Playlist generation settings which are common for all playlist types.

range_request_max_sec, integer 

Default value: 36000

The maximum time (in seconds) the client can request for Range/Live.

range_availability_fraction, float 

Type: float
Default value: 0.7

The content proportion required for a positive response to the HTTP Redirector request about content availability.

max_live_gap, integer 

Default value: 60

The time (in seconds) since the last record available for content after which the Live stream is considered to be lost.

havecontent_add_cost, boolean 

Default value: false

Whether to add the content cost value in response to the havecontent request on this server.

havecontent_cost, integer 

Default value: 0

The cost of content on this server.

enable_thumbnails_in_playlists

Default value: false

Whether to add thumbnail descriptions to the playlist. Thumbnais can be used by players for preview purposes during positioning.

hls, section

Playlist generation settings for HLS content.

uri_path, string 

The URI base path for HLS content requests processing. If not specified, requests are not processed.

live_max_chunks, integer 

Default value: 10

The maximum number of chunks in the Live playlist.

live_max_iframes_chunks, integer 

Default value: hls → chunk_duration × hls → live_max_chunks × 2

The maximum number of chunks in the Live playlist containing rewind data.

live_playlist_rebound_sec, integer 

Default value: 10

The time lag (in seconds) of the first chunk when generating the Live playlist.

empty_playlist_404, boolean 

Default value: true

Whether to return HTTP error 404 instead of empty playlists.

enable_discontinuity_at_start, boolean 

Default value: false

Prevents adding an EXT-X-DISCONTINUITY tag to the playlist before the first chunk when generating a playlist.

playlist_content_type_mpegurl, boolean 

Default value: false

Whether to return the appropriate Content-Type for playlists.

key_url, string 

Set of values name (DRM name) + url (mask). Allows to generate encryption key URL depending on the requested DRM server.

key_url_drm_name_param, string 

Default value: drm_name

The name of the HTTP GET request parameter, in which the name of the requested DRM server is sent.

playlist_version_header_name, string 

The name of the HTTP header, in which the required HLS protocol version will be sent.

playlist_version_get_param, string 

The name of the HTTP GET request parameter, in which the required HLS protocol version will be sent.

closefull_delay_sec, integer 

Default value: 40

The utcend value lagging behind the current time (in seconds) at which the requested closefull playlist will be forcibly closed with the appropriate tag. If the value is 0, the closefull playlist will be opened until the data after the requested range appears.

playlist_variant_desc_sort, boolean 

Default value: false

Whether to sort bitrates in variant playlist in descending order.

min_video_duration_sec, float 

Type: float
Default value: 0.0

If specified, an HTTP error 404 will be returned instead of a playlist containing one chunk and less than the specified time.

disable_tag_ext_x_map, boolean 

Default value: false

The option to prevent adding #EXT-X-MAP tag to playlists.

add_url_params, array of sections 

Default value: []

List of sections like

{“name”: “a”, “value”: “b”}

with additional URL parameters that will be added to all URIs in playlists.

ts_uri_prefix_header_name, string 

Default value: HTTP_X_SMARTLABS_HLS_URI_PREFIX

The name of the FastGCI parameter, in which the prefix for all file URIs in playlists is sent.

playlist_uri_prefix_header_name, string 

Default value: HTTP_X_SMARTLABS_HLS_URI_PREFIX

The name of the FastGCI parameter, in which the prefix for URI playlists in the variant playlist is sent.

recrypt_uri_prefix_header_name, string 

Default value: HTTP_X_SMARTLABS_RECRYPT_URI_PREFI

Name of the FastCGI parameter to pass the prefix added to the URI of encrypted chunks in media playlists. It is necessary for the client to request encrypted chunks from the SmartMEDIA Recryptor (smrecrypt) service. The prefix is added only if the chunks are encrypted with the `cenc` scheme for the Widevine DRM, and the client requests a playlist for the Apple FairPlay DRM (re-encryption to the `cbcs` scheme is required) by passing the drm=fairplay parameter in the request.

uri_prefix_without_path, boolean 

Default value: false

If the value is true, do not add a relative path to the files’ and playlists’ URI, because it is assumed that the passed parameter already contains the necessary data.

enable_session, boolean 

Default value: false

Enables session processing — the request unique identifier to be added to the URI between uri_path and content path.

variant_check_content, boolean 

Default value: false

Enables full content check (as with the have_content request from the HTTP Redirector). Can cause a serious slowdown of the server.

enable_version_7, boolean 

Default value: true

Enables HLS version 7 support.

enable_vod_offset, boolean 

Default value: false

Allows to specify the offset parameter in the URL for VOD content — the offset from the beginning of the TV program in seconds.

disable_discontinuity_sequence, boolean 

Default value: false

Flag to prohibit the use of the tag #EXT-X-DISCONTINUITY-SEQUENCE when playlist generation.

enable_discontinuity_on_key_rotation, boolean 

Default value: true

Flag to add the tag #EXT-X-DISCONTINUITY at the time of changing the encryption keys.

enable_events, boolean 

Default value: true

Flag to add information about events into the HLS playlists.

mongo, section

MongoDB settings for HLS playlist generation.

header_table, string 

The collection name where the stream information is stored (works only if MongoDB access is configured in the “core” section).

index_table, string 

The collection name where the chunks information is stored (works only if MongoDB access is configured in the “core” section).

dash, section

Playlist generation settings for MPEG-DASH content.

uri_path, string 

The URI base path for DASH content requests processing. If not specified, requests are not processed.

playlist_validation, boolean 

Default value: false

Whether to test the playlist structure after generation.

min_buffer_time_sec, integer 

Default value: 15

The MPD@minBufferTime attribute in the generated playlists, in seconds.

time_shift_buffer_depth, time units 

Default value: 30m

The MPD@timeShiftBufferDepth parameter for Live playlist.

max_live_periods, integer 

Default value: 2

The maximum number of periods displayed in the Live playlist.

min_period_gap_sec, float 

Type: float
Default value: 0.5

If the time (in seconds) between the beginning of the periods for different bitrates (as well as the duration of one period in a particular bitrate) is less than the specified one, such periods will be ignored. The value should not exceed the minimum duration of the chunk in each of the bitrates.

add_http_header_access_control, boolean 

Default value: true

Whether to add the Access-Control-Allow-Origin: * parameter to the HTTP header when generating DASH playlists and chunks. Does not work when chunks are returned by the nginx module.

add_presentation_time_offset_utc, boolean 

Default value: true

Whether to add to the segments time in the Live DASH playlist a value allowing to bind them to UTC.

ss_dvr_window_duration_sec, integer 

Default value: 600

The duration of the generated Live Smooth Streaming playlist, in seconds.

ss_live_look_ahead, integer 

Default value: 2

The SmoothStreamingMedia@LookAheadFragmentCount attribute value in Live Smooth Streaming playlists.

ss_live_url, string 

Default value: ${dir}/{start time}.mp4

The template for the SmoothStreamingMedia@StreamIndex@Url attribute in Live Smooth Streaming playlists. The substrings in the SmoothStreamingMedia@StreamIndex@Url attribute are replaced as follows:

  • ${dir} — relative directory of the recorded track,
  • ${timescale} — multiplier to convert time in seconds to relative time units used in playlists (the SmoothStreamingMedia@TimeScale attribute),
  • ${bitrate} — track bitrate.
ss_range_url, string 

Default value: ${dir}/{start time}.mp4

The template for the SmoothStreamingMedia@StreamIndex@Url attribute in Range Smooth Streaming playlists. The substrings ${dir}, ${timescale}, ${bitrate} in the SmoothStreamingMedia@StreamIndex@Url field are replaced similarly to the dash → ss_live_url parameter.

If the ${offset} substring is present, the time of each chunk in the playlist becomes less than the original by such a value to make the minimum time equal to 0. The ${offset} substring is replaced by this value (in timescale units).

For example, if the original times of the chunks were 1000 2000 3000 4500 6000 7000, the offset will be 1000, and the following times will be recorded in the playlist: 0 1000 2000 3500 5000 6000.

ss_enable_subtitles

Default value: false

Whether to include subtitle tracks to the SmoothStreaming playlists. Some devices, especially SmartTVs don’t support SmoothStreaming playlists with subtitles, so it’s disabled by default.

location, string 

The base URL from which the content of the “Location” element in the playlist is generated (by adding the channel name, etc.)

live_playlist_rebound_sec, integer 

Default value: 60

If the URL parameter utcstart (see “Additional URL Parameters”) is not specified when requesting the Live playlist, it is calculated as follows:

utcstart = <current_utc_time> – dash → live_playlist_rebound_sec.

live_window_duration_sec, integer 

Default value: 120

The maximum total duration of chunks in the Live playlist, in seconds. If this value is exceeded, the chunks from the beginning of the playlist are removed.

live_add_period_duration, boolean 

Default value: true

Whether to add Period@duration for all periods of the Live playlist except the last one.

location_header_name, string 

Default value: “HTTP_X_SMARTLABS_DASH_LOCATION”

Allows you to set the value of the MPD@Location tag in the HTTP header with the corresponding name.

base_url_header_name, string 

Default value: “HTTP_X_SMARTLABS_DASH_BASE_URL”

Allows you to set the value of the MPD@BaseURL tag in the HTTP header with the corresponding name.

ss_enable_adaptive_video, boolean 

Default value: false

Enables multibitrate SmoothStreaming playlists generation (compatible with smcvr version 6.1.0 or newer).

utc_timing_path

The base URI path to handle time requests associated with the playlist. If not specified, requests are not processed.

utc_timing_url

The value of the value property of the MPD@UTCTiming tag in the urn:mpeg:dash:utc:http-iso:2014 format. The tag will not be added to the resulting MPD if the property is not set.

suggested_presentation_delay_chunks, integer 

Default value: 0

Number (N) of segments for MPD@suggestedPresentationDelay value calculation.

If the value is set, MPD@suggestedPresentationDelay is calculated as a sum of durations of the last N segments. Hence, player receives recommendation to start playback at the certain position, with some offset from Live (but however it can ignore such recommendation).

If the value is zero or not set, the MPD@suggestedPresentationDelay attribute is not added to the playlist and start position is to be chosen only by the player.

availability_time_offset, float 

Type: float

If set, the attribute `@availabilityTimeOffset` with the corresponding value is added into the `SegmentTemplate` tag of Live playlists.

ll_suggested_presentation_delay_msec, integer 

Default value: 3000

The value of the `MPD@suggestedPresentationDelay` attribute in the low-latency playlists.

enable_events, boolean 

Default value: true

Flag to add information about events into the DASH playlists.

always_add_utc_timing

Default value: false

Whether the MPD@UTCTiming tag will be added to the playlist.

If false the MPD@UTCTiming tag will be added to the playlist only when the offset URL parameter is present.

Otherwise, the offset parameter won’t be taken into account.

utc_timing_type

Default value: direct

Defines the format of the MPD@UTCTiming tag:

  • the direct value correspond to the urn:mpeg:dash:utc:direct:2014 format, date and time values are added directly to the MPD in the tag’s value;
  • the http value corresponds to the urn:mpeg:dash:utc:http-iso:2014 format, date and time should be retrieved with another HTTP request;
  • empty value disables the MPD@UTCTiming insertion.
mongo, section

MongoDB settings for MPEG-DASH playlist generation.

header_table, string 

The name of the collection with the stream information (works only if MongoDB access is configured in the “core” section).

index_table, string 

The name of the table with the chunks information (works only if MongoDB access is configured in the “core” section).

base_url, string 

Specifies the content of the BaseURL element in the playlist.

zero_availability, boolean 

Default value: false

Whether to set the MPD@availabilityStartTime value to “1970-01-01T00:00:00.000000Z” when generating live playlists (the default MPD@availabilityStartTime value is dependent on the URL parameter utcstart, see “Additional URL Parameters”).

fill_periods_gap, string 

Default value: empty string

The way to fill the gap between periods in DASH playlist, if the MongoDB database is used as an index storage.

Possible values are:

  • none (or empty string) — do not fill;
  • period — add empty period;
  • chunks — add empty chunks.

Metadata response (metadata.json) generation settings.

metadata, section

Settings for the metadata response.

events_limit, integer 

Default value: 1000

Maximum number of events in the metadata response.

default_features

Array of metadata types to be added to the response by default when the URL argument features is absent.

Possible values are: all, events, thumbnails, urlvariants. Empty (default) value corresponds to all and means that all types will be included:

  • events – list of events in the stream, such as advertisements, gaps in the stream and so on;
  • thumbnails – thumbnail images, which can be used by players for preview purposes during positioning;
  • urlvariants – available variants of the stream. For instance, the stream can be available as DASH and HLS simultaneously, so both options with their corresponding URLs will be listed.
profiles, array of objects

Settings for possible limits for tracks to be embedded into the playlist.

The player can set the limit by passing the HTTP GET parameter profile with one of the unique profile IDs contained in this array.

id, string 

Unique profile ID.

parent, string 

Unique ID of the parent profile. If a track passes the limits of the current profile, it is checked against the limits set by the parent one. The current profile settings override the parent profile settings. The value can be empty.

min_bitrate, integer 

Default value: 0

The minimum possible value of the track bitrate. 0 — no limits.

max_bitrate, integer 

Default value: 0

The maximum possible value of the track bitrate. 0 — no limits.

codecs, Array of strings 

Regular expressions, to one of which must match the track codec. If the array is empty, then there are no limits for the codec.

zero_availability, boolean 

Default value: not specified

Allows to override the zero_availability value for the specified profile.

min_width, integer 

Default value: 0

Only for video. The minimum possible frame width. 0 — no limits.

max_width, integer 

Default value: 0

Only for video. The maximum possible frame width. 0 — no limits.

min_height, integer 

Default value: 0

Only for video. The minimum possible frame height. 0 — no limits.

max_height, integer 

Default value: 0

Only for video. The maximum possible frame height. 0 — no limits.

min_sample_rate, integer 

Default value: 0

Only for audio. The minimum possible sample rate. 0 — no limits.

max_sample_rate, integer 

Default value: 0

Only for audio. The minimum possible sample rate. 0 — no limits.

Example Configuration

JSON

{

 “core”: {

   “interface”:“0.0.0.0”,

   “port”:9001,

   “threads”:7,

   “rpc_port”:49966,

   “rpc_event_queue_size”:10000

 },

 “content”: {

   “range_request_max_sec”:72000

 }

 “hls”: {

 “uri_path”:“/hls”,

 “playlist_content_type_mpegurl”:false,

 “live_playlist_rebound_sec”:40,

 “key_url”: [

 {

 “url”:“http://ya.ru/key?t=${TYPE}&r=${RESOURCE-ID}&p=${POSITION}”

},

{

 “name”:“drm1”,

 “url”:“http://ya1.ru/key?t=${TYPE}&r=${RESOURCE-ID}&p=${POSITION}”

},

{

 “name”:“drm2”,

 “url”:“http://ya2.ru/key?t=${TYPE}&r=${RESOURCE-ID}&p=${POSITION}”

}

],

“key_url_drm_name_param”:“ddrrmm”,

“stream_info_before_chunk”:true,

“playlist_version_get_param”:“hls_ver”,

“add_url_params”: [

 {

   “name”:“abc”,

   “value”:“123”

 },

 {

   “name”:“name”,

   “value”:“value”

 },

 {

   “name”:“color”,

   “value”:“red”

 },

 {

   “name”:“anddd”,

   “value”:“&&&”

 }

]

},

“dash”: {

 “uri_path”:“/dash”

}

}

HLS / DASH / Smooth Streaming Playlist URL Request Structure

The URL looks schematically as follows:

http[s]://<server_name>[:<port>]/<path>/<content>/<playlist_type>[?<params>]

where:

server_name

The IP address or domain name of the smplgen server.

port

The TCP port of the server.

path

The path specified by the HTTP server settings, which determines the local location of the main directory with the content.

content

The name of the VOD TS file or directory with VOD or Live content.

playlist_type

The playlist type. Possible values are:

  • variant.m3u8 — HLS variant playlist for the MPEG2-TS container including links to the possible bitrates and, optionally, rewind data for them;
  • playlist.m3u8 — HLS media playlist containing information about media segments;
  • iframes.m3u8 — HLS playlist containing information about IFrames (required for rewind);
  • subtitles.m3u8 — HLS playlist (only for VOD) with reference to the WebVTT subtitle file;
  • audio.m3u8 — HLS playlist (only for VOD) with reference to the AAC+ADTS audio track;
  • playlist.mpd — DASH playlist;
  • Manifest — Smooth Streaming playlist.
params

Additional parameters depending on the playlist type. See “Additional URL Parameters”.

Additional URL Arguments

offset, integer 

Default value: 0

In the case of VOD content, determines from which position (in seconds) to start the generation of the playlist — is set to a positive value. In case of Live content, allows to play the channel with a lag of a predetermined value (in seconds) — is set to a negative value.

havecontent

Required for HTTP Redirector service requests. Instead of the playlist, a fractional number is returned — the proportion of content on this server, or an HTTP error 404, if no content is found.

user_agent, string 

Type of player device.

quality, integer 

In the case of multibitrate content, indicates the stream with which bandwidth will be the first in the variant playlist. Required for some devices that do not pre-select the bitrate, and always playing the first one in the list.

profile, string 

Default value: hls

The profile name, allows to limit the list of bitrates in the variant playlist. The value is written in the following format: “<channel_regex>”: { “bitrates” : {<bitrate_list>}, “devices”: {<devices_list>}}

utcstart, integer (unix timestamp) 

Required to request Media and IFrames playlists of the Live stream; defines the time (UTC unix time) at which the player starts viewing content (in fact, it is a session ID, but can be the same for several clients). Must be set based on the lag of the stream from the real time. When requesting a variant playlist for Live content, it can be omitted, but it will automatically be added to Media and IFrames playlist links using the following formula:

<current_time> – hls.live_playlist_rebound_sec

utcend, integer (unix timestamp) 

Used in conjunction with the utcstart parameter; allows to get a playlist for recorded PVR-content, limited by time from utcstart to utcend.

closefull

Used in conjunction with the utcstart and utcend parameters to request content when utcend is greater than the current time.

Without this parameter, the server will return a 404 error in most cases because the content is not yet available.

With this parameter, the playlist will not be closed (for HLS — #EXT-X-ENDLIST tag; for DASH — type of the static playlist), if data is still expected in the requested interval.

content_type, string 

It can be text or mpegurl, sets the appropriate content type in the response HTTP header. Used for debugging.

forceutctiming

Redefines always_add_utc_timing configuration value and forces adding of MPD@UTCTiming tag into DASH Live manifests regardless of the other URL arguments.

Conflicts with noutctiming argument. Makes sense only for DASH playlists.

noutctiming

Redefines always_add_utc_timing configuration value and forces elimination of MPD@UTCTiming tag in DASH Live manifests.

Conflicts with forceutctiming argument. Makes sense only for DASH playlists.

features, array of strings, comma separated 

Contains the list of metadata types which should be included into the response. Makes sense only for metadata requests/responses (metadata.json). Possible values are: all, events, thumbnails, urlvariants.

Can be used for the response size optimization in cases when client needs only metadata of specific type. If the request argument is absent types defined in default_features are used.

Request Types Depending on the Content

VOD

The request of static content (HLS only).

Live

The request of dynamic content that is in the process of recording close to real time.

Range/PVR

The request of previously recorded dynamic content with a certain time interval (specified by the utcstart and utcend parameters).

URL Examples

  • http://myserver.com:8080/hls/video.ts/variant.m3u8 — the request of VOD variant playlist;
  • http://myserver.com/hls/video.ts/playlist.m3u8?offset=300 — the request of VOD media playlist, in which the first 5 minutes will be skipped;
  • https://myserver.com/hls/CHANNEL_1/variant.m3u8 — the request of Live variant playlist;
  • http://myserver.com/hls/CHANNEL_1/playlist.m3u8 — the request of Live media playlist;
  • http://127.0.0.1/hls/CHANNEL_1/playlist.m3u8?utcstart=1461676000&utcend=1461676600 — the request of media playlist for PVR program with a duration of 10 minutes;
  • http://10.65.50.38/dash/cets_2_mp4_test/playlist.mpd?utcstart=1461757800&utcend=1461757900 — the request of DASH playlist for PVR program;
  • http://10.65.50.38/dash/CH_RUSSIA24.ism/Manifest — the request of Live Smooth Streaming playlist.

SmartTranscoder

Command Line Arguments

–help, -h

Print the help to the console and exit.

–version, -v

Print the version to the console and exit.

–config-file, -c

The path to the main configuration file.

–console-log

Tells service to ignore the –log-config and –log-file parameters and print the log to the console with the default formatting.

–log-config, -l

Default value:  smtrc.log.json

The path to the logging configuration file.

–log-file

Default value:  smtrc_%Y-%m-%d_%H-%M-%S.%N.log

Log file name pattern. This option is ignored if –log-config is specified.

The following variables can be used in the file name:

  • Y — year,
  • m — month,
  • d — day,
  • H — hour,
  • M — minute,
  • S — second,
  • N — the file number among files with the same name.

If no variables are defined, the file will be rotated only on service restart.

Configuration File

The default location of the configuration file is: /opt/smartlabs/smartmedia/transcoder/config/config.json

Basic Parameters

threads, integer 

Default value: 4

Number of working threads.

interface, string 

Default value: 0.0.0.0

The interface to listen on for incoming connections.

port, integer 

The port for incoming FastCGI connections.

use_qsv, boolean 

Default value: false

The flag that allows you to enable the use of Intel QuickSync Video hardware acceleration for video transcoding. To use QSV, you need to make sure that the CPU and GPU of the server support this technology and that the Intel MediaSDK library is correctly installed in the system. More information can be found in the Intel MediaSDK documentation.

box_parser_buffer_size, data size

Default value: 5M

The size of the buffer used for parsing of MP4-boxes, which are transferred between the network transcoder and SmartMEDIA Conveyor service.

Each mediasample should fit in the buffer, thus this value must be more than the maximum I-frame size within the video stream. In case of a high-bitrate stream, such as UHD/4K streams, this value might need to be increased.

idle_interval_sec, integer 

Default value: 300

The period of client inactivity (in seconds), after which the TCP connection and the transcoding session are closed to save resources.

Configuration example

JSON

{

   “interface” : “192.168.1.56”,

   “port” : 7783,

   “threads” : 4,

   “use_qsv” : true,

   “box_parser_buffer_size” : “10M”

}

SmartNvidiaTranscoder

Command Line Arguments

–help, -h

Print the help to the console and exit.

–version, -v

Print the version to the console and exit.

–config-file, -c

The path to the main configuration file.

–console-log

Tells service to ignore the –log-config and –log-file parameters and print the log to the console with the default formatting.

–log-config, -l

Default Value: smnvtrc.log.json

The path to the logging configuration file.

–log-file

Default Value: smnvtrc_%i_%Y-%m-%d_%H-%M-%S.%N.log

Log file name pattern. This option is ignored if –log-config is specified.

The following variables can be used in the file name:

  • i — server instance ID,
  • Y — year,
  • m — month,
  • d — day,
  • H — hour,
  • M — minute,
  • S — second,
  • N — the file number among files with the same name.

If no variables are defined, the file will be rotated only on service restart.

–instance-id, -i

Server instance ID.

Configuration File

The default location of the configuration file is: /opt/smartlabs/smartmedia/nvidia-transcoder/config/config.json

Basic Parameters

instances, [array{object}]

List of configurations for server instances.

id, string

Server instance ID.

interface, string

The interface to listen on for incoming connections.

port, integer

The port for incoming FastCGI connections.

threads, integer

Default Value: 4

Number of working threads.

card, integer

Video card number. A list of all video cards in the system can be obtained using the command nvidia-smi -L

box_parser_buffer_size, data size

Default Value: 10M

The size of the buffer used for parsing of MP4-boxes, which are transferred between the network transcoder and SmartMEDIA Conveyor service.

Each media sample should fit in the buffer, thus this value must be more than the maximum I-frame size within the video stream. In case of a high-bitrate stream, such as UHD/4K streams, this value might need to be increased.

idle_interval_sec, integer

Default Value: 300

The period of client inactivity (in seconds), after which the TCP connection and the transcoding session are closed to save resources.

rpc_port, integer

Default Value: 0

The RPC server port. If the value is zero, the RPC server is disabled.

rpc_event_queue_size, integer

Default Value: 0

The size of the statistics message queue.

pts_order_err_interval_frames , integer

Default Value: 0

Interval (in frames) during which frames with incorrect PTS order are counted. A value of 0 disables this feature.

pts_order_err_threshold_frames , integer

Default Value: 0

Number of frames with incorrect PTS order. When this number is reached within the interval ‘pts_order_err_interval_frames’ the pipeline will be recreated. Sometimes the video starts playing with a ‘slow motion’ effect. This is caused by the incorrect order of PTS at the output of the decoder. To fix this problem you need to recreate the pipeline. A value of 0 disables this feature.

Configuration Example

JSON

{

 “instances” : [

   {

     “id” : “inst01”,

     “interface” : “192.168.1.56”,

     “port” : 7784,

     “threads” : 4,

     “card” : 0,

     “box_parser_buffer_size” : “10M”,

     “rpc_port” : 49988,

     “rpc_event_queue_size” : 5000,

     “pts_order_err_interval_frames”: 1800,

     “pts_order_err_threshold_frames”: 20

   }

   ]

}

Supported RPC Methods

See also the “RPC Methods Common to all Services” chapter.

GetGpuMetrics()

The method returns the metrics of the GPU bound to the current server instance.

Call Example (python)

After the call below

Python

rpcResult = trc.GetGpuMetrics()

the following response will be returned to rpcResult:

GetSessions()

The method returns session list.

Call Example (python)

After the call below

Python

rpcResult = trc.GetSessions()

the following response will be returned to rpcResult:

JSON

[

 {

   “ip”: “10.65.6.190”,

   “port”: “37616”,

   “channelId”: “CH_1”,

   “mediaType”: “video”,

   “config”: {

     “id”: “vtrc0”,

     “decode_encrypted”: “false”,

     “deinterlacing”: “auto”,

     “a53cc”: “false”,

     “complete_frame_in_nalu”: “true”,

     “double_rate_deinterlacing”: “false”,

     “async_depth”: “4”,

     “crop”: {

       “h”: “65535”,

       “w”: “65535”,

       “x”: “65535”,

       “y”: “65535”     

     },

     “out”: [

       {

         “frame_rate_numerator”: “30”,

         “frame_rate_denominator”: “1”,

         “gop_size”: “50”,

         “bitrate”: “9216000”,

         “maxrate”: “0”,

         “bufsize”: “0”,

         “rc_init_occupancy”: “0”,

         “quality”: “0”,

         “width”: “720”,

         “height”: “576”,

         “codec”: “h264”,

         “pix_fmt”: “nv12”,

         “preset”: “best_speed”,

         “use_mfe”: “false”,

         “bframes_num”: “0”         

       }

     ]

   }

 },

 {

   “ip”: “10.65.6.190”,

   “port”: “37618”,

   “channelId”: “CH_1”,

   “mediaType”: “audio”,

   “config”: {

     “id”: “atrc0”,

     “decode_encrypted”: “true”,

     “out”: [

       {

         “bitrate”: “196608”,

         “channels_count”: “2”,

         “sample_rate”: “48000”         

       }

     ]

   }

 }

]

SmartMEDIA Recryptor

The SmartMEDIA Recryptor (smrecrypt) service is designed to re-encrypt MP4 chunks prepared for adaptive streaming (HLS or DASH) from one encryption scheme to another “on the fly”, i.e. without saving the re-encrypted copy to the repository. This saves disk space by storing only one copy of encrypted content (for example, for Widevine DRM). At the same time, players using a different content protection system (for example, Apple FairPlay DRM) can also decrypt and play this content. Currently, reencryption from the cenc scheme (AES-CTR) to the cbcs scheme (AES-CBC with template encryption) is supported according to the standard ISO/IEC 23001-7 “Common encryption in ISO BMFF files”.

SmartMEDIA Recryptor operates as an HTTP proxy server, processing client requests for MP4 chunks. It requests chunks over HTTP from the origin server (for example, from S3 storage) or from the local file system, parses MP4, receives encryption keys from the SmartLabs UDRM server, decrypts media samples, re-encrypts with another encryption scheme, generates an output MP4 file and passes it to the client over HTTP. The re-encryption is performed at each request for each client. The service does not have internal caching of chunks, so it may be advisable to cache content using a caching proxy server, for example, NGINX. Also cryptographic algorithms used in decrypting and encrypting data can create an increased load on the CPU. So it is recommended to use processors with hardware encryption support, for example, Intel AES New Instructions (AES-NI).

The service receives encryption keys from the SmartLabs UDRM server using the Custom Extension UDRM Decryption API. Since the standard API of the cloud Widevine DRM does not support content decryption on the server side (but only encryption), the SmartMEDIA Recryptor service can only be used with the SmartLabs UDRM key server and cannot receive keys directly from the cloud Widevine DRM (unlike the SmartMEDIA Conveyor service). The received encryption keys are cached to reduce the number of requests and the load on the key server.

To re-encrypt MP4 chunks “on-the-fly”, they must be recorded appropriately by the SmartMEDIA Conveyor service. In particular, Key ID and PSSH must be written to each MP4 chunk to request keys. When re-encrypting, the structure of Subsamples (BytesOfClearData/BytesOfProtectedData) remains unchanged, so the original chunks must be encrypted with this in mind. This may require certain recording setup in the SmartMEDIA Conveyor service (for details, see the service documentation). Also, MP4 chunks recorded by a third-party media server, in some cases, cannot be re-encrypted “on-the-fly” using the SmartMEDIA Recryptor service.

Command Line Parameters

–help, -h

Display help in the console and exit.

–version, -V

Display version in the console and exit.

–config, -c

Default value: config.json

The configuration file path.

–log-config, -l

Default value: config.log.json

The path to the logger configuration file.

Configuration File

Basic Parameters

interface, string 

IP address of the HTTP server to process incoming client requests for MP4 chunks.

port, integer 

Port of the HTTP server to process incoming client requests for MP4 chunks.

cbcs_crypt_byte_block, integer 

The number of encrypted blocks in the pattern for the cbcs encryption scheme. The sum of encrypted and open blocks in the pattern should be equal to 10. So it is enough to specify only the number of encrypted blocks and the pattern will be formed as [N:10-N]. The recommended pattern is [1:9]. For example, Apple FairPlay encryption uses this pattern.

file_source, section 

Contains either the ”http” element with the settings for accessing the HTTP server with files (for example, S3 storage), or the ”fs” element with the settings of the local file system storage. The storage settings should contain the basic part of the URI. To form the full URI of the file, the relative path received in the request from the client is added to it.

Settings of Local File System Storage

path, string 

The path to the root directory for receiving MP4 files.

Settings of HTTP Storage

base_uri

Type: строка

Base part of the HTTP storage URI.

timeout_sec, integer 

Timeout of an HTTP request to the file storage, in seconds.

key_source, section 

The section containing the settings for obtaining keys for encryption according to the Common Encryption (ISO/IEC 23001-7) standard.

signer_iv, HEX string 

The initialization vector (IV) for encrypting the message to the key server; the IV size must be 16 bytes.

signer_key, HEX string 

The key for encrypting the message to the server; the key size must be 32 bytes.

signer_name, string 

Signer ID to request the key server.

url, string 

URL for requesting keys via the UDRM Decryption API.

cache_size, integer 

The maximum number of keys that can be cached.

Example Configuration

JSON

{

 “interface”:“0.0.0.0”,

 “port”:4000,

 “cbcs_crypt_byte_block”:1,

 “file_source”: {

   “http”: {

     “base_uri”:“http://localhost:8080/hls/”,

     “timeout_sec”:30

   }

 },

 “key_source”: {

   “url”:“http://10.65.50.66:8082/dapi/getkey”,

   “signer_name”:“smldec”,

   “signer_key”:“6e63cbfcc15b3d3ab2e64434b9729aabbd5c18b721e131d2ad1807e7eab4e633”,

   “signer_iv”:“78a8a6671f3007da70e532f3d873ec3e”,

   “cache_size”:50

 }

}

RPC Methods Common to all Services

RPC (Remote Procedure Call) — a data exchange protocol allowing the client to call pre-known methods on the server to get a certain data/result. The SmartMEDIA services use the JSON-RPC over TCP. All the services support a set of common methods (see below) and a set of service-specific methods (Conveyor, SmartPVR, and RTSPServer).

The SmartMEDIA solution includes an RPC client (the rpcClient utility) described here.

GetVersion()

The method returns the service version.

Response Example

JSON

{

 “result”:“4.1.0”

}

GetMethods()

The method returns the list of names of methods available to call.

Response Example

JSON

{

 “result”: [

   “GetEvents”,

   “GetMethodDescription”,

   “GetMethods”,

   “GetServiceName”,

   “GetUptime”,

   “GetVersion”,

   “StartRecord”,

   “StopRecord”

 ]

}

GetMethodDescription(method_name)

The method returns a short method description.

method_name, string 

Name of the method.

Response Example

JSON

{

 “result”:“Return uptime”

}

GetUptime()

The method returns the uptime of the current RPC server, in seconds.

Response Example

JSON

{

 “result”:174.1041376590729

}

GetServiceName()

The method returns the name of the service (conveyor, rtspServer) managed by the current RPC server.

Response Example

JSON

{

 “result”:“rtspServer”

}

GetConfig()

The method returns the first 100 KB of the main configuration file of the current service.

Response Example

JSON

{

 “core”: {

   “port”:9001

 },

 “dash”: {

   “uri_path”:“/dash”

 }

}

GetEvents(last_event_num, session_id)

The method returns statistics (a list of events) of the current service.

last_event_num, integer 

The last event number in the response. When restarting, SmartMEDIA services start numbering each statistical event sequentially with 0. To limit the size of the returned result, the request passes the number of the last event.

session_id, integer 

The Unix-timestamp of the service startup used as the session ID. Allows you to distinguish events with the same number for the same service running at different times. However, if the server receives a request with the session_id other than the current value, it responds with all available events without taking into account the last_event_num value.

Response Parameters

Depending on the service, the method returns the following data:

Parameters Common to all Services

id

Event number within the session

sessionID

ID of the session

time

Unix-timestamp of event occurrence

Conveyor (conveyor) Parameters

channel

Channel name. Generated using the channels → id and channels → sources → id parameters of the Conveyor configuration file.

type

Event type: Started, Stopped, Error or ReadBitrate.

description

Event description. For example, the ReadBitrate event type is supplemented with the channel read bitrate.

file

Name of the file being indexed

type

Event type: FileProcessStarted; FileProcessSuccess; FileProcessFailed — file is not indexed completely; IndexingError — errors occurred during indexing, but the file is completely or partially indexed.

description

Event description. For example, the IndexingError event type is supplemented with the error description + the number of its repetitions.

Playlist Generator (plgen) Parameters

type

Event type: PlaylistRequest, Error.

description

Event description.

url

Request URI

duration

Duration of the request processing

userAgent

Client User-Agent

result

Request success: true — success; false — fail.

ubSession

HTTP session

ubType

Short error description (for the Error event type only)

ubCounter

The number of error repetitions (for the Error event type only)

address

Client IP address

xMACAddress

Client MAC address

resourceID

ID of the resource requested (typically the name of a file or channel)

Examples Of Calling RPC Methods

Examples of calling RPC methods using the rpcClient utility are provided here.

Interaction with the RPC server can be organized in Python scripts using the tinyrpc library. First, create a TCP transport:

Python

from tinyrpc.transports import ClientTransport

from tinyrpc.protocols.jsonrpc import JSONRPCProtocol

from tinyrpc import RPCClient

import socket

class TcpClientTransport(ClientTransport):

 def__init__(self, ip, port):

   self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

   self.s.connect((ip, port))

   self.buffered_data =“”

   def send_message(self, message, expect_reply=True):

     self.s.send(message)

     packet_data =“”

     open_tags =0

     in_quote =False

     escape_next =False

     have_json =False

     while open_tags !=0ornot have_json:

       if len(self.buffered_data) ==0:

         self.buffered_data +=self.s.recv(1024*1024)

         continue

         data =self.buffered_data[0]

         packet_data += data

         self.buffered_data =self.buffered_data[1:]

         if in_quote:

           if data ==“””:

             ifnot escape_next:

               in_quote =False

               continue

               if escape_next:

                 escape_next =False

                 else:

                   if data ==“\”:

                     escape_next =True

                     else:

                       if data ==“{“:

                         have_json =True

                         open_tags = open_tags +1

                         if data ==“}”:

                           open_tags = open_tags 1

                           if data ==“””:

                             in_quote =True

                             return packet_data

                           def create_json_tcp_rpc(ip, port):

                             rpc_client = RPCClient(JSONRPCProtocol(), TcpClientTransport(ip, port))

                             return rpc_client.get_proxy()

Then create a connection and call the necessary methods:

Python

rpc_object = create_json_tcp_rpc(“127.0.0.1”, 42000)

service_name = rpc_object.GetServiceName()

service_version = rpc_object.GetVersion()

Utilities

Common CLI Parameters

All utilities support the following command line parameters:

–help, -h

Display help in the console and exit.

–version, -v

Display the version in the console and exit.

vodconvert

Command Line Arguments

–type

Default value: mp4

The conversion type, may take the following values:

  • mp4 — MP4 container, DASH playlist generation,
  • ss — MP4 container, DASH + SmoothStreaming playlists generation,
  • ts — MPEG2-TS container, HLS playlist generation.

–add_stream, -a

Required: yes

Adding a track, see “Parameters for Adding a Track”.

–output_directory, -d

Default value: ./

The output directory.

–fragment_duration, -f

Default value: 30

The fragment duration in seconds.

–creation_time

Default value:current time

Creation/modification time in seconds from midnight on January 1, 1904, in UTC (see ISO/IEC 14496-12 8.3.2). Only for MP4.

–mpd_file_name, -m

Required: yes

The name of the output MPD file.

–manifest_file_name

The name of the output Smooth Streaming manifest.

–variant_file_name

The name of the output HLS variant playlist.

–key_server_url

Default value: empty string

URL of the key generation server.

–signer_name

Default value: empty string

The name of the message signer to request the keys.

–signer_key

Default value: empty string

Signer’s AES Key, in hex.

–signer_iv

Default value: empty string

Signer’s AES Initialization Vector, in hex.

–content_id

Default value: empty string

Content ID, in hex.

–key_rotation

Default value: –

If specified, the content will be encrypted with a key update every key_rotation_interval seconds. If not, one key will be used for all fragments.

–cbcs

Default value: 0 (CBCS encryption is not enabled)

Number of encrypted blocks in CBCS scheme pattern.

If this value is set, then pattern [N:10-N] will be used. According to the CBCS standard, totally ten (10) blocks should be used for the pattern. That’s why only one number (the first one) should be set to define the pattern.

The recommended and default pattern is [1:9]. It is used by Apple FairPlay DRM.

–recrypt

Default value: empty string

Used to encrypt MP4 chunks on-the-fly using the SmartMEDIA Recryptor service. For example, from the Common Encryption ‘cenc’ (AES-CTR) scheme to the ‘cbcs’ (AES-CBC Pattern Encryption) scheme. This allows a single copy of encrypted content to be stored and played by players using both Widevine DRM (‘cenc’) and Apple FairPlay DRM (‘cbcs’). The prefix is added before the URI of the encrypted chunks in HLS media playlists so that the client requests the chunks from the SmartMEDIA Recryptor service. The prefix is only added if the chunks are encrypted with the ‘cenc’ scheme for Widevine DRM.

When a prefix is used, a special suffix “/[start]-[end].mp4” (e.g. “media.mp4/0-814.mp4”) is added to the URI instead of the #EXT-X-BYTERANGE element. To the player and the HTTP server it looks like a request for a separate file, not a ‘byte range’ request. This is necessary because when re-encrypting and repacking the size of the MP4 chunk may change. Then the “Content-Range” range in the response will not match the “Range” range in the HTTP request and this will lead to an error and stop the player. Imitating individual files in a playlist solves this problem, although the chunks may physically be written to a single file on disk and SmartMEDIA Recryptor accesses them using ‘byte ranges’. This setting is used only for HLS and does not affect DASH generation.

If a non-empty prefix is passed, the MP4 chunks are recorded a special way with preparation for on-the-fly re-encryption:

  • the #EXT-X-KEY element containing the Key ID in Apple CMAF format is added to HLS media playlists;
  • Key ID and PSSH are added to MP4 chunks;
  • the Subsamples structure (BytesOfClearData/BytesOfProtectedData) is stored without alignment to 16, as for ‘cbcs’ scheme.
–wait_i_frame, -w

Default value: true

Drop data from the input TS file until the first IFrame appears.

–key_rotation_interval

Default value: 3600

The key update period when key_rotation is enabled.

–segmentation

Default value: Base

The type of fragment segmentation, has three possible values: base, template, list. See Segmentation Types

–add_styp

Default value: absent

Add the ‘styp’ box into the output MP4 segments.

–add_sidx

Default value: absent

Add ‘sidx’ box to resulting mp4 fragments.

–timescale, -t

Default value: 0

Allows you to bring timescale value to the specified value for MP4. If set to 0, the timescale remains unchanged (equal to 90000 for video and sample rate for audio).

The default Smooth Streaming timescale value is 10,000,000 and some devices may not support values other than this.

–sd_key_only

Default value: absent

Use a single key (SD-video) to encrypt all video/audio tracks. Required option when generating Smooth Streaming manifest with data encryption.

–disable_senc

Default value: absent

Do not add ‘senc’ box into the output MP4 segments.

–disable_synchronization

Default value: absent

Disables the synchronization of segments in time.

The output file paths must be specified relative to the output_directory parameter. If you specify key_server_url, it is necessary to specify the other parameters (signer_name, signer_key, signer_iv, content_id) required for encryption.

–drop_nal_filler_data

Default value: true

Flag to drop NAL units with the FILLER_DATA type when remuxing the H264 and H265 streams. Some SmartTV models are not able to play streams with the FILLER_DATA units correctly, so they are dropped by default. If you need to keep these units in the stream for some reason, set the flag to false.

Parameters for Adding a Track

Parameters are separated by commas and are specified as parameter = value:

MP4/SmoothStreaming

input

Required: yes

The input file.

adaptation

Adaptation@id, if not specified. It is set automatically according to its type, and for audio it is also based on the language.

track

Required: yes

The track type and number in the input file, e.g. vid0, aud3, sub0.

bandwidth

Default value: 0

The input stream bitrate. If not specified (or 0), it is determined automatically. Is ignored for subtitles.

output

Required: yes/-

The name of the output file for the specified track. Is ignored for external subtitles.

hls_output

HLS playlist output for the specified track.

dir

Default value: ./

The path to the directory to be used as an output for MP4 chunks and HLS playlist for the specified track.

lang

The language of the specified track. If not specified, it is determined automatically, if possible.

itype

The input file type, can be ts, mp4, dts, vtt or dvdsub. If not specified, it is determined by the input file extension.

mime

Adaptation@mimeType. If not specified, it is determined based on the input file and track.

codecs

Representation@codecs. Ignored for all tracks except subtitles.

index

The Initialization@sourceURL value for subtitles in dvdsub format, in which the path to the index file is sent.

segmentation

Default value: base

The segmentation type (see description below).

manifest_url

Default value: QualityLevels({bitrate})/Fragments(video={start time})
Required: –

Value of the Url attibite of the StreamIndex element in SmoothStreaming manifests.

thumbnails

Required: –

Thumbnail generation settings.

Thumbnail images are generated from the I-frames of the video stream. Vodconvert can generate multiple thumbnail images of different sizes per each I-frame and put them into corresponding directories. For each resoluton/format configuration should be described as “:x”; multiple formats can be concatenated by the & sign.

Example: “high:1920×1080&low:640×480”.

thumbnails_mosaic

Required: –

Dimensions of the thumbnail mosaic configured with the thumbnails option as a string “x”

MPEG2-TS

input

Required: yes

The input TS file.

bandwidth

Default value: 0
Required: yes

The input file bitrate.

iframes_bandwidth

Default value: 0
Required: yes/-

The input stream IFrame bitrate.

output

Required: yes

The name of the output HLS media playlist file.

output_iframes

The name of the output HLS IFrames playlist file. If not specified, it is not saved.

playlist_ts_name

Required: yes/-

The name of the TS file used in playlists when generating in byte_ranges mode.

byte_ranges

Default value: 0

0 or 1. If 0, split the source file into chunks; if 1, add the Byte-Range value for each chunk to the playlist.

Types of DASH Segmentation

The type of DASH content segmentation is specified by the segmentation parameter and can take the following values:

Value

Description

base

One file, displayed in the MPD file using SegmentBase

template

A set of files, displayed in the MPD file using SegmentTemplate

list

A set of files, displayed in the MPD file using SegmentList

The data can be contained either in one common file (base) or in a set (template or list), each fragment and initialization data in which will be stored separately. In the case of a set, the output files are named according to the pattern specified in the output parameter. For example, for output=my_film_audio_rus$Number$.mp4 output file names will be:

  • my_film_audio_rus.mp4 — initialization data;
  • my_film_audio_rus1.mp4 — the first fragment;
  • my_film_audio_rus2.mp4 — the second fragment,
  • etc.

If the template type is selected, then the my_film_audio_rus$Number$.mp4 template will also be used in MPD files.

You can use these placeholders in templates:

  • $Number$ — the segment number starting with 0;
  • $Time$ — the start time of the segment (DTS);
  • $Bandwidth$ — the stream bitrate specified by the bandwidth parameter.

Features for MP4

Currently, MP4 input files containing information about samples in the ‘stbl’ box are supported. Split files are not supported.

Features for DTS Audio

DTS audio can be input either as a track in a .ts file or as a separate .dts file without any container. The DTS track in the .ts file will be recognized if in its ‘StreamInfo’ in the PMT a Registration descriptor (ETSI TS 101 154, section 4.1.8.24 “DTS registration descriptor”) with format_id ‘DTS1’, ‘DTS2’ or ‘DTS3’ will be present.

Command Line Examples

Example for Single-Bitrate DASH (mp4) Content

Copy Code

Bash (Unix Shell)

vodconvert

-a input=/video/SER_SD04016/bw300000/video.ts,adaptation=0,track=vid0,output=SER_vid.mp4

-a input=/video/SER_SD04016/bw300000/video.ts,adaptation=1,track=aud0,bandwidth=30000,output=SER_aud.mp4

-m SER.mpd -d /video/nginx/vodconvert/

Execution result:

Copy Code

Bash (Unix Shell)

[2015-09-09 13:17:53.207885] [0x00007f388a75a780] [info] [default] For track: vid0 from /video/SER_SD04016/bw300000/video.ts generated output file: /video/nginx/vodconvert/SER_vid.mp4

[2015-09-09 13:17:53.208765] [0x00007f388a75a780] [info] [default] For track: aud0 from /video/SER_SD04016/bw300000/video.ts generated output file: /video/nginx/vodconvert/SER_aud.mp4

[2015-09-09 13:17:53.260771] [0x00007f388a75a780] [info] [default] Generated MPD file: /video/nginx/vodconvert/SER.mpd

Example for Splitting Files into Fragments

The $Number$ pattern string must be escaped depending on the command shell. For example, in the case of bash, this is done using single quotes. The characters ‘ ‘ and ‘ = ‘ are utility when parsing the vodconvert parameters, so they must be replaced with “” and “= ” in the parameter values (see the example with the Smooth Streaming manifest generation).

Copy Code

Bash (Unix Shell)

vodconvert –type mp4

-a ‘input=/video/dash/oblivion.mp4,track=vid0,output=s1_vid$Number$.mp4’ 

-a ‘input=/video/dash/oblivion.mp4,track=aud0,output=s1_aud$Number$.mp4’ 

-m s1.mpd -d /video/nginx/mp4_to_dash/ –segmentation template

Example for Multi-Bitrate DASH (mp4) content

Copy Code

Bash (Unix Shell)

vodconvert –type mp4

-a input=/video/SER_SD04016/bw1000000/video.ts,adaptation=0,track=vid0,output=SER_vid1000000.mp4

-a input=/video/SER_SD04016/bw1500000/video.ts,adaptation=0,track=vid0,output=SER_vid1500000.mp4

-a input=/video/SER_SD04016/bw300000/video.ts,adaptation=0,track=vid0,output=SER_vid300000.mp4

-a input=/video/SER_SD04016/bw600000/video.ts,adaptation=0,track=vid0,bandwidth=600000,output=SER_vid600000.mp4

-a input=/video/SER_SD04016/bw850000/video.ts,adaptation=0,track=vid0,bandwidth=850000,output=SER_vid850000.mp4

-a input=/video/SER_SD04016/bw300000/video.ts,adaptation=1,track=aud0,bandwidth=30000,output=SER_aud0.mp4

-m SER.mpd -d /video/nginx/vodconvert/

Example for Encrypted Multi-Bitrate DASH (mp4) Content

Copy Code

Bash (Unix Shell)

vodconvert –type mp4

-a input=/video/SER_SD04016/bw1000000/video.ts,adaptation=0,track=vid0,bandwidth=1000000,output=SER_vid1000000.mp4

-a input=/video/SER_SD04016/bw1500000/video.ts,adaptation=0,track=vid0,bandwidth=1500000,output=SER_vid1500000.mp4

-a input=/video/SER_SD04016/bw300000/video.ts,adaptation=0,track=vid0,bandwidth=300000,output=SER_vid300000.mp4

-a input=/video/SER_SD04016/bw600000/video.ts,adaptation=0,track=vid0,bandwidth=600000,output=SER_vid600000.mp4

-a input=/video/SER_SD04016/bw850000/video.ts,adaptation=0,track=vid0,bandwidth=850000,output=SER_vid850000.mp4

-a input=/video/SER_SD04016/bw300000/video.ts,adaptation=1,track=aud0,bandwidth=30000,output=SER_aud0.mp4

-m SER.mpd -d /video/nginx/vodconvert/ –key_server_url “http://license.uat.widevine.com/cenc/getcontentkey/widevine_test” –content_id “3031323334353637” –signer_name “widevine_test” 

–signer_key “1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9” –signer_iv “d58ce954203b7c9a9a9d467f59839249”

Example for the CBCS encyption and DAHS+HLS playlists generation for Apple FairPlay

Input files for each track will be recorded to the separated directory.

Copy Code

Bash (Unix Shell)

vodconvert –type mp4

-a input=src/vid_bw1500000.mp4,track=vid0,adaptation=1,output=‘vid_$Number$.mp4’,hls_output=playlist_vid.m3u8,dir=video/bw1500000/

-a input=src/vid_bw1600000.mp4,track=vid0,adaptation=2,output=‘vid_$Number$.mp4’,hls_output=playlist_vid.m3u8,dir=video/bw1600000/

-a input=src/vid_bw2000000.mp4,track=vid0,adaptation=3,output=‘vid_$Number$.mp4’,hls_output=playlist_vid.m3u8,dir=video/bw2000000/

-a input=src/aud_eng_096.mp4,track=aud0,adaptation=4,output=‘aud_$Number$.mp4’,hls_output=playlist_aud.m3u8,dir=audio/eng_096/

-a input=src/aud_eng_128.mp4,track=aud0,adaptation=5,output=‘aud_$Number$.mp4’,hls_output=playlist_aud.m3u8,dir=audio/eng_128/

-a input=src/aud_eng_192.mp4,track=aud0,adaptation=6,output=‘aud_$Number$.mp4’,hls_output=playlist_aud.m3u8,dir=audio/eng_192/

-m Manifest.mpd –variant_file_name master.m3u8 -d enc

-f 10 –segmentation list

–cbcs 1 

–content_id “446570656368654d6f64655f6362637331” –key_server_url “http://10.65.50.66:8082/cenc/getkey” –signer_name vodconvert –signer_key 6e63cbfcc15b3d3ab2e64434b9729aabbd5c18b721e131d2ad1807e7eab4e633 –signer_iv 78a8a6671f3007da70e532f3d873ec3e

Example for Adding External Subtitles in VTT Format

Copy Code

Bash (Unix Shell)

vodconvert –type mp4 -m playlist.mpd -a input=spart_h264_aac.ts,adaptation=0,track=vid0,bandwidth=300000,output=spart_vid0.mp4 -a input=spart_h264_aac.ts,track=aud0,bandwidth=300000,output=spart_aud0.mp4 -a input=spart.vtt,adaptation=333,track=sub0,lang=en,itype=vtt,mime=text/vtt,codecs=wvtt

Example for Smooth Streaming Manifest Generation (Video Only)

Copy Code

Bash (Unix Shell)

vodconvert –type ss -a input=input_file.ts,adaptation=0,track=vid0,output=QualityLevels($Bandwidth$)/Fragments(video\=$Time$),bandwidth=1200000,manifest_url=QualityLevels({bitrate})/Fragments(video\={start time}) -m out_dash.mpd –manifest_file_name Manifest –segmentation=list

Example for Smooth Streaming Manifest Generation (Video and Audio) with legacy SmartTV Support

Copy Code

Bash (Unix Shell)

vodconvert –type ss

-a input=input_file.ts,adaptation=0,track=vid0,output=QualityLevels_bw$Bandwidth$/Fragments_video_$Time$,bandwidth=1200000,manifest_url=QualityLevels_bw{bitrate}/Fragments_video_{start time},adaptation=0 

-a input=input_file.ts,adaptation=0,track=aud0,output=QualityLevels_bw$Bandwidth$/Fragments_audio_$Time$,bandwidth=100000,manifest_url=QualityLevels_bw{bitrate}/Fragments_audio_{start time},adaptation=1 

-m st.mpd –manifest_file_name Manifest –segmentation=list -t 10000000

Example for Smooth Streaming Manifest Generation with Data Encryption

Copy Code

Bash (Unix Shell)

vodconvert –type ss -f 1 

-a input=input_file.ts,adaptation=0,track=vid0,output=QualityLevels($Bandwidth$)/Fragments(video\=$Time$),bandwidth=1200000,manifest_url=QualityLevels({bitrate})/Fragments(video\={start time}),adaptation=0 

-a input=input_file.ts,adaptation=0,track=aud0,output=QualityLevels($Bandwidth$)/Fragments(audio\=$Time$),bandwidth=100000,manifest_url=QualityLevels({bitrate})/Fragments(audio\={start time}),adaptation=1 

-m st.mpd –manifest_file_name Manifest –segmentation=list

–key_server_url “http://license.server.com/cenc/getkey” 

–signer_name “widevine_test” –signer_key “1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9” –signer_iv “d58ce954203b7c9a9a9d467f59839249” 

–content_id=“73796D6D657472ffaa” -t 10000000 –sd_key_only

Example for HLS (MPEG2-TS) Playlist Generation Without Creating Chunks

Copy Code

Bash (Unix Shell)

vodconvert –type ts -a input=/some/path/input_file.ts,bandwidth=1200000,output=playlist.m3u8,playlist_ts_name=input_file.ts,byte_ranges=1 –variant_file_name variant.m3u8

Example for HLS (MPEG2-TS) Playlist Generation with Creating Chunks and IFrames Playlists

Copy Code

Bash (Unix Shell)

vodconvert –type ts -a input=/some/path/input_file.ts,bandwidth=1200000,iframes_bandwidth=300000,output=playlist.m3u8,output_iframes=iframes.m3u8 –variant_file_name variant.m3u8

Example for Thumbnail Generation

Copy Code

Bash (Unix Shell)

vodconvert –type mp4 -a input=/some/path/input_file.ts,track=vid0,bandwidth=1200000,output=vid0.mp4,thumbnails=tmb_high:0x0&tmb_low:320×240,thumbnails_mosaic=2×2 -m playlist.mpd -d /video/nginx/dash/ –segmentation template

cets

Command Line Arguments

–input, -i

URL of the data source to be encrypted or the path to the file with the content (not necessarily absolute).

–output, -o

URL for the output encrypted content or the path to the file (not necessarily absolute).

–key_server_url

URL of the Widevine server from which the keys will be requested.

–signer_name

The signer of the message to the Widevine server (request sender ID).

–signer_key

Hex string, the key to encrypt the message to the Widevine server; the key can be 16, 24 or 32 bytes in size.

–signer_iv

Hex string, initialization vector to encrypt the message to the Widevine server; IV must be 16 bytes in size; respectively, the string — 32 bytes.

–max_encryptor_buffer_size

The maximum allowed size of the encoder buffer. Due to the peculiarities of the ECM generation algorithm according to ISO/IEC 23001-9, it is necessary to buffer the full PES packet before encryption starts. This parameter limits the buffer size, so as not to accumulate content indefinitely in the absence of a PES header in the stream.

–read_buffer_size

The size of the data block to read.

–packets_between_pssh

The number of packets between adjacent PSSH in the output stream.

–packets_between_audio_ecm

The number of packets between adjacent ECM in the audio track.

–msec_between_audio_ecm

The duration of audio between adjacent ECM.

–widevine_key_type

Corresponds to the type field in the key request. The supported values is: SD, HD, AUDIO. If the parameter is set, then when encrypting all tracks of the stream, the specified type will be transferred by the type field of the key request. If not set, the type will be selected according to the track type (SD for video, AUDIO for sound).

–content_id_string

The encrypted content ID specified as an arbitrary ASCII string (for example, my_content).

–content_id_hex

The encrypted content ID specified as a hex string (for example, FF7755FA1AFE11)

–content_id_base64

The content ID specified as a base64 string.

Each channel configuration must have one (and only one) of the content_id_string, content_id_hex, content_id_base64 parameters. These parameters allow you to set the content ID in a user-friendly way.

The source_url and sink_url parameters are required. For more information about the URL format, see “Input and Output URL Formats”.

Command Line Example

Copy Code

Bash (Unix Shell)

cets –key_server_url “http://my.widevine.server.org/cenc/getkey” –signer_name “widevine_test” –signer_key “1aedeadbeefdeadbeef03a55855a1034afc252980e970ca90e5202689f947ab9” –signer_iv “d58cedeadbeefdeadbeef67f59839249” –content_id_string my_content -i plaintext.ts -o encrypted.ts

scanTs

Command Line Arguments

–skip, -s

The number of TS packets to skip before the analysis starts. The default is 0.

–no-frames

Do not print information about IFrames in the stream, as well as payload errors.

–no-pes

Do not print information about PES packets.

–no-pcr

Do not print information about each PCR change (at the same time, PCR count and PCR jumps count will be performed).

–no-err

Do not print stream errors.

–no-warn

Do not print stream warnings (for example, CC jumps).

–input-file, -f

The input file.

You can specify the input_file parameter at the end of the argument list without naming it. For example, scanTs –no-pcr my.ts

Note: the offset of the IFrame beginning/end relative to the packet in which the IFrame beginning/end was detected, outputs within the track containing the IFrame. So, the record

IFrame stop 1 iFrame track packets behind in stream

for video means that the IFrame did not end in this video packet, but in the previous one. At the same time, there may be other packets between these two packets. So if you need to quickly view the length of the IFrame, it is easier to use idxFromTs + idxdump.

Execution Example

Copy Code

Bash (Unix Shell)

Scanning file sd_1971_Dzhentelmeny_udachi_film.ts

Packet num |  PID |        PCR |        PTS | info

        0 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

        1 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

        2 |   32 |      0.000 |        N/A | ECM

        4 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

        5 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

        7 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

        8 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       10 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       11 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       13 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       14 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       16 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       17 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       19 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       20 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       22 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       23 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       25 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       26 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       28 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       29 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       31 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       32 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       34 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       35 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       37 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       38 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       40 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       41 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       43 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       44 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       46 |    0 |      0.000 |        N/A | PAT  PMT PID: 256

       47 |  256 |      0.000 |        N/A | PMT  v PID 4113 a PID 4352 ECM PID 32

       49 | 4097 |    599.500 |        N/A |   PCR

       50 | 4113 |    599.500 |    600.000 | IFR  video +PTS +DTS IFrame start

       53 | 4113 |    599.500 |    600.080 | IFR  video +PTS +DTS IFrame stop 1 iFrame track packets behind in stream

       95 | 4352 |    599.500 |    600.000 | PES  audio +PTS

       96 | 4352 |    599.500 |    600.021 | PES  audio +PTS

       97 | 4113 |    599.500 |    600.040 | PES  video +PTS

      100 | 4352 |    599.500 |    600.043 | PES  audio +PTS

      101 | 4097 |    599.604 |        N/A |   PCR

      102 | 4352 |    599.604 |    600.064 | PES  audio +PTS

      103 |   32 |    599.604 |        N/A | ECM

      104 | 4113 |    599.604 |    600.200 | PES  video +PTS +DTS

      105 | 4352 |    599.604 |    600.085 | PES  audio +PTS

      106 | 4352 |    599.604 |    600.107 | PES  audio +PTS

      107 | 4113 |    599.604 |    600.160 | PES  video +PTS +DTS

      114 | 4113 |    599.604 |    600.120 | PES  video +PTS

      119 | 4352 |    599.604 |    600.128 | PES  audio +PTS

      120 | 4352 |    599.604 |    600.149 | PES  audio +PTS

tsSnoop

Command Line Arguments

–input, -i

The source file path (the first positional parameter).

–format

The input data format. If not specified, determined by file extension.

–bytes-count

The number of bytes per string when outputting source data.

–skip-data

Skip the output of the source data.

–drop-pid

Program identifiers (PID) to be dropped during output (for TS only). Multiple values (in decimal) are separated by a space.

Command Line Example

Copy Code

Bash (Unix Shell)

tsSnoop legend_audio.mp4 –skip-data | less -r

tsSnoop legend_video.1 -f mp4 | less -r

tsSnoop -i spart.ts –bytes-count 128 –drop-pid 5413 | less -r

Execution Example for TS

Copy Code

Bash (Unix Shell)

0x000000bc #1 Packet PID: 0000(0x0000)

       47 40 00 10  00 00 b0 0d   01000111 01000000 00000000 00010000  00000000 00000000 10110000 00001101   G@……

       00 01 c1 00  00 00 01 f0   00000000 00000001 11000001 00000000  00000000 00000000 00000001 11110000   ……..

       00 2a b1 04  b2 ff ff ff   00000000 00101010 10110001 00000100  10110010 11111111 11111111 11111111   .*……

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff  ff ff ff ff   11111111 11111111 11111111 11111111  11111111 11111111 11111111 11111111   ……..

       ff ff ff ff                11111111 11111111 11111111 11111111                                        ….

       transport_error_indicator: 0

       payload_unit_start_indicator: 1

       transport_priority: 0

       PID: 0

       transport_scrambling_control: 0

       adaptation_field_control: 0

       payload_control: 1

       continuity_counter: 0

       PAT

               table_id: 0

               sectionSyntaxIndicator: 1

               zeroBit: 0

               reserved: 3

               section_length: 13

               transport_stream_id: 1

               reserved: 3

               version_number: 0

               current_next_indicator: 1

               section_number: 0

               last_section_number: 0

               Program:

                       program_number: 1

                       reserved: 7

                       PID: 4096

Execution Example for MKV

Copy Code

Bash (Unix Shell)

0x0000016b id: 0x1654ae6b, size: 187

       16 54 ae 6b  01 00 00 00   00010110 01010100 10101110 01101011  00000001 00000000 00000000 00000000   .T.k….

       00 00 00 bb  ae 01 00 00   00000000 00000000 00000000 10111011  10101110 00000001 00000000 00000000   ……..

       00 00 00 00  31 d7 81 01   00000000 00000000 00000000 00000000  00110001 11010111 10000001 00000001   ….1…

       73 c5 81 01  9c 81 00 22   01110011 11000101 10000001 00000001  10011100 10000001 00000000 00100010   s……

       b5 9c 83 72  75 73 86 85   10110101 10011100 10000011 01110010  01110101 01110011 10000110 10000101   …rus..

       41 5f 41 41  43 83 81 02   01000001 01011111 01000001 01000001  01000011 10000011 10000001 00000010   A_AAC…

       e1 01 00 00  00 00 00 00   11100001 00000001 00000000 00000000  00000000 00000000 00000000 00000000   ……..

       0d 9f 81 02  b5 88 40 e7   00001101 10011111 10000001 00000010  10110101 10001000 01000000 11100111   ……@.

       70 00 00 00  00 00 ae 01   01110000 00000000 00000000 00000000  00000000 00000000 10101110 00000001   p…….

       00 00 00 00  00 00 78 d7   00000000 00000000 00000000 00000000  00000000 00000000 01111000 11010111   ……x.

       81 02 73 c5  81 02 9c 81   10000001 00000010 01110011 11000101  10000001 00000010 10011100 10000001   ..s…..

       00 22 b5 9c  83 65 6e 67   00000000 00100010 10110101 10011100  10000011 01100101 01101110 01100111   .“…eng

       86 8f 56 5f  4d 50 45 47   10000110 10001111 01010110 01011111  01001101 01010000 01000101 01000111   ..V_MPEG

       34 2f 49 53  4f 2f 41 56   00110100 00101111 01001001 01010011  01001111 00101111 01000001 01010110   4/ISO/AV

       43 83 81 01  23 e3 83 84   01000011 10000011 10000001 00000001  00100011 11100011 10000011 10000100   C…#…

       02 62 5a 00  e0 01 00 00   00000010 01100010 01011010 00000000  11100000 00000001 00000000 00000000   .bZ…..

       00 00 00 00  12 b0 82 02   00000000 00000000 00000000 00000000  00010010 10110000 10000010 00000010   ……..

       d0 ba 82 02  40 54 b0 82   11010000 10111010 10000010 00000010  01000000 01010100 10110000 10000010   ….@T..

       04 00 54 ba  82 02 40 63   00000100 00000000 01010100 10111010  10000010 00000010 01000000 01100011   ..T…@c

       a2 ad 01 64  00 1e ff e1   10100010 10101101 00000001 01100100  00000000 00011110 11111111 11100001   …d….

       00 1d 67 64  00 1e ac d9   00000000 00011101 01100111 01100100  00000000 00011110 10101100 11011001   ..gd….

       40 b4 12 6f  fc 01 00 00   01000000 10110100 00010010 01101111  11111100 00000001 00000000 00000000   @..o….

       b4 40 00 00  03 00 40 00   10110100 01000000 00000000 00000000  00000011 00000000 01000000 00000000   .@….@.

       00 0c 83 c5  8b 65 80 01   00000000 00001100 10000011 11000101  10001011 01100101 10000000 00000001   …..e..

       00 05 68 eb  ec b2 2c      00000000 00000101 01101000 11101011  11101100 10110010 00101100            ..h…,

       Tracks

               ID: 0x1654ae6b

               Size: 187

               TrackEntry #0

                       ID: 0xae

                       Size: 49

                       TrackNumber: 1

                       TrackUID: 1

                       TrackType: 2

                       FlagLacing: 0

                       Language: rus

                       CodecID: A_AAC

                       Audio

                               ID: 0xe1

                               Size: 13

                               SamplingFrequency: 48000

                               Channels: 2

               TrackEntry #1

                       ID: 0xae

                       Size: 120

                       TrackNumber: 2

                       TrackUID: 2

                       TrackType: 1

                       FlagLacing: 0

                       DefaultDuration: 40000000

                       Language: eng

                       CodecID: V_MPEG4/ISO/AVC

                       CodecPrivate: 0x0164001effe1001d6764001eacd940b4126ffc010000 b440000003004000000c83c58b658001000568ebecb22c

                       Video

                               ID: 0xe0

                               Size: 18

                               PixelWidth: 720

                               PixelHeight: 576

                               DisplayWidth: 1024

rpcClient

Command Line Arguments

–server, -s

The IP address of the RPC server.

–port, -p

The IP port on the remote server.

–timeout, -t

The time to wait for a remote server response, in milliseconds.

After starting the utility waits for commands of the following form:

<command_name> [<argument1>][] […] <Enter>

Service commands (available regardless of RPC server):

  • exit — exit the utility;
  • info — the list of requests supported by RPC server.

Command Line Example

Copy Code

Bash (Unix Shell)

$ ./rpcClient -s 127.0.0.1 -p 49977

[2015-11-12 18:04:34.952735] [0x00007f0d70caf780] [info] [default] Smartmedia RPC client version: 4.0.0-rc3

[2015-11-12 18:04:34.953143] [0x00007f0d70caf780] [debug] [JSONRPC] request, server: 127.0.0.1, port: 49977

[2015-11-12 18:04:34.953689] [0x00007f0d6f648700] [debug] [JSONRPC] completeRequest

smartmedia> info

[2015-11-12 18:04:38.525070] [0x00007f0d70caf780] [debug] [JSONRPC] request, server: 127.0.0.1, port: 49977

[2015-11-12 18:04:38.525575] [0x00007f0d6f648700] [debug] [JSONRPC] completeRequest

[2015-11-12 18:04:38.525826] [0x00007f0d70caf780] [debug] [JSONRPC] request, server: 127.0.0.1, port: 49977

[2015-11-12 18:04:38.526608] [0x00007f0d6f648700] [debug] [JSONRPC] completeRequest

       Method name: GetConfig                     Description: Return main configuration file data

       Method name: GetEvents                     Description: return events with bigger or equal number than specified

       Method name: GetMethodDescription          Description: Return description of specified method

       Method name: GetMethods                    Description: Return all supported methods

       Method name: GetServiceName                Description: Return service name

       Method name: GetUptime                     Description: Return service uptime in seconds

       Method name: GetVersion                    Description: Return version

smartmedia> GetEvent 0 0

command “GetEvent” not found

smartmedia> GetEvents 0 0

[2015-11-12 18:04:52.293135] [0x00007f0d70caf780] [debug] [JSONRPC] request, server: 127.0.0.1, port: 49977

[2015-11-12 18:04:52.294046] [0x00007f0d6f648700] [debug] [JSONRPC] completeRequest

{

   “result”: [

       {

           “id”: “0”,

           “sessionID”: “1447340620”,

           “time”: “1447340650.382918”,

           “channel”: “CH_TEST_1 (239.65.41.4:5002)”,

           “description”: “1.0094309488932292”,

           “type”: “ReadBitrate”

       },

       {

           “id”: “1”,

           “sessionID”: “1447340620”,

           “time”: “1447340650.383557”,

           “channel”: “CH_TEST_1 (239.65.40.4:5001)”,

           “description”: “1.4366689046223959”,

           “type”: “ReadBitrate”

       },

       {

           “id”: “2”,

           “sessionID”: “1447340620”,

           “time”: “1447340650.383876”,

           “channel”: “CH_TEST_1 (239.65.42.4:5003)”,

           “description”: “0.49479471842447914”,

           “type”: “ReadBitrate”

       },

       {

           “id”: “3”,

           “sessionID”: “1447340620”,

           “time”: “1447340680.383085”,

           “channel”: “CH_TEST_1 (239.65.41.4:5002)”,

           “description”: “1.0091440836588541”,

           “type”: “ReadBitrate”

       },

       {

           “id”: “4”,

           “sessionID”: “1447340620”,

           “time”: “1447340680.383651”,

           “channel”: “CH_TEST_1 (239.65.40.4:5001)”,

           “description”: “1.8082071940104167”,

           “type”: “ReadBitrate”

       },

       {

           “id”: “5”,

           “sessionID”: “1447340620”,

           “time”: “1447340680.38397”,

           “channel”: “CH_TEST_1 (239.65.42.4:5003)”,

           “description”: “0.49642028808593752”,

           “type”: “ReadBitrate”

       }

   ]

}

smartmedia> exit

Features of Interaction with the UDRM Common Encryption Key Server

Key Request Algorithm

The keys are requested by sets, by crypto_period_count pieces in each set. The crypto_period_index is the current UTC time in seconds divided by crypto_period_length.

Regardless of key_request_policy, the keys for the current and next crypto_period_index are present in the local cache. So, if crypto_period_count is 1, then at the execution beginning 2 requests to the key server will be made: first — with the current crypto_period_index, next — with the following.

When key_request_policy is equal to request_when_each_key_expires, new keys are requested at the end of each crypto period, regardless of crypto_period_length. For example, if crypto_period_count equals to 3 and the first request must be made for the crypto period 1, at the beginning of period 1 the keys will be requested for periods 1, 2, 3, and at the beginning of period 2 — for periods 2, 3, 4, etc.

When key_request_policy is equal to request_when_last_key_expires, new keys are requested when there is no key for the next period in the local cache. For example, if crypto_period_count equals to 3 and the first request must be made for crypto period 1, then at the beginning of period 1 the keys for periods 1, 2, 3 will be requested, at the beginning of period 2 there will be no requests to the key server, and at the beginning of period 3 the keys for periods 4, 5, 6 will be requested.

HTTP Redirector

HTTP Redirector is a service responsible for uniform and flexible load balancing between multiple streaming servers or their groups. It’s functionality includes the following:

  • Defining server groups and load balancing rules within the group and between groups, depending on the location of the client and the requested content.
  • Redirecting subscriber requests to working servers if one or more source servers fail
  • Monitoring the servers’ performance
  • Checking the content availability

Command Line Arguments

–help, -h

Print the help to the console and exit.

–version, -v

Print the version to the console and exit.

–config, -c

Default value: smrdr.json

The path to the configuration file.

–log-config, -l

Default value: smrdr.log.json

The path to the logging configuration file.

–log-file

The logger output file. This option works when no logger configuration is specified.

This option is ignored if –log-config is specified.

Configuration File

The default location of the configuration file is /opt/smartlabs/smartmedia/redirector/config/config.json.

Basic Parameters

core, {object} 

A section with the basic settings.

http_threads, integer 

Default value: 5

The number of threads to process outgoing HTTP requests when polling servers.

port, integer 

Default value: 9000

The port for incoming FastCGI connections.

interface, string 

Default value: 0.0.0.0

The interface to listen on for incoming FastCGI connections.

user, string 

The name of the user whose rights the httpRedirector process will have. If no parameter value is specified (an empty string), the process is delegated the rights of the user who started it.

group, string 

The name of the group whose rights the httpRedirector process will have. If no parameter value is specified (an empty string), the process is delegated the rights of the user group that started it.

redirection, {object} 

A section with the traffic redirection settings.

uri_path, string 

Default value: /hls

The base URI path to process requests for content transfer over the HLS or DASH protocol.

request_timeout_sec, integer 

Default value: 5

The time to wait for the upstream HTTP server response, in seconds.

server_status_cache_time_sec, integer 

Default value: 5

The time to cache the availability state of the server (in seconds).

farms, [array{object}] 

The list of farms.

name, string 

The farm name.

balance_policy, string 

Default value: policy_strict_weight

A method of balancing requests between servers within a farm.

For any balancing method, the servers with the requested content are first selected from the farm, and one server is selected among those servers according to the balancing method. The possible parameters are:

  • policy_strict_weight (or: sw, bp_sw, strict_weight) — the server with the most weight in the farm is selected;
  • policy_flexible_weight (or: fw, bp_fw, flexible_weight) — the server is selected based on its weight: the redirect probability to the farm server with a higher weight is higher, the dependence is linear. For example, a server with a weight of 1 will be redirected to 2 times fewer requests than a server with a weight of 2;
  • policy_no_weight (or: nw, bp_nw, no_weight) — the server is selected without taking into account its weight (the probability of a redirect to any server of the farm is the same);
  • policy_first_succeed (or: fs, bp_fs, first, first_succeed) — the first responding server in the farm is selected.
request_timeout_sec, integer 

The farm-specific request timeout, overrides the base parameter request_timeout_sec.

no_query, boolean 

Default value: false

servers, [array{object}] 

The list of servers of this farm.

url, string

The base URL for content request.

weight, integer 

Default value: 0

The weight of the server within this farm.

no_query, boolean 

Default value: false

If set to true, the verify request to the server will not be sent — the server and the content on it are considered always available.

channels, {array of strings} 

The list of channel names statically linked to this server.

channels_assignment, boolean 

Default value: false

Indicates whether to link channels to servers by name.

channels_assignment_group_size, integer 

Default value: 1

Size N of the server group to which the channel is to be assigned by name. Used only if the flag channels_assignment is set. N consecutive servers of a farm are selected as a group. For example, if the start index “2” was calculated by channel name, and N=3, the channel is assigned to servers with indexes 2, 3, 4.

duplicate_without_assignment, boolean 

Default value: false

If channels_assignment=true (see above) and duplicate_without_assignment=true, if the content is not found on the linked server, the search will be performed again on all farm servers.

restrict_by_cost, boolean 

Default value: false

Indicates that only servers with a minimum delivery cost should be considered for balancing. Does not work for the policy_first_succeed balancing rule.

locations, [array{object}] 

The list of possible redirect options.

uri_regex, string 

The regular expression to match the requested URI.

request_scheme_regex, string 

The regular expression to match the schema of the requested URL.

ip_mask, {array of strings} 

Default value: empty array

The list of values “client application IP address/mask”. If the value is “*”, any IP address is accepted.

farms, {array of strings} 

The list of farms.

live_cache_time_sec, integer 

Default value: 5

Time to cache live requests, in seconds.

clear_cache_interval_sec, integer 

Default value: 60

The purge interval for stale cache entries.

channel_regex, string 

The regular expression to find the channel name by URI.

channel_regex_index, string 

Default value: 0

The number of the regular expression substring that is the channel name.

default_server_cost, integer 

Default value: 0

The virtual “cost” of getting content from the server by default. It’s used if the farm has the restrict_by_cost option enabled and the farm server has not returned its delivery cost when the havecontent request has been made.

max_http_request_redirects, integer 

Default value: 0

The maximum number of HTTP request redirects. If the value is 0, the number of redirects is not limited.

vod_regex, string

The regular expression used to determine whether the content belongs to VOD.

params_blacklist, array of strings

Default value: [“csi”]

The HTTP GET parameters to be ignored when caching content.

unsupported_servers, array of strings

Default value: []

List of regular expressions. If, when requesting a playlist from a server with the `havecontent` parameter, the request URL matches one of these, Redirector assumes that this server cannot return a percentage of content availability and processes only the HTTP response code.

Server Selection Algorithm for Request Redirection

  1. Alternately checked all redirection.locations to match uri_regex to the target URI and ip_mask to the client application IP address.
  2. When a match between uri_regex and ip_mask is found, all farms are polled for content availability (unless otherwise specified in the no_query parameter for the farm/server):
    1. If servers with the required content are found in the farm, one server is selected based on the balancing rule (the farm parameter balance_policy, and the request is redirected to this server.
    2. If no servers with the required content are found in the farm, the next farm is polled.
    3. If the server with the required content is not found in any of the farms, a 404 error is returned.
  1. If no match is found, a 404 error is returned.

HTTP Cache

The SmartMEDIA HTTP Cache (smhttpcache) service is intended for the prolonged storing of files in RAM with their simultaneous return over the HTTP protocol to a number of client apps. It is necessary for the low-latency streaming. The service does not support any authorization, so it is recommended to install it together with nginx or another web server.

Command Line Parameters

–help, -h

Print the help to the console and exit.

–version, -V

Print the version to the console and exit.

–config, -c

Default value: smpicker.json

The path to the configuration file.

Configuration File

The default location of the configuration file is: /opt/smartlabs/smartmedia/hlsRedirector/config/config.json

Basic Parameters

threads, integer 

Default value: 4

The number of system threads for processing HTTPS connections.

interface, string 

Default value: “0.0.0.0”

IP address for processing incoming HTTP connections.

port, integer 

Default value: 3000

Port for processing incoming HTTP connections.

chunk_storage_time_sec, integer 

Default value: 120

The storage time of media files in memory, in seconds.

Example Configuration

JSON

{

 “threads”:5,

 “interface”:“0.0.0.0”,

 “port”:3000,

 “chunk_storage_time_sec”:1200

}

SmartPVR

The SmartPVR service (smpvr) allows the IPTV operator to implement the network personal video recorder (nPVR) service. Upon the subscribers’ requests the service generates TV programs from the records made by the Conveyor service based on the requested channel and time of the broadcast. The programs generation and management are performed by the SmartPVR service using the RPC methods.

In order for SmartPVR to generate a program, it needs to set the appropriate task via CreateProgram RPC method. Tasks are entered into the local database and preserved when you restart SmartPVR.

With the frequency specified in the configuration file parameter program_write_period, SmartPVR checks the database, generates and writes to the data_storage storage those programs, for which the following is specified in the task:

  • scheduled state,
  • the end time is earlier than the current time (such programs must already be fully recorded by the Conveyor service).

IMPORTANT: the program is recorded with the configuration set for the channel at the time of the generation task, and not at the time of setting the task or channel recording. Changes to the channel configuration between the time the task is created and the task is run remain the responsibility of the person who made the change.

Command Line Parameters

–help, -h

Display help in the console and exit.

–version, -v

Display version in the console and exit.

–config-file, -c

Required: true

The configuration file path.

–console-log

Ignore log-config and log-file and print the log to the console with the default formatting.

–log-config, -l

Default value: smartPVR.log.json

The path to the logger configuration file.

–log-file

Default value: smartPVR_%Y-%m-%d_%H-%M-%S.%N.log

The logger output file. It is taken into account only if the logger configuration is not specified.

The following variables can be used in the file name:

  • Y — year,
  • m — month,
  • d — day,
  • H — hour,
  • M — minute,
  • S — second,
  • N — the file number among files with the same name.

Configuration File

The location of the configuration file by default: /opt/smartlabs/smartmedia/smartPVR/config/config.json

Basic Parameters

threads, integer 

Default value: 2

The number of worker threads.

processing_threads, integer 

Default value: 5

The number of processing threads in the pool used to record programs into the storage.

rpc_port, integer 

The port of the RPC server. If greater than 0, the RPC server is enabled. By default, the RPC server is disabled.

data_storage, section 

The section describing the way of storing recorded programs and its settings. Only one way can be specified.

fs, section 

The section with settings for storing programs in the local POSIX file system (FS).

program_root, string 

Default value: ./programs

The path to the storage of generated programs in the local POSIX file system.

s3, section 

The section with settings for storing programs in the S3 compatible storage.

tmp_dir, string 

The path in the local POSIX file system for storing temporary files, which are subsequently copied to S3 compatible storage.

remove_failed_data, boolean 

Default value: false

Flag to remove temporary files if recording the program to S3 compatible storage failed.

remote_path

Default value: /pvr

Relative path to S3 storage for storing program files.

host, string 

The address (hostname or IP address) of the S3 storage server.

bucket, string 

S3 storage bucket name.

access_key_id, string 

S3 storage access key ID.

access_key, string 

S3 storage access key.

sm, section 

Section with settings for uploading programs to storage via the load balancer server.

tmp_dir, string 

The path in the local POSIX file system for storing temporary files.

remove_failed_data, boolean 

Default value: false

Flag to remove temporary files if recording the program to server failed.

addr, string 

IP address of the server.

port, integer 

Port of connection to the load balancer service.

events_table, integer 

Name of the MongoDB collection from which events to be added to the program playlist are requested. Events are assumed to be stored in the MongoDB database, which contains information about the chunks and headers of the channel that the program is being recorded from.

program_status_storage_url, string 

URL of the MongoDB database containing the settings of a job created by the CreateProgram RPC method. The programs are generated based on database data. This database data is also used to respond to other RPC methods described below. The supported URL protocol — mongodb://

program_storage_mongo_db, string 

Name of the MongoDB database containing settings and statuses of programs.

program_storage_mongo_collection, string 

Name of the MongoDB collection containing settings and statuses of programs.

program_storage_mongo_program_id_collection, string 

Name of the MongoDB collection containing the program_record_id counter for generating monotonically increasing integer program IDs. MongoDB does not support the “autoincrement ID” functionality common to relational DBMSs. Therefore, it is necessary to explicitly store the counter value in a separate collection in order to restore it after restarting the service. For more information, see the article “Generating Globally Unique Identifiers for Use with MongoDB”.

key_url_template, string 

Default value: empty string

The mask string to generate an encryption URL key. The following mask substrings will be replaced:

  • ${POSITION} — the timestamp for which the key should be requested. Does not coincide with the current playback time due to the keys rotation;
  • ${RESOURCE-ID} — the channel identifier;
  • ${TYPE} — currently always replaced with VOD.

Example: http://11.22.22.22:12345/key?r=${RESOURCE-ID}&t=${TYPE}&p=${POSITION}

recrypt_uri_prefix, string 

Default value: empty string

Used to encrypt MP4 chunks on-the-fly using the SmartMEDIA Recryptor service. For example, from the Common Encryption ‘cenc’ (AES-CTR) scheme to the ‘cbcs’ (AES-CBC Pattern Encryption) scheme. This allows a single copy of encrypted content to be stored and played by players using both Widevine DRM (‘cenc’) and Apple FairPlay DRM (‘cbcs’). The prefix is added before the URI of the encrypted chunks in HLS media playlists so that the client requests the chunks from the SmartMEDIA Recryptor service. The prefix is only added if the chunks are encrypted with the ‘cenc’ scheme for Widevine DRM.

When a prefix is used, a special suffix “/[start]-[end].mp4” (e.g. “media.mp4/0-814.mp4”) is added to the URI instead of the #EXT-X-BYTERANGE element. To the player and the HTTP server it looks like a request for a separate file, not a ‘byte range’ request. This is necessary because when re-encrypting and repacking the size of the MP4 chunk may change. Then the “Content-Range” range in the response will not match the “Range” range in the HTTP request and this will lead to an error and stop the player. Imitating individual files in a playlist solves this problem, although the chunks may physically be written to a single file on disk and SmartMEDIA Recryptor accesses them using ‘byte ranges’. This setting is used only for HLS and does not affect DASH generation.

program_write_period, time units 

Default value: 1h

The frequency of processing tasks from the database (program_status_storage_url).

min_program_duration, time units 

Default value: 1m

The minimum acceptable duration of the program.

max_program_duration, time units 

Default value: 1d

The maximum acceptable duration of the program.

max_programs_in_rpc_response, integer 

Default value: 100 000

The maximum number of programs that the GetPrograms. RPC method can return. This parameter allows to prevent critical slowdowns of the SmartPVR service in case of incorrect programs’ request.

rpc_program_url_prefix, string 

Default value: empty string

The programs’ URL prefix.

channel_index, section 

See the description of the channel_index section for the Conveyor service.

channel_index → channel_tables, Array of strings 

Array of collection names in the MongoDB database with channel recording settings. If multiple Conveyor services are used for recording channels, each service uses a separate collection. And the SmartPVR service searches for a channel to record the program across all the specified collections. This field is specific to the SmartPVR service only and is not included in the description of the channel_index section of the Conveyor service. If this setting is omitted, the collection name from the channel_table field is used.

enable_smooth_streaming, boolean 

Default value: false

Will create Microsoft SmoothStreaming playlist when value is true. Each chunk will be recorded to separate file.

Makes sense only with recording to mp4 container.

smooth_streaming_normalize, boolean 

Default value: false

When value is true the timestamps of the first chunk of each track will be normalized to zero regardless of their synchronization.

Makes sense only when enable_smooth_streaming is true.

output_dir_template, string 

Default value: empty string

Naming template of media tracks’ output directories.

When value is empty string recording will be performed to the directory with the same name as was configured for the corresponding track the original channel (see the parameter dir of the channel in Conveyor’s channel configuration).

Possible template placeholders are:

  • {dir} — the directory name configured for the corresponding track in the original channel (see the parameter dir in Conveyor’s channel configuration);
  • {type} — the track type (video, audio, text);
  • {bitrate} — the bitrate of the corresponding original track (see the parameter bw in Conveyor’s channel configuration).

Example Configuration

JSON

{

 “program_root”:“/video/programs”,

 “rpc_program_url_prefix”:“http://myserver/programs/”,

 “rpc_port”:49985,

 “key_url_template”:“http://10.65.40.53:12684/CAB/keyfile?r=${RESOURCE-ID}&t=${TYPE}&p=${POSITION}”,

 “min_program_duration”:5,

 “program_status_storage_url”:“file:///video/programs/db_programs.db”,

 “program_write_period”:“10s”,

 “channel_index”: {

   “uri”:“mongodb://localhost”,

   “db”:“db_test”,

   “channel_table”:“channels”,

   “s3_storage_table”:“s3_config”,

   “file_storage_table”:“file_config”,

   “mongo_index_storage_table”:“mongo_config”

 }

}

Supported RPC Methods

See also the “RPC Methods Common to all Services” chapter.

CreateProgram(npvr_channel_id, utc_start_sec, utc_end_sec)

The method creates a job to generate a program from the content aired in the period between the utc_start_secand utc_end_sec timestamps on the npvr_channel_id channel. The content from the specified time interval is combined into a single asset.

Call Parameters

npvr_channel_id, string 

Channel ID.

utc_start_sec, integer 

Program start time, in seconds (UTC).

utc_end_sec, integer 

Program end time, in seconds (UTC).

The set of parameters npvr_channel_id, utc_start_sec, utc_end_sec must be unique. If you try to regenerate the program with parameters that match the already generated program, the method will return an error.

The program duration (the difference between utc_end_sec andutc_start_sec) must fit in the interval between min_program_duration and max_program_duration, otherwise the method will return an error.

Call Example

Python

rpcResult = recorder.CreateProgram(‘my_channel_id’, 1424767450, 1424767490)

Response Parameters

The method returns the following data:

status, string 

Program status:

  • scheduled — the program has not been generated yet;
  • in_progress — the program generation is currently in progress;
  • complete — the program generated successfully;
  • failed — the program generation failed.
program_id, integer 

Program ID.

npvr_channel_id, string 

ID of the channel on which the program was aired.

utc_start_sec, integer 

Program start time, in seconds (UTC).

utc_end_sec, integer 

Program end time, in seconds (UTC).

Response Example

ProgramStatus(program_id)

The method returns the status and other properties of the program generated using the CreateProgram method.

Call Parameters

program_id, integer 

Program ID returned by the CreateProgram method.

Call Example

Python

rpcResult = recorder.ProgramStatus(1)

Response Parameters

If the program with the specified program_id is not found, the method returns JSON “result”: “”. If the program exists, the method returns the fields similar to the CreateProgram method.

GetPrograms(status, npvr_channel_id, utc_start_sec_range, utc_end_sec_range)

The method returns the status and other properties of several programs generated using the CreateProgram method. The returned URLs of the playlists and the list of resources may not be valid, use the ProgramStatus method to clarify them.

Call Parameters

All parameters are optional.

status, string 

Program status: – scheduled — the program has not been generated yet; – in_progress — the program generation is currently in progress; – complete — the program generated successfully; – failed — the program generation failed.

npvr_channel_id, string 

ID of the channel on which the program was aired.

utc_start_sec_range, string 

Time interval at which the TV show started, in format: <integer number of seconds>-<integer number of seconds>. Examples: 1447718400-, 1447718400-1447718420, -1447718420.

Important: floating-point numbers are not supported. For example, 1447718400.0-1447718420 — an incorrect value.

utc_end_sec_range, string 

Time interval at which the TV show finished. The format is similar to the utc_start_sec_range parameter.

order_by, string 

The field by which the method response is ordered. Possible values: status, npvr_channel_id, utc_start_sec, utc_end_sec.

Call Example

Python

rpcResult = recorder.GetPrograms(npvr_channel_id =‘CH_TEST’, utc_start_sec_range =‘-1447169340’, order_by =‘program_id’)

Response Parameters

The method returns a list of programs, each of which contains a set of fields similar to the CreateProgram method.

Response Example

JSON

[

 {

   /*Firstprogramparameters*/

   “status”:“in_progress”,

   “npvr_channel_id”:“CH_TEST”,

   “url”:“http://www.server.tv/22/playlist.mpd”,

   “utc_end_sec”:“1447169540”,

   “program_id”:“22”,

   “streams”:“”,

   “utc_start_sec”:“1447169340”

 },

 {

   /*Secondprogramparameters*/

 },

 /*N-thprogramparameters*/

 }

]

RemoveProgram(program_id)

The method removes either an already generated program or a scheduled job for program generation.

Call Parameters

program_id, integer 

Program ID returned by the CreateProgram method.

Call Example

Python

rpcResult = recorder.RemoveProgram(12)

Response Parameters

If successful, the method returns JSON “result”: “”.

HaveContent(npvr_channel_id, utc_start_sec, utc_end_sec)

The method returns the presence of a channel record (generated by the Conveyor) with the ID npvr_channel_id for the period between utc_start_sec and utc_end_sec. The method gets data from MongoDB (see the description of the channel_index section in the main Conveyor configuration).

Call Parameters

npvr_channel_id, string 

ID of the channel on which the program was aired.

utc_start_sec, integer 

Program start time, in seconds (UTC).

utc_end_sec, integer 

Program end time, in seconds (UTC).

The period (the difference between utc_end_sec and utc_start_sec) must fit in the interval between min_program_duration and max_program_duration, otherwise the method will return an error.

Response Parameters

The method return the following data::

availability_percent, string 

The amount of content in storage as a percentage of all the content you are looking for for the period utc_start_sec – utc_end_sec.

Usage Example

If the content is completely recorded, after the following call:

Python

rpcResult = recorder.HaveContent(‘my_channel_id’, 1424767450, 1424767490)

the following is returned in the rpcResult:

JSON

{

 “availability_percent”:100.0

}

SmartMPicker

SmartMEDIA SmartMPicker application (SmartMPicker, MPicker) allows you to select the source of multicast data (hereinafter, the source stream) before delivering content to the user. The SmartMPicker configuration file specifies the list of source streams (the sources block) that the application analyzes sequentially: if there is no multicast data in the stream, SmartMPicker moves to the next stream from the list. If none of the streams match, the file specified last in the sources block is used.

The source streams list corresponds to the output stream address from which the user accesses the content.

Command Line Parameters

–help, -h

Display help in the console and exit.

–version, -V

Display version in the console and exit.

–config, -c

Default value: smpicker.json

The configuration file path.

–log-config, -l

Default value: smpicker.log.json

The path to the logger configuration file.

–log-file

Default value: smpicker.log

The logger output file. The value is taken into account only if the path to the logger configuration file is not specified.

Configuration File

Basic Parameters

threads, integer 

Default value: 4

The number of worker threads.

config_reload_period_sec, float 

Type: float
Default value: 5

The update check interval in this configuration file, in seconds.

default_source_checkup_period_sec, float 

Type: float
Default value: 1

The interval of checking the source streams for validity, in seconds. The parameter is set for output streams and is used to switch to the next stream from the sources list or to return to the previously invalid higher priority streams specified for them. The value is inherited by all output streams from the file, unless overridden in the source_checkup_period_sec stream parameter.

default_file_source_cache_size

Type: size
Default value: 0

The size of the file player cache. The value is inherited by all output streams from the file, unless overridden in the file_source_cache_size stream parameter. If set 0, the file is not caching in the application memory, but can be cached by the OS kernel.

pcr_max_interval_ticks, integer 

Default value: 63000

The maximum allowable interval between PCR when playing video from a file, in the timescale units of the source stream (for MPEG2-TS — 90000).

targets

The list of output streams.

Parameters of Output Streams

target_url, string 

Required: yes

Output stream URL (see IO URL params)

source_checkup_period_sec, float 

Type: float

Overrides the default_source_checkup_period_sec parameter value. If not specified, default_source_checkup_period_sec is used.

file_source_cache_size, string 

Overrides the default_file_source_cache_size parameter value. If not specified, default_file_source_cache_size is used.

sources

The list of source streams.

Parameters of Source Streams

url, string 

Required: yes

Source stream URL (see IO URL params). You can specify either a multicast stream or a TS file. The playback of the TS file will be looped regardless of the additional URL parameters.

Example Configuration

JSON

{

 “threads”:4,

 “config_reload_period_sec”:5,

 “defau<span class=”dxhesearchHI“>u</span>rl”:“file:///qqrq/spart.ts”

       }

     ]

   }

 ]

}

SmartCETS

The SmartCETS service encrypts MPEG TS content in real time according to the ISO/IEC 23001-9 standard (part: “Common encryption of MPEG-2 transport streams”). Keys for encryption are requested according to the Common Encryption API for Widevine DRM protocol (hereinafter Widevine API). Encrypted content can either be recorded to a file or broadcast over UDP multicast. The list of input channels for encryption along with other configuration parameters is specified in the JSON file.

Command Line Arguments

–help, -h

Print the help to the console and exit.

–version, -v

Print the version to the console and exit.

–config-file, -c

Default value: smartCETS.json

The path to the main configuration file.

–log-config, -l

Default value: smartCETS.log.json

The path to the logging configuration file.

–log-file

Default value: smartCETS_%Y-%m-%d_%H-%M-%S.%N.log

Log file name pattern. This option is ignored if –log-config is specified.

The following variables can be used in the file name:

  • Y — year,
  • m — month,
  • d — day,
  • H — hour,
  • M — minute,
  • S — second,
  • N — the file number among files with the same name.

If no variables are defined, the file will be rotated only on service restart.

Configuration File

The parameters from the “Global Parameters” list (see below) can only be present at the top level of the JSON configuration file. The parameters from the “Stream Parameters” list (see below) can only be present in the description of a specific encryption stream. The parameters from the “General Parameters” list (see below) can be present both at the top level and in the description of a particular stream. The value at the particular stream level taking precedence over the value at the top level.

“Batch” means a piece of content with a maximum duration of max_batch_duration_msec (or a maximum length of max_batch_size_bytes if the duration cannot be determined).

Global Parameters

threads, unsigned integer 

Default value: 4

The number of OS worker threads.

config_update_period, time units 

Default value: 1 hour

The frequency of checking the configuration file for changes

config_update_signal, integer 

Default value: SIGUSR1

When the SmartCETS process receives a signal with this number, the configuration file will be checked for changes.

streams

Type: array of objects
Default value: []

The list of streams to encrypt. For each stream, in addition to the parameters from the “Stream Parameters” list (see below), you can also specify parameters from the “General Parameters” list.

content_id_string, string 

The encrypted content ID specified as an arbitrary ASCII string (for example, “my_content”).

content_id_hex, HEX string 

The encrypted content ID specified as a hex string (for example, FF7755FA1AFE11)

content_id_base64, Base64 string 

The encrypted content ID specified as a base64 string.

source_url, string 

Default value: –

The data source URL.

sink_url, string 

The URL to encrypted content streaming.

user, string 

The name of the user whose rights the smartCETS process will have. If no parameter value is specified (an empty string), the process is delegated the rights of the user who started it.

group, string 

The name of the group whose rights the smartCETS process will have. If no parameter value is specified (an empty string), the process is delegated the rights of the user group that started it.

key_server_url, string 

The URL to access the key server.

retry_timeout, time units 

Default value: 30 seconds

The repetition period of requests in case of a read error from the source. If the value is 0, in case of a data source error, reading from the source will be stopped.

idle_timeout, time units 

Default value: 30 seconds

If during the next period of time with a length of idle_timeout no data is read from the source for any stream, smartCETS will print in the log an error message like

Content <content ID>: no data for at least <idle_timeout> seconds

The period for each stream is counted separately. If the value is 0, the message will not be printed.

smooth_transmission_by_pcr, boolean 

The flag that enables/disables the output stream broadcasting according to PCR.

If set to false, the encrypted content will be sent according to default_transmission_rate_bytes_per_sec for UDP or as it is received from the encoder buffer for other broadcasting types (piece by piece, roughly corresponding to the boundaries of PES packets in the source stream).

If set to true, the return time of each datagram (contains 7 MPEG2-TS packets) will be calculated according to PCR regardless of the broadcasting type.

If not specified, for UDP broadcasting is considered to be true, and for writing to a file or HTTP broadcasting it is considered to be false.

max_pcr_jitter_usec, unsigned integer 

Default value: 200000

The maximum allowable difference between adjacent PCR values in microseconds.

Relevant when smooth_transmission_by_pcr is true.

If this limit is exceeded, the content between violating PCR will be sent according to default_transmission_rate_bytes_per_sec.

default_transmission_rate_bytes_per_sec, unsigned integer 

Default value: 12500000

The content transmission rate in the absence of PCR (or incorrect PCR) in the input stream. It also applies to UDP broadcasts when smooth_transmission_by_pcr is false.

min_batch_duration_usec, unsigned integer 

Default value: 100

Defines the minimum allowed batch return time. In case the actual return rate for some reason begins to lag behind the required one (determined by PCR or default_transmission_rate_bytes_per_sec), a certain amount of batch will be sent for min_batch_duration_usec, so that the real speed will “catch up” with the required.

max_batch_size_bytes, data size 

Default value: 1,25 MBytes

The maximum allowable batch size. If there is more than max_batch_size_bytes bytes between adjacent PCR, this part of content will be broadcast at the rate corresponding to default_transmission_rate_bytes_per_sec.

max_transmission_buffer_duration_msec, unsigned integer 

Default value: 10000

The maximum total buffer duration between the encoder and the output multicast broadcaster. If the total duration of the content in the buffer exceeds the value of this parameter, the input data encryption is suspended until a space in the buffer appears.

min_transmission_buffer_duration_msec, unsigned integer 

Default value: 1000

The minimum total buffer duration between the encoder and the output multicast broadcaster. Broadcasting of encrypted content will not begin until content has accumulated with a total duration of min_transmission_buffer_duration_msec.

ts_error_print_period, time units 

Default value: 30 seconds

The frequency of printing information about input TS stream errors to the log (for example, about CC jumps). If there are no errors, nothing is printed.

video_key_type, string 

Default value: SD

The key type for video tracks. It is used to encrypt MPEG-TS according to the CETS standard. If specified, all video tracks available in the input stream will be encrypted with this key type. Supports the same set of values as widevine.key_type.

audio_key_type, string 

Default value: AUDIO

The key type for audio tracks. It is used to encrypt MPEG-TS according to the CETS standard. If specified, all audio tracks available in the input stream will be encrypted with this key type. Supports the same set of values as widevine.key_type.

Encryption parameters and Widevine parameters are also available for configuration (except key_type — the video_key_type and audio_key_type parameters are used instead).

Each channel configuration must have one (and only one) of the content_id_string, content_id_hex, and content_id_base64 parameters. These parameters allow you to set the content_id in a user-friendly way. The source_url and sink_url parameters are required. For more information about the URL format, see “Input and Output URL Formats

enable_audio_encryption, boolean 

Default value: true

Flag to disable audio encryption.

Encryption Parameters and Features According to ISO/IEC 23001-9

This section provides the ISO/IEC 23001-9 encryption settings (part: “Common encryption of MPEG-2 transport streams”) in SmartMedia services.

Parameters

max_encryptor_buffer_size, integer 

Default value: 50000

The maximum allowed size of the encoder buffer in TS packets.

Due to the peculiarities of the ECM generation algorithm according to ISO/IEC 23001-9, it is necessary to buffer the full PES packet before encryption begins. This parameter limits the buffer size, so as not to accumulate content indefinitely if there is no PES header in the stream.

packets_between_pssh, integer 

Default value: 0

The minimum number of TS packets between adjacent PSSH in the output stream.

PSSH for all tracks are inserted into the stream only after the PMT, so the actual distance between the PSSH in the output stream will exceed the packets_between_pssh value by no more than the distance between adjacent PMTs in the stream.

packets_between_audio_ecm, integer 

Default value: 50000

[The minimum number of TS packets between adjacent ECMs in the audio track.

With this parameter, you can increase the frequency of inserting audio ECM into the stream (see “Encryption Algorithm Features”).

msec_between_audio_ecm, integer 

Default value: 100

Audio duration between adjacent ECMs (see “Encryption Algorithm Features”).

Encryption Algorithm Features

The encryption is performed according to the ISO/IEC 23001-9 standard, namely:

  • the original MPEG-TS container is preserved (except PMT), unknown tracks are not encrypted;
  • the descriptors described in ISO / IEC 23001-9 are added to the source stream PMT for each track to be encrypted;
  • the payload of each found video/audio track is encrypted;
  • the utility is able to find H.262, H.264 and H.265 video tracks and AAC/ADTS, AC3 and DTS tracks;
  • the utility is implementing the recommendations of ISO/IEC 23001-9 for the encryption of the H.264/H.265 and AAC payload (i.e., does not encrypt a payload of the TS packet containing the VPS/SPS/PPS/SliceHeader and ADTS Fixed header);
  • the payload of TS packets containing PES headers is not encrypted for H.262, AC3, and DTS;
  • the packets containing PSSH for all encrypted tracks are inserted into the output stream after PMT; the insertion occurs no more frequently than in every packets_between_pssh packets;
  • before each PES header, ECMs related to it are inserted into the stream. The content of ECMs corresponds to the ISO/IEC 23001-9 standard. ECMs can also be inserted inside a PES packet if at least one of the conditions is met:
    • the contents of the currently accumulated ECM do not fit into the payload of a single TS packet;
    • for audio tracks: since the last inserted ECM, more than packets_between_audio_ecm TS packets belonging to this audio track have been processed;
    • for audio tracks: the length of processed content since the last ECM inserted exceeds msec_between_audio_ecm.

Example Configuration

JSON

{

 “key_server_url”:“http://10.65.50.167/cenc/getkey”,

 “signer_name”:“widevine_test”,

 “signer_key”:“deadbeefdeadbeefdeadbeefdeadbeef”,

 “signer_iv”:“deadbeefdeadbeefdeadbeefdeadbeef”,

 “crypto_period_length”:“10h”,

 “crypto_period_count”:“3”,

 “key_request_policy”:“request_when_last_key_expires”,

 “smooth_transmission_by_pcr”:“true”,

 “msec_between_audio_ecm”:30,

 “streams”: [

   {

     “content_id_hex”:“6365747374657374”,

     “source_url”:“udp://239.65.40.4:5001”,

     “sink_url”:“udp://239.2.0.59:2020”

   },

   {

     “content_id_string”:“another_content”,

     “source_url”:“udp://239.2.0.56:2020”,

     “sink_url”:“udp://239.2.0.62:2020”

   }

 ]

}

Input and Output URL Formats

The source and sink URLs are URLs with the udp:// and file:// protocols (see IO URL params).

Extras

This section contains auxiliary reference information that may be useful when using the SmartMEDIA Content Delivery System.

Linux Network Subsystem Configuring

Calculating the TCP Window for the Bandwidth Delay Product

TCP performance depends on several factors. The two most important are link bandwidth (the speed of packets transmitted over the network), and round-trip time (RTT, the delay between sending a segment and receiving a notification from the node). These two values define so-called Bandwidth Delay Product (BDP).

Knowing network bandwidth and RTT gives you information for BDP calculation. BDP provides an easy way to calculate the optimal (in theory) TCP socket buffer size. If the buffer is too small, the TCP window can’t fully open, and it’ll limit performance. If the buffer is oversized, valuable RAM will be spent without reason. The most optimal value lets you use all the available bandwidth and minimize resources usage.

BDP calculation can be made this way:

BDP = link_bandwidth × RTT

For example, if your application interacts through a 100Mbps network with RTT 50ms, BDP will be:

100 Mbps × 0.050 sec ÷ 8 = 0.625 MB = 625 KB

BDP is defined in (K/M/G) bytes, while the bandwidth is defined in (K/M/G) bits / sec . To cast types, divide bandwidth by 8, as in example above.

So, your TCP window should be set to BDP (625 KB). But by default the TCP window in Linux 2.6 is 110 KB, which limits the connection bandwidth to ~18 Mbps:

bandwidth = window size ÷ RTT

110 KB ÷ 0.050 × 8 = 17.6 Mbps

TCP/IP Stack Configuration for Linux

A standard Linux installation tries to be optimized for a wide range of applications. This means that the standard distribution may not be optimal for your environment.

GNU/Linux provides a wide range of configurable kernel parameters that you can use for the dynamic operation system configuring for your specific applications. Let’s look at some of the most important options that affect the performance of sockets.

Configurable kernel parameters exist inside the /proc virtual file system. Each file in it represents one or more parameters, which can be read by the cat utility or changed with the echo command. You can also use the sysctl utility to configure it.

net.core.rmem_default, byte

Default value: 110592

Defines the default receive window size; affects only protocols other than TCP. For TCP redefined in tcp_rmem.

The size should be increased for larger BDP values.

Recommendation: set the value equal to the minimum BDP per client (i.e. based on the bandwidth that should be allocated to every client at any load).

net.core.rmem_max, byte 

Default value: 110592

Defines the maximum size of the receive window; affects all protocols, including TCP. For TCP, the maximum value in tcp_rmem cannot exceed the value of this parameter.

The size should be increased for larger BDP values.

Recommendation: set the value equal to the minimum BDP per client (i.e. based on the bandwidth that should be allocated to every client at any load).

net.core.wmem_default, byte 

Default value: 110592

Defines the default transmit window size; affects only protocols other than TCP. For TCP, it is redefined in tcp_wmem.

The size should be increased for larger BDP values.

Recommendation: according to IBM documentation the value is always set to 64 KB (65536). Otherwise, the send buffer ring (TX) overflows may occur.

net.core.wmem_max, byte 

Default value: 110592

Defines the maximum size of the transmit window; affects all protocols, including TCP. For TCP, the maximum value in tcp_wmem cannot exceed the value of this parameter.

The size should be increased for larger BDP values.

Recommendation: set the value to the maximum host BDP (i.e. based on the planned host bandwidth).

net.ipv4.tcp_window_scaling, boolean (1/0)

Default value: 1

Enables window scaling, as defined in RFC1323. It should be enabled to support windows larger than 64 KB.

net.ipv4.tcp_sack, boolean (1/0)

Default value: 1

Activates a selective acknowledgment, which improves performance by selectively confirming packets received out of turn (as a result, the sender retransmits only the missed segments).

May increase the CPU load.

ATTENTION: increases the potentially susceptibility to DoS attacks.

net.ipv4.tcp_fack, boolean (1/0)

Default value: 1

Enables Forward Acknowledgment, which operates with Selective Acknowledgment (SACK) to reduce congestion.

Recommendation: must be enabled when tcp_sack is enabled.

net.ipv4.tcp_timestamps, boolean (1/0)

Default value: 1

Activates RTT calculation in a more accurate way (see RFC1323) than the retransmission interval.

Recommendation: should be enabled to improve performance.

ATTENTION: sometimes causes interaction problems between two hosts. Repeatedly there was a situation when it was impossible to establish an SSH connection to the server when the tcp_timestamps was enabled on the client.

net.ipv4.tcp_mem, memory page 

Default value: “24576 32768 49152”

Defines the memory limit for the TCP stack and memory usage behavior of the TCP stack (total memory usage, regardless of the sockets number).

The value is defined in memory pages (usually 4 KB).

Increase the value for large BDP (but remember, it is defined in memory pages, not in bytes).

The first value is the lower memory usage limit (initially allocated memory capacity). Recommendation: set the value to BDP ÷ PageSize.

The second value is the threshold for the memory multiplex mode, upon which the multiplexing to use the buffer is activated. Recommendation: set the value to BDP × 2 ÷ PageSize.

The third value is the maximum limit. At this level, packets can be skipped to reduce memory usage. Recommendation: set the value to BDP × 4 ÷ PageSize.

net.ipv4.tcp_wmem, memory page 

Default value: “4096 16384 131072”

Specifies the memory usage for each socket for automatic configuration.

This setting is important for content stream servers, where each client should receive data at a speed not lower than the speed of the audio / video stream.

The first value is the minimum number of bytes allocated for the socket send buffer. Recommendation: set the value to 4 KB.

The second value is the default value (overrides wmem_default), to which the buffer size can grow at low system load. Recommendation: set the value to BDP per client (based on the minimum required speed of delivery to the client).

The third value is the maximum send buffer length (overrides wmem_max, but cannot exceed it). With static soft memory allocation by the SO_RCVBUF socket option this parameter is ignored. Recommendation: set the value to BDP per client (based on the desired speed of delivery to the client).

net.ipv4.tcp_rmem, memory page 

Default value: “4096 87380 174760”

Same as tcp_wmem, except that it refers to receive buffers for automatic tuning.

net.ipv4.tcp_low_latency, boolean (1/0)

Default value: 0

Allows the TCP/IP stack to prefer a low latency than a higher bandwidth.

Recommendation: should be disabled.

net.ipv4.tcp_westwood, boolean (1/0)

Default value: 0

Activates the sender’s congestion control algorithm, which supports estimated throughput values and tries to optimize the full use of bandwidth.

This parameter is also useful for wireless interfaces, since packet losses can be caused not by overloading.

Recommendation: must be enabled for WAN connections.

net.ipv4.tcp_bic, boolean (1/0)

Default value: 1

Activates Binary Increase Congestion for fast, long-distance networks.

Improves the use of links operating at gigabit speeds.

Recommendation: must be enabled for WAN connections.

net.ipv4.tcp_max_orphans, integer

Default value: 65536

Maximum number of TCP sockets allowed in the system that are not associated with any user file handle. Each orphan-connection absorbs about 64 Kbytes of unswappable memory.

When the threshold is reached, the orphan-connections are immediately discarded with a warning.

Do not reduce the threshold value (rather increase it in accordance with the system requirements, for example, after additional memory installing).

This threshold helps prevent simple DoS attacks.

net.ipv4.tcp_fin_timeout, integer 

Default value: 60

Specifies the remaining time of a socket in the FIN-WAIT-2 state after it is closed by the local side. The partner may never close this connection, so you should close it on your own initiative after the timeout expires. The default timeout is 60 seconds.

The 2.2 series kernels typically used a value of 180 seconds, and you can keep that value, but be aware that you run the risk of wasting a lot of memory to save the half-ruptured dead connections on the high loaded servers. Sockets in the FIN-WAIT-2 state are less dangerous than FIN-WAIT-1, since they absorb no more than 1.5 KB of memory, but they can exist longer.

net.ipv4.tcp_max_syn_backlog, integer 

Maximum number of stored connection requests for which no confirmation was received from the connecting client (i.e., the TCP SYN came from the client, the server answered SYN/ACK, and the next ACK was not received).

If overloads occur on the server, you can try to increase this value.

Too large backlog may be the result of a SYN-flood attack. In this case, the inclusion of SYN cookies will help. If you are sure that the attack is not performed, then you need to increase the value to the appropriate one.

net.ipv4.tcp_synack_retries, integer 

Number of retry attempts to send SYNACK packets for passive TCP connections (resends will be made if the response ACK is not received, which may be the result of a SYN-flood attack).

The number of attempts should not exceed 255.

A value of 5 corresponds to approximately 180 seconds for connection attempts.

net.ipv4.tcp_syncookies, boolean (1/0) 

The flag indicating whether to enable the SYN-Cookies mechanism when the SYN-Flood attack is detected.

net.ipv4.tcp_tw_reuse, boolean (1/0) 

Default value: 0

In case the tcp_tw_reuse flag is set, sockets in the TIME_WAIT state can be reused before the timeout expires. The kernel will try to eliminate collisions based on the TCP Sequence Number.

Activated tcp_timestamps excludes collisions, but it must be enabled on both sides (server and client).

Recommendation: must be activated on streaming servers.

net.ipv4.tcp_tw_recycle, boolean (1/0) 

Default value: 0

In case the tcp_tw_recycle flag is set, the kernel will make assumptions about the possibility to reuse the TIME_WAIT-stated socket basing on the remote host timestamps. The kernel will monitor the last sent timstamp values from remote hosts that “hold” connections in the TIME_WAIT state, and will allow to reuse the socket if the timestamp increases correctly.

At the same time, if the timestamp changed incorrectly (for example, “rolled back”), the SYN packet will be “silently” discarded and the connection will not be established.

Examples of the Vodconvert Utility Using

Multi-bitrate content in DASH format, Base profile

Bash (Unix Shell)

/opt/smartlabs/smartmedia/utils/bin/vodconvert –type dash

-a   input=TOS/vid_bw2000000.mp4,adaptation=0,track=vid0,output=vid_bw2000000.mp4

-a input=TOS/vid_bw2400000.mp4,adaptation=0,track=vid0,output=vid_bw2400000.mp4

-a input=TOS/vid_bw2500000.mp4,adaptation=0,track=vid0,output=vid_bw2500000.mp4

-a input=TOS/vid_bw3300000.mp4,adaptation=0,track=vid0,output=vid_bw3300000.mp4

-a input=TOS/vid_bw4500000.mp4,adaptation=0,track=vid0,output=vid_bw4500000.mp4

-a input=TOS/aud_eng_096.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_096.mp4

-a input=TOS/aud_eng_128.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_128.mp4

-a input=TOS/aud_eng_192.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_192.mp4

-a input=TOS/aud_rus_096.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_096.mp4

-a input=TOS/aud_rus_128.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_128.mp4

-a input=TOS/aud_rus_192.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_192.mp4

-a input=sub_eng.vtt,adaptation=3,track=sub0,output=sub_eng.vtt,lang=en,itype=vtt,mime=text/vtt

-a input=sub_esp.vtt,adaptation=4,track=sub0,output=sub_esp.vtt,lang=es,itype=vtt,mime=text/vtt

-a input=sub_rus.vtt,adaptation=5,track=sub0,output=sub_rus.vtt,lang=ru,itype=vtt,mime=text/vtt

-m dash.mpd -d /video/DTE_DASH_AUTO/TOS_clear_a_base -f 5 -t 10000000 –segmentation Base

Encrypted multi-bitrate content in DASH format, Template profile

Bash (Unix Shell)

/opt/smartlabs/smartmedia/utils/bin/vodconvert –type dash -a input=TOS/vid_bw2000000.mp4,adaptation=0,track=vid0,output=vid_bw2000000_$Number$.mp4 

-a input=TOS/vid_bw2400000.mp4,adaptation=0,track=vid0,output=vid_bw2400000_$Number$.mp4 

-a input=TOS/vid_bw2500000.mp4,adaptation=0,track=vid0,output=vid_bw2500000_$Number$.mp4 

-a input=TOS/vid_bw3300000.mp4,adaptation=0,track=vid0,output=vid_bw3300000_$Number$.mp4 

-a input=TOS/vid_bw4500000.mp4,adaptation=0,track=vid0,output=vid_bw4500000_$Number$.mp4 

-a input=TOS/aud_eng_096.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_096_$Number$.mp4 

-a input=TOS/aud_eng_128.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_128_$Number$.mp4 

-a input=TOS/aud_eng_192.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_192_$Number$.mp4 

-a input=TOS/aud_rus_096.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_096_$Number$.mp4 

-a input=TOS/aud_rus_128.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_128_$Number$.mp4 

-a input=TOS/aud_rus_192.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_192_$Number$.mp4 

-a input=sub_eng.vtt,adaptation=3,track=sub0,output=sub_eng.vtt,lang=en,itype=vtt,mime=text/vtt

-a input=sub_esp.vtt,adaptation=4,track=sub0,output=sub_esp.vtt,lang=es,itype=vtt,mime=text/vtt

-a input=sub_rus.vtt,adaptation=5,track=sub0,output=sub_rus.vtt,lang=ru,itype=vtt,mime=text/vtt

-m dash.mpd -d /video/DTE_DASH_AUTO/TOS_skey_a_tmpl -f 5 -t 10000000 

–segmentation Template

–key_server_url http://10.65.50.167/cenc/getkey –signer_name widevine_test

–signer_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9

–signer_iv d58ce954203b7c9a9a9d467f59839249

–content_id 544f535f736b65795f615f746d706c0a –sd_key_only

Encrypted multi-bitrate content in DASH format, List profile

Bash (Unix Shell)

/opt/smartlabs/smartmedia/utils/bin/vodconvert –type dash -a input=TOS/vid_bw2000000.mp4,adaptation=0,track=vid0,output=vid_bw2000000_$Number$.mp4 

-a input=TOS/vid_bw2400000.mp4,adaptation=0,track=vid0,output=vid_bw2400000_$Number$.mp4 

-a input=TOS/vid_bw2500000.mp4,adaptation=0,track=vid0,output=vid_bw2500000_$Number$.mp4 

-a input=TOS/vid_bw3300000.mp4,adaptation=0,track=vid0,output=vid_bw3300000_$Number$.mp4 

-a input=TOS/vid_bw4500000.mp4,adaptation=0,track=vid0,output=vid_bw4500000_$Number$.mp4 

-a input=TOS/aud_eng_096.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_096_$Number$.mp4 

-a input=TOS/aud_eng_128.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_128_$Number$.mp4 

-a input=TOS/aud_eng_192.mp4,adaptation=1,track=aud0,lang=en,output=aud_eng_192_$Number$.mp4 

-a input=TOS/aud_rus_096.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_096_$Number$.mp4 

-a input=TOS/aud_rus_128.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_128_$Number$.mp4 

-a input=TOS/aud_rus_192.mp4,adaptation=2,track=aud0,lang=ru,output=aud_rus_192_$Number$.mp4 

-a input=sub_eng.vtt,adaptation=3,track=sub0,output=sub_eng.vtt,lang=en,itype=vtt,mime=text/vtt

-a input=sub_esp.vtt,adaptation=4,track=sub0,output=sub_esp.vtt,lang=es,itype=vtt,mime=text/vtt

-a input=sub_rus.vtt,adaptation=5,track=sub0,output=sub_rus.vtt,lang=ru,itype=vtt,mime=text/vtt

-m dash.mpd -d /video/DTE_DASH_AUTO/TOS_skey_a_list -f 5 -t 10000000 

–segmentation List –key_server_url http://10.65.50.167/cenc/getkey

–signer_name widevine_test

–signer_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9

–signer_iv d58ce954203b7c9a9a9d467f59839249

–content_id 544f535f736b65795f615f6c6973740a –sd_key_only

Clear single-bitrate content in HLS format

Bash (Unix Shell)

/opt/smartlabs/smartmedia/utils/bin/vodconvert –type hls

-a input=test.ts,bandwidth=6000000,iframes_bandwidth=300000,output=playlist.m3u8,output_iframes=iframes.m3u8

–variant_file_name variant.m3u8

Example of Running FFmpeg for VoD Content Preparation

The sequence of commands for the source HD content transcoding to 5 video bitrates and 3 audio bitrates is given below (the source file contains 2 audio tracks). To demonstrate the switching between bitrates, each output file will be overlaid with text indicating the resolution and bitrate. It is supposed that:

  • the target directory path should be defined in OUTDIR variable;
  • the source file path should be defined in the INFILE variable.

Bash (Unix Shell)

mkdir -p $OUTDIR

ffmpeg -threads 2 -y -i $INFILE -filter_complex “[0:v]split=5[r1][r2][r3][r4][r5];

[r1]drawtext=fontfile=DroidSansMono.ttf:text=’1920×1080 4500 Kbps’:fontcolor=white:shadowcolor=black:shadowx=2:fontsize=24:x=15:y=1026,scale=1920:1080[v1];

[r2]drawtext=fontfile=DroidSansMono.ttf:text=’1920×1080 3300 Kbps’:fontcolor=white:shadowcolor=black:shadowx=2:fontsize=24:x=15:y=1026,scale=1920:1080[v2];

[r3]drawtext=fontfile=DroidSansMono.ttf:text=’1280×720 2500 Kbps’:fontcolor=white:shadowcolor=black:shadowx=2:fontsize=24:x=15:y=1026,scale=1280:720[v3];

[r4]drawtext=fontfile=DroidSansMono.ttf:text=’720×576 2400 Kbps’:fontcolor=white:shadowcolor=black:shadowx=2:fontsize=24:x=15:y=1026,scale=720:576[v4];

[r5]drawtext=fontfile=DroidSansMono.ttf:text=’720×576 2000 Kbps’:fontcolor=white:shadowcolor=black:shadowx=2:fontsize=24:x=15:y=1026,scale=720:576[v5];

[0:a:0]asplit=3[ar1][ar2][ar3];

[0:a:1]asplit=3[ae1][ae2][ae3]” 

-map [v1] -an -pix_fmt yuv420p -vcodec libx264 -preset medium -b:v 4500k -minrate 4500k -maxrate 4500k -bufsize 4500k -x264-params keyint=72:min-keyint=72:scenecut=0 $OUTDIR/vid_bw4500000.mp4

-map [v2] -an -pix_fmt yuv420p -vcodec libx264 -preset medium -b:v 3300k -minrate 3300k -maxrate 3300k -bufsize 3300k -x264-params keyint=72:min-keyint=72:scenecut=0 $OUTDIR/vid_bw3300000.mp4

-map [v3] -an -pix_fmt yuv420p -vcodec libx264 -preset medium -b:v 2500k -minrate 2500k -maxrate 2500k -bufsize 2500k -x264-params keyint=72:min-keyint=72:scenecut=0 $OUTDIR/vid_bw2500000.mp4

-map [v4] -an -pix_fmt yuv420p -vcodec libx264 -preset medium -b:v 2400k -minrate 2400k -maxrate 2400k -bufsize 2400k -x264-params keyint=72:min-keyint=72:scenecut=0 $OUTDIR/vid_bw2400000.mp4

-map [v5] -an -pix_fmt yuv420p -vcodec libx264 -preset medium -b:v 2000k -minrate 2000k -maxrate 2000k -bufsize 2000k -x264-params keyint=72:min-keyint=72:scenecut=0 $OUTDIR/vid_bw2000000.mp4

-map [ar1] -vn -strict -2 -acodec aac -ab 192k -ac 2 -ar 48000 $OUTDIR/aud_rus_192.mp4

-map [ar2] -vn -strict -2 -acodec aac -ab 128k -ac 2 -ar 48000 $OUTDIR/aud_rus_128.mp4

-map [ar3] -vn -strict -2 -acodec aac -ab 96k -ac 2 -ar 48000 $OUTDIR/aud_rus_096.mp4

-map [ae1] -vn -strict -2 -acodec aac -ab 192k -ac 2 -ar 48000 $OUTDIR/aud_eng_192.mp4

-map [ae2] -vn -strict -2 -acodec aac -ab 128k -ac 2 -ar 48000 $OUTDIR/aud_eng_128.mp4

-map [ae3] -vn -strict -2 -acodec aac -ab 96k -ac 2 -ar 48000 $OUTDIR/aud_eng_096.mp4

the text will be rendered with the DroidSansMono.ttf font. This font file shall be present in the current directory. You can also use any other available TTF font.

Subtitlings for VoD must be provided in the WebVTT format. Subtitling files should be copied to the output directory manually (also they need to be specified at the content package stage, see below). To convert SRT subtitlings to WebVTT you can also use ffmpeg:

ffmpeg -i Tears of Steel 2012 2160p DM FLAC 5.1 Hi444PP 10-bit x264-DON.mkv -map 0:s:0 -vn -an -scodec webvtt subtitles.vtt

The subtitles.vtt file containing the first (in sequence) subtitling track will be created.

Supported Protocols

HLS

The HLS (HTTP Live Streaming) protocol, developed by Apple, allows Live and VoD content to be delivered over the HTTP protocol. Currently standardized as RFC8216.

The protocol is supported by a large number of devices: set-top boxes (STB), SmartTV, different browsers (some have built-in support, some with JavaScript players), etc. But the standard implementation of the protocol can be considered Apple products — QuickTime Player, Safari web-browser, AVPlayer (a part of AVFoundationFramework), etc.

The basic principle of the HLS protocol is to segment the stream into small fragments (chunks), subsequently downloaded via the HTTP protocol. Using the HTTP protocol allows the stream to pass firewalls or proxy servers (as opposed to UDP-based protocols such as RTSP). The standard HTTP caches and HTTP-based content delivery networks can be used with HLS without any specialized software for video delivery.

At the beginning of the session, the device requests a master playlist containing metadata about the available streams (the so-called “variants”) and their characteristics: the type of tracks (audio, video, subtitles), bitrate, resolution, language, etc. After retrieving a list of available variants from the main playlist, the client device, based on the bandwidth and user preferences, selects the appropriate streams and requests media playlists for each stream containing media URLs.

When bandwidth changed or user choose another playback quality settings, the player can select another stream and, if possible, smoothly switch to it. As a rule, the player requires synchronization of key frames of video tracks and correspondence of chunks between all variants for smooth switching.

All playlists has the m3u8 format.

The main playlist can contain:

  • list of content variants depending on the bitrate (tag #EXT-X-STREAM-INF);
  • list of alternative tracks: audio, video, subtitles, Closed Captions (tag #EXT-X-MEDIA);
  • list of playlists for fast playback: the so-called “trickplay” (tag #EXT-X-I-FRAME-STREAM-INF), and other information.

The simplest master playlist for content with one “variant” may look like this:

The simplest media playlist (playlist.m3u8) for Live broadcast may look like this:

Support for multiple audio and subtitle languages in HLS can be implemented in two ways:

  • In accordance with RFC8216: for each language, there is a individual set of chunks and a individual playlist specified in the tag #EXT-X-MEDIA. So, alternative tracks are downloaded only when they are needed. As a rule, in this case, “main” data chunks contains only video and no other tracks — audio or subtitles (for the M4F container this is the only possible option).
  • In accordance with the MPEG2-TS standard: inside single TS-chunk. Each chunk contains a video track and a full set of audio tracks and subtitles. This method is not supported by all devices and is less preferred, because the subscriber device downloads all tracks, even when they are not needed.

The playlist with multiple audio tracks may look like this:

Only MPEG2-TS container was supported on Apple devices until 2016; in 2016 (iOS10 and later, macOS 10.12 and later, tvOS10 and later), support for the M4F container was added. The protocol does not impose limitations on codecs. The H.265 codec is supported on iOS11 devices (only with M4F container) since 2017.

MPEG-DASH

The MPEG-DASH (Dynamic Adaptive Streaming over HTTP) protocol, just like HLS, is based on the HTTP protocol and segmenting of a continuous stream into chunks. Unlike HLS, it was developed by the MPEG group and standardized as an ISO standard in 2012. The current standard version is ISO/IEC 23009-1:2014. In addition to the main standard, there are several sets of recommendations. The most known is DASH-IF Interoperability Points (DASH-IF-IOP). At the time of writing, the current version of DASH-IF-OP is v4.0.

All information about media data (the list of chunks, their duration, events in the stream, etc.) is contained in an XML file called Media Presentation Descriptor (MPD).

MPD has a multi-level nested structure. The simplified representation of this structure can be demonstrated as follows:

Image1

The MPEG-DASH standard involves dividing a continuous stream into periods. In the simplest case, there will be only one period, but in some cases (they will be considered below) there will be several periods.

Each period includes one or more so-called AdaptationSets. AdaptationSet, in turn, contains one or more Representations.

In fact, AdaptationSet is a “logical” stream: one video track, one audio track in a specific language, one subtitle track, etc. If the content contains several audio tracks (in different languages, for example), there will be several AdaptationSets. If several video tracks (for example, from different view angles or with different localizations), there also will be several AdaptationSets.

The stream, that will be delivered to the client, is a Representation. For example, if the video stream is encoded in several bitrates and the player can automatically switch between them — these are several Representations within the same AdaptationSet.

The composition of AdaptationSets within the period and the composition of Representations within the AdaptationSet of one period can not be changed. If such changes are necessary, the media server must generate a new period with a new set of AdaptationSets and Representations. In this case, Representation‘s identifiers representing the same stream must be preserved.

Representation contains information about the media chunks list. Unlike HLS, where each chunk should be explicitly listed in a playlist, MPEG-DASH has three options for content encoding and enumerating chunks in MPD:

  • SegmentBase. Suitable only for VoD content. The list of chunks should be contained in the sidx atom of the MP4 container. Only the sidx atom URL is described in MPD.
    If the content is encoded in the MP4 container, the
    sidx atom is usually placed in the same file, and sidx is specified by ByteRange in the indexRange attribute:
    In this example, there is a so-called Initialization Data (atom
    moov of the MP4 container) in bytes 0–684, and sidx atom in bytes 685–2192 .
    In case the content is encoded in the MPEG2-TS container, the
    sidx atom may be placed in a separate file:

<Representation id=“rep1” width=“1280” height=“720” mimeType=“video/mp4” codecs=“avc1.64001F” bandwidth=“1743409”>
      <BaseURL>vid_bw2500000.mp4</BaseURL>
  <SegmentBase timescale=“10000000” indexRange=“685-2192”>
          <Initialization range=“0-684”/>
      </SegmentBase>
</Representation>

In this example, there is a so-called Initialization Data (atom moov of the MP4 container) in bytes 0–684, and sidx atom in bytes 685–2192 .

In case the content is encoded in the MPEG2-TS container, the sidx atom may be placed in a separate file:

<Representation id=“rep1” bandwidth=“5000000” width=“1920” height=“1080”>
      <BaseURL>content.ts</BaseURL>
      <SegmentBase>
          <RepresentationIndex sourceURL=“content.sidx”/>
      </SegmentBase>
</Representation>

  • SegmentList. The URL of each chunk is specified explicitly. The duration of each chunk should be the same (in this case it is described in the duration attribute of the SegmentList tag) or described in the SegmentTimeline tag, as in the example below:

<Representation id=“0” width=“1920” height=“1080” mimeType=“video/mp4” codecs=“avc1.640028” bandwidth=“4500000”>
  <SegmentList timescale=“10000000”>
      <Initialization sourceURL=“vid_bw4500000_.mp4”/>
      <SegmentTimeline>
          <S d=“59999904” r=“99”/>
      </SegmentTimeline>
      <SegmentURL media=“vid_bw4500000_1.mp4”/>
      <SegmentURL media=“vid_bw4500000_2.mp4”/>
      <SegmentURL media=“vid_bw4500000_3.mp4”/>
      ….
        <SegmentURL media=“vid_bw4500000_100.mp4”/>
  </SegmentList>
</Representation>

  • SegmentTemplate. The URL of each chunk is generated from a template containing:

    • Representation’s identifier — $ RepresentationID $
    • Representation’s bitrate — $ Bandwidth $
    • chunk’s sequence number (identifier) — $ Number $
    • chunk’s start time — $ Time $

The chunk duration must be either the same or described in the SegmentTimeline tag. If all chunks have the same duration, an “endless” playlist, that describes the Live stream and does not require to update, can be created.

Representation example of the playlist with SegmentTimeline:

<Representation width=“1920” height=“1080” mimeType=“video/mp4” codecs=“avc1.640028” id=“0” bandwidth=“3141752”>
   <SegmentTemplate timescale=“10000000” startNumber=“1” media=“vid_bw4500000_$Number$.mp4” initialization=“vid_bw4500000_.mp4”>
       <SegmentTimeline>
           <S d=“59999904” r=“99”/>
       </SegmentTimeline>
   </SegmentTemplate>
</Representation>

Example of “endless” playlist’s Representation:

<Representation width=“1920” height=“1080” mimeType=“video/mp4” codecs=“avc1.640028” id=“0” bandwidth=“3141752”>
   <SegmentTemplate duration=“59999904” timescale=“10000000” startNumber=“1” media=“vid_bw4500000_$Number$.mp4” initialization=“vid_bw4500000_.mp4” />
</Representation>

The MPEG-DASH standard implies the use of two container types: ISO BMFF and MPEG-2 TS. It does not depend on the audio/video codecs used and supports various content protection schemes. However, de facto, MPEG-DASH implies the use of ISO-BMFF as a container and Common Encryption (CENC) for content protection, allowing you to encrypt and broadcast a single copy of the content to clients supporting different DRM systems.

Smooth Streaming

Smooth Streaming protocol allows to broadcast Live and VoD content similar to HLS and DASH protocols. As the client devices supporting the Smooth Streaming protocol, there may be various Silverlight players and devices, mobile devices running Windows Phone/Windows 10 Mobile and other devices.

Similar to the HLS and MPEG-DASH protocols, the Smooth Streaming protocol uses a fragmented structure of the media stream with HTTP delivery. The content is segmented and packed by the SmartMEDIA server, eliminating the need to install the IIS web server.

Smooth Streaming is the predecessor of the MPEG-DASH protocol and has fewer possibilities (for example, periods are not supported and the chunk duration of all tracks must match).

RTSP

The SmartMEDIA server also supports VoD and Live content streaming to devices supporting Real Time Streaming Protocol (RTSP). It can be software players and hardware devices, including QuickTime player (version 10 and higher), VideoLAN VLC player, various set-top boxes and other devices.

The RTSP protocol is now considered obsolete, and the number of modern RTSP-enabled subscriber devices that do not support HTTP-based delivery (HLS, MPEG-DASH, Smooth Streaming), is steadily decreasing. However, SmartMEDIA supports such devices, allowing you to cover a wider range of devices.

Glossary

CC

Continuity Counter — counts the packets with the same PID in the TS stream. Allows the decoder to detect packet loss. It can not be an unambiguous sign of packet loss, because the counter size (4 bits) allows storing only 16 values (from 0 to 15) and the probability of losing the number of packets, multiples of 16, is high enough. At the same time, CC violations can occur in case of incorrect merging several TS streams.

CDN

Content Delivery Network — serves to optimize the unicast traffic delivery in the operator’s network or over the Internet.

Chunks

Content segments referenced by the playlist.

Demultiplexing

The process of obtaining elementary streams (audio, video and text) from media container.

DRM

Digital Rights Management — software or soft hardware restricting or preventing unauthorized access (copying, modification, viewing, etc.) to the content, or allowing to track such actions. DRM is a set of access control systems.

DTS

Decoding Time Stamp is used to indicate the order of frames decoding. Typically, frames in TS and MP4 containers are arranged in the order of DTS increasing.

DVR

Digital Video Recording — the possibility of digital TV-broadcasting, meaning recording and storing incoming streams (video, audio, text, metadata). Can be implemented both on the subscriber device (LocalDVR) and on the service provider equipment (Network DVR, nDVR). In particular, nDVR allows to implement such digital TV services as nPVR and Pause Live.

Elementary stream

The stream generated by the audio or video encoder. Contains only one kind of data — video, audio, subtitles, PCR or others.

Manifest

see Playlist. The term is used for the DASH protocol.

Media container

Media container (or container) — a format for storing video, audio and text data with synchronization marks between them. Several media streams of the same type can be stored in the media container, e.g. a movie (video stream) with several audio tracks (audio streams) and subtitles (text streams). The media container determines the size and structure of the attached data, but does not specify the encoding standard. Some of the most popular media containers today are MPEG-TS, MP4, MKV, MOV, AVI, 3gp, etc.

Multiplexing

Multiplexing (or muxing) — an operation or process of packaging elementary video and audio streams into a single media container with time synchronization.

nPVR

Network Personal Video Recorder — a digital TV service allowing the subscriber to record current broadcast and watch it later. The recording is performed on the service provider site. See also DVR.

Pause Live

The digital TV service allowing the subscriber to pause the current broadcast and resume playback later. The maximum broadcast suspension time may be limited by the service provider.

PID

Packet Identifier — the identifier of the packet in the TS stream. Packets containing fragments of the same elementary stream have the same PID by which they are recognized by the decoder.

Playlist

A file containing the data needed to play content on the subscriber device (including links to chunks). For more information, see: – https://tools.ietf.org/html/rfc8216#page-6 (for HLS), – https://www.iso.org/standard/65274.html (for DASH).

PMT

Program Map Table — the program structure table in the TS stream. PMT contains a list of all elementary streams of the program with their PIDs. SmartMEDIA supports TS streams with only one PMT (SPTS).

PTS

Presentation Time Stamp is used to specify the sequence of frames appearing on the screen. May differ from the decoding sequence in order to optimize the stream compression.

Remultiplexing

The process or operation of changing one media container to another one without elementary streams transcoding.

S3

Amazon Simple Storage Service is an online web service provided by Amazon Web Services. For more information, see https://aws.amazon.com/en/s3/details/.

Stream coding

Compression of audio or video stream using certain algorithms (codecs).

Stream decoding

Obtaining an uncompressed stream (a sequence of uncompressed frames for video or PCM stream for audio) from a compressed (encoded) stream.

TSTV

Time Shifted TV — a digital TV service allowing the subscriber to playback finished broadcasts.

Transcoding

The process or operation of changing the codec (compression algorithm) of the audio or video stream.

VoD

Video on Demand — a service of personal delivery of movies, series and TV program archives over the digital cable, satellite or terrestrial TV network.

Installation

This section provides a detailed guide on how to install the SmartTUBE Server, as well as recommendations on the characteristics
of the equipment used.

SmartTUBE Server Installation

The initial deployment of the SmartTUBE server is usually carried out by SmartLabs specialists during the project commissioning phase. This document serves as a reference guide for advanced users who intend to set up a distributed component structure, where each component is installed on a separate machine. It also provides information on integrating with your existing databases and configurations.

SmartTUBE installation requires manual configuration from a repository. Please follow the steps outlined below to successfully install SmartTUBE.

  1. Connect the repository (for the repository details contact the SmartLabs official representative).
  2. Install Java JDK from the repository:

# yum -y install smartlabs-java8-stub


Alternatively, you can download the rpm-package from the official source http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and install it:

# rpm -ivh <package_name>

  1. Install and run Elasticsearch (reference guide: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/rpm.html):
  2. Import the Elasticsearch PGP Key:

# rpm –import https://artifacts.elastic.co/GPG-KEY-elasticsearch

  1. Create a file called elasticsearch.repo in the /etc/yum.repos.d/ directory:

[elasticsearch]

name=Elasticsearch repository for 7.8 packages
baseurl=https://artifacts.elastic.co/packages/7.8/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md

  1. Install Elasticsearch:

sudo yum install –enablerepo=elasticsearch elasticsearch-7.8.1

  1. The RPM for Elasticsearch v7.8.1 can be downloaded from the website and installed as follows:

# yum -y install wget