Skip to main content
Skip table of contents

Content export to SeaChange

General architecture

The CEX-SEAC module provides a way to export live events from OpenTV Platform to be ingested into SeaChange Stagis.

Processing logic

CEX-SEAC generates one file per channel, containing the events for the current day and a number of days into the future as specified in the configuration file (see below).

Within each file, the module assigns unique IDs to events by calculating the ID from the event's start time and date (in minutes).

The file contains the following data:

  • Service name prefixed with the tenant name
  • For each event:
    • Event ID
    • Event name
    • Time window (start, end)
    • Parental rating
    • Short description
    • Extended event description

Note that:

  • Every export is a full export, not a delta.
  • Only live events for broadcast channels are exported.
  • One file is produced for each channel each time.
  • The module produces event data for a configurable number of days,
  • Events are not sorted based on start and end times.
  • Only editorial channel numbers/IDs are used for configuration.
  • The module converts parental ratings to DVB ratings according to the configured conversion table (see below).
  • The module uses the ISO3 country code for the parental rating, as configured (see below).
  • The module does not process error files generated by SeaChange.
  • The module uploads the files it generates via FTP to a single location specified in the configuration.
  • The module converts the country/language code from OpenTV format into ISO ALPHA-3 format.
  • If no events are available for the given service ID for the given time window, no XML output will be generated.
  • The module uses the standard OpenTV Platform logging solution.
  • The module generates export data periodically (for example, daily) according to the schedule defined in the configuration file (see below).
  • For a particular service, the name of the generated file is always the same.
  • If a file with the same name as the generated file already exists at the defined destination location, the new file overwrites it.
  • The file extension is always xml (lower case).
  • The module uses UTC for all dates.
  • Within each file, event IDs are unique. They are calculated from the event's start time and date (in minutes).
  • The name of the output file is <tenantName>_<serviceName>.xml
  • Where service ID is referenced in the XML data, it will use the same format as in the filename – <tenantName>_<serviceName>.
  • The module normalises the file name and service ID reference so that they only contain upper or lowercase letters, numbers, and underscores. Any other characters will be replaced by underscores.
  • For managing the scramble flag, the module assumes that all technical versions of the service are fully scrambled.

ShortEventDescriptor processing

The SeaChange ShortEventDescriptor has a maximum length of 256 bytes. Within this, the event name element has a maximum length of 130 bytes. The text element gets the remainder of the 256 bytes.

So when processing the event name and description, the module:

  1. Truncates the event name to 130 bytes.
  2. Tokenises the event description such that:
    1. One token is added as the ShortEventDescriptor text element (256 bytes minus the length of the event name).
    2. The other token is added in the ExtendedEventDescriptor field.

File name

By default, the names of the generated files will have the following form:

<tenantName>_<serviceName>.xml

Each run of the export creates a new set of XML files that is uploaded via FTP and overwrites any existing files with the same names.

File transfer mechanism

The FTP transfer is done in two steps, first the file is copied into the remote target directory with a temporary file extension suffix. Then secondly, once the file transfer is complete, the file is renamed by removing the temporary suffix.  This two-step process ensures that the file consumer does not try to access the file before it has been fully transferred.

For the FTP transfer, the CEX acts as an FTP client, with the FTP server role taken by the target system.

The target system is responsible for deleting the transferred XML files once it has processed them, either successfully or not.

If a network error occurs during the file copy, the transfer will be aborted. The CPM relies on the FTP server to clean up any partially copied files when such errors occur.

Reference information

Configuration files

application.properties

This file contains the following properties and their values:

  • server.port – CEX-SEAC module port number on which server will run. By default it runs on port 8581.
  • cpmRestApiEndpointUrl – CPM service URL

live_APS1.properties

This file contains the following properties and their values:

  • providerIdentifier – the provider identifier. This must be the same as in the CIMGOC module.
  • channelList – a list of channel IDs (Gracenote service IDs), in comma-separated format. of the channels for whicheEvents are to be extracted. For example, channelList=12345, 45789, 02212, 20569.
  • extractionOffsetFromNow – the time offset value for now date, in seconds. If it is negative value, then it will also include events dated in the past date.
  • extractionWindow – the amount of time for which events should be exported, expressed in seconds
  • destinationFolder – the URI of the directory to which the files will be FTP'd. If the directory does not exist, it will be created. For example, ftp://root:Superuser@ftphp02//data/ml-sp-cex-seac-core/exportFiles/.
  • cron – a cron expression to configure the fetching timer. To preserve valid URI encoding, we allow + to be used instead of space (see http://camel.apache.org/quartz.html).
  • exportFileName – pattern for the generated export file name. The following special {CHANNELID} key can be used – it will be replaced by the actual channel ID (which is mapped to the service name).
  • ratingTable – the FCC-to-DVB mapping values. For example. TV14:14. Mappings must be seperated by semicolons (;). If a value is encountered for which no mapping is defined, it will get a value of 0. 
  • ratingCountryCode – the default ISO-3 country code for the parental ratings. For example, USA.
  • eventGroupSize – the batch size for CPM calls. If the number of events is greater than this, multiple calls will be made accordingly.
  • tenant – the tenant name


Parental rating translation

Example (actual values are defined in the configuration file):

Value on OTV Platform

Value in the export file to SEAC (DVB value)

0, TVY0
C, G, TVY77
TVG, C8, TVPG

9

PG13
1515

Data mapping

Seachange Data Identifier 

OTV Platform Data Identifier 

Description 

Service.id 

EditorialChannel.id 

The ID of the service for which the events are added as part of the export file. This is prefixed with the tenant name.

Event.id 

Auto generated by CEX-SEAC

Event ID – auto-generated by CEX-SEC module.

The CPM Event ID is not be used, as the SeaChange EventIdRef is an unsigned short, whereas CPM Event ID is a string.

Event.nameEvent.nameEvent name

Event.start 

Event.start 

Event start time in UTC

Event.stop 

Event.end 

Event end time in UTC

ParentalRatingDescriptor.rating 

Event.MetaDataSet[Rating] 

DVB rating code value

ParentalRatingDescriptor.country 

Defined by configuration in CEX-SEAC

Country of rating value issued. This value is mandatory in the SeaChange XSD.

The CEX-SEAC module has a static configuration to define this value.

ExtendedEventDescriptor.text 

EditorialContent.MetaDataSet[Synopsis] 

Or Event.MetaDataSet[Synopsis] 

  

Event extended synopsis or description.

Its value is as follows:

  • EditorialContent.MetaDataSet[Synopsis] if the event is linked to editorial content 
  • Event.MetaDataSet[Synopsis] if it is not
ExtendedEventDescriptor.languageCodeComing from metadata providerOptional data field

ShortEventDescriptor.EventName 

Event.name 

Its value is as follows:

  • EditorialContent.MetaDataSet[title] if the event is linked to editorial content
  • If it is not linked to editorial content:
    • ContentGroup.MetaDataSet[title] if it is a series.
    • If it is not a series:
      • Event.MetaDataSet[title] if it has a value
      • Event.name if it does not

ShortEventDescriptor.text 

EditorialContent.MetaDataSet[Description] or Event.MetaDataSet[Description] 

  

The short synopsis or description of the event.

Its value is as follows:

  • EditorialContent.MetaDataSet[Description] if the event is linked to editorial content 
  • Event.MetaDataSet[Description] if it is not
ShortEventDescriptor.languageCode Coming from metadata providerOptional data field
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.