Skip to content

How to save nPVR recordings

One of the most important differences between an IPTV OTT service and linear TV is access to the broadcast archive. This article describes how to ensure the preservation of TV programs that a customer has set aside for long-term storage. At the same time, the remaining unnecessary part of the archive should be deleted to free up disk space.

Until 2023, we offered a mechanism called DVR locks to solve this problem, but it was abandoned because it scales very poorly and is even worse for backup.

This document does not address the task of ensuring transparent access to TV broadcasts when transferring the archive from hot storage to cold storage as individual video files. This extended task is handled by Flussonic Central, which is recommended for use. Here, the basic method with just Media Server is described.

In some countries, recording the archive by the operator may either be prohibited or require separate agreement/regulation.

Meanwhile, recording a broadcast to a set-top box for personal use by subscribers is generally permitted. Recording to a set-top box constitutes a significant increase in the service cost, as it requires selling a more expensive device to each subscriber, which includes an additional component that can wear out.

nPVR (network Personal Video Recorder) provides a good solution to this issue: a subscriber orders the recording of a broadcast, and it is saved on the server and stored upon their request.

Solution Scheme

  • The client's server must receive EPG and save the TV programs in the database as separate records.
  • Based on subscribers' preferences, the client's server should mark the demanded necessary TV programs as protected from deletion.
  • The Media Server will regularly request a list of episodes from the client's server for each stream that needs to be kept in the archive.
  • If this list of episodes is given as TV programs, they will be saved in the archive as long as there is enough disk space.

Interaction between Media Server and Client's Server

To activate the episode polling mechanism, the client's server must:

In the external_episodes_list method, it is very important to pay attention to the media parameter with the list of requested streams. The absence of data for a stream in the response means the deletion of the entire archive for that stream. That is, returning an empty list means deleting the archive for all streams listed in the media parameter.

In this response, it is permissible to return a 400 or 500 code if, for some reason, there is no ready response with the list of episodes.

How will it work?

  • Media Server is configured with a stream archive depth of, for example, 3 days of continuous archive.
  • All settings are received through config_external from the server that sends the signaling header X-Config-Server-Episodes: true.
  • Based on this, periodically, Media Server makes a request to external_episodes_list, polling the ranges scheduled for cleaning.
  • Those archive fragments that are covered by episodes remain in place, while the rest are deleted.

Exporting Recordings as Files

In cases where long-term storage with infrequent access is required, it makes sense to export archive fragments as files to a separate external storage.

This task is handled by Flussonic Central.