Smarty

  1. Home
  2. Docs
  3. Smarty
  4. Content customization
  5. Video library from archive records

Video library from archive records

Starting with the version of Smarty 1.78.3, the operator has the opportunity to configure its own video library for its service, consisting of archival records of films, TV series, programs, etc.

This section displays automatically created collections of recorded programs with filtering by genre.

Section "Archive" in the futuristic template

Release 2.2 added a new mode of displaying archival records - Video Archive. In this mode, a special team make_vodpvr creates Video objects based on past transmissions with archival recording. This mode allows you to display archival records in the general directory of films, as well as enrich the Archive section with all the functionality that ordinary films already have – filters, actors, directors, seasons and episodes.

Archive based on EPG collections

1. Configure the categories of archival records

To filter the recordings, transmission categories (Program category objects in the Smarty administration service panel) displayed in the sections of TV channels (section “TV by interests” in the template will be used impulsive, section "TV" in templates futuristic and infinitly). If at the time of setting up this section, these categories have not yet been created, then you should start with instruction by setting them up.

In order for the EPG category to be displayed in the Archival Records section, you should additionally install the “Use for the Archival Records List” checkbox for it:

EPG category editing form in the administration service panel

2. Creating selections from EPG

Once EPG categories are configured, you need to create collections for archival records. Selection in this context is a combination of program objects in EPG by name (required to combine series of series and programs in seasons, different parts of films in packages). The selection team:

smarty_manage epg_import create_content -settings=settings.

This command should be added to crontab for regular execution (we recommend simply adding the option) create_content c the current EPG import command, as the required frequency is the same.

3. Setting up the caching of selections

Obtaining collections of archival records on the fly is quite a difficult and long request for applications, so to optimize it, you need to add to the list crontab offline caching command collections:

smarty_manage cache_record_list -categories -settings=settings.

The team has 3 possible parameters:

-categories - add filters by category to the cache (for display in the Archive screen in the left column of EPG categories)
-genres - add filters by genre to the cache (for display in the Archive screen in the left column of EPG genres)
Category_skip_ids - the ability to remove selected categories from the caching program.
-genre_skip_ids - the ability to remove the selected genres from caching.
-client_id Create cache only for a specific Client.

The frequency of the launch of this command is recommended to be selected individually for your service, depending on the number of channels with records and server capacity (starting from 20 minutes or more).

To optimize the work of this team, you can use the options below:

  • TVMIDDLEWARE_PROGRAM_RECORD_LIST_DONT_CHECK_BLOCKS - meaning True true checking the transmission for lockdown is turned off. If the functionality of blocking archive transmissions is not used, we recommend to enable this option.
  • TVMIDDLEWARE_PROGRAM_RECORD_LIST_MINIMUM_LENGTH - excludes from the sample for the screen "Archive" transmission shorter than N seconds. By default 900.
  • TVMIDDLEWARE_PROGRAM_RECORD_DAYS Excludes programs older than N days from the cache. By default 5.
  • TVMIDDLEWARE_PROGRAM_RECORD_ONLY_FINISHED - meaning True true in the API-method to obtain a list of records in the screen "Archive" will not be transmitted as yet unfinished transmissions. Data type: bool. By default False.

4. Setting up cleaning of outdated collections

When archival records become obsolete, the collections that contained them become empty. To remove empty collections, you should configure the command:

smarty_manage clean_old_records -client_id=1 -settings=settings.

The recommended frequency of launch is once a day, but if desired, it is possible less often.

5. Inclusion of a new section in the interface

The final step of setting up the new section is to enable it for devices in the Smarty administration panel:

Form of device editing

6. [Optional] Configuring the return of archival records feeds

In some integrations with media platforms, it is sometimes necessary to be able to give so-called feeds – meta information about the content of the service.

Training of feeds is carried out by the management team cache_record_feed:

smarty_manage cache_record_feed -client_id=1 -settings=settings.

After testing the command (we suggest adding it to the crown), you can get a list of feeds at the address below:

http://smarty.example.com/tvmiddleware/record/feed/<client_id>

Video archive

1. Setting up mapping genres

In the Django administration panel, you need to find EPG-to-Video genre mapping objects and create the necessary bundles of video and EPG genres.

2. Verification of EPG source

Make sure you have the right fields in the EPG source:

  • posters in 2:3 format, example tag:
<icon type="poster" position="vertical" aspect-ratio="2:3" official="true" text="true" src="http://example/pic/3210202"/>
  • episode and season numbers for series, examples of tags:
1
14

3. Setting up the team make_vodpvr

Next, you need to add the execution of the command to the crown make_vodpvrpossible parameters of which can be found in general documentation.

4. Configure the display in applications

The video archive is currently supported in the following interfaces:

  • new mobile client - there it is displayed by default in the "Archive" section
  • sibseti template – you can enable the display of archival records inside the “Kinosal” section using the option show_archive_in_vod_screenYou can replace the entire "Archive" section with the new mode using the option archive_screen_mode.

Frequently asked questions

What is the difference between the first and second way to set up a video library from archive records?

The first method allows you to make archival records in a separate section, preferably in the absence of vertical transmission posters in the EPG source. As well as fresh archival records will appear in the section at each opening - everything that has managed to be recorded at the moment is displayed.

The second method is suitable for those who want to "mix" archival records in the "Video" section, and is also a more optimized tool for displaying archival records in a separate section (at the moment a separate section is available only for the Sibseti template). This requires vertical transmission posters at the EPG source.

Where do the covers (posters) for collections in the Archive section come from?

The cover of the collection uses a preview of the program imported from the EPG source. If the EPG source does not provide a transmission preview, the application displays a standard stub picture for the selection.

How is the depth of archival records configured for this section?

The depth of the archive coincides with the configured depth of the archive for the channels (configured for the streaming service and redefined on the channel page). However, in the event that the configured depth of the archive for the channel is greater than the depth of the existing program, the depth of the recording will be limited by the depth of the existing program.

Is it possible to separately charge access to this section for subscribers?

The old regime: the subscriber will be available records from all available channels.
For records from channels "with locks" at launch will be displayed a warning about the inaccessibility of recording, or the display of a stream-stub and banner.
The new regimetariffs for created archival films are specified in the team for their creation at the configuration stage.

In which templates is this section already available?

At the moment in the templates futuristic (old mode + the option of "mixing" archival films in the Video library), sibseti and red.

Why in the new mode does not work rewinding archival films, but in the old one works?

Rewinding recording in the old mode is not made by the player, but by re-requesting the link to the stream from a specific position, rewinding in the new mode works with the player, so for the correct operation of rewinding in the new mode, we recommend using archive streams in the HLS format.