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.

CONTENTS