Pauls DVB Tools
This server application implements a Service List Registry as defined by the DVB-I Service Discovery and Content Metadata specification - A177r6 in clause 5.1.3.2.
The application works by reading in a reference/master XML document and then pruning out any provider and service offerings that do not match the specified query parameters. Per A177r2, the allowed query parameters added to the /query are
- TargetCountry
- regulatorListFlag
- Delivery
- Language
- Genre
- ProviderName
- inlineImages default is "false"
These parameter names are case sensitive and the comparisons made with their values are also case sensitive against the master Service List Entry Points Registy (SLEPR)
Note that these values are case sensitive, and a case sensitive matching is performed with the values, thus "AUT" != "aut"
- Clone this repository
git clone --recurse-submodules https://github.com/paulhiggs/dvb-i-tools.git
- Install necessary libraries (express, libxmljs, morgan)
npm install
- Edit the Service List Entry Point Registry XML document (
slepr-master.xml
) as needed - run it -
node csr.js [--port 3000] [--sport 3001] [--file ./slepr-master.xml] [--CORSmode library]
The server can be reloaded with an updated slepr-master.xml
file by invoking it with /reload, i.e. http://localhost:3000/reload
- --port [-p] set the HTTP listening port (default: 3000)
- --sport [-s] set the HTTPS listening port (default: 3001)
- --urls [-u] load configation from network locations (default: use local files)
- --file [-f] name of the master registry file to use, can be an http(s) URL (default: ./slepr-master.xml)
- --CORSmode [-c] select the type of CORS handling
- "library" - default mode - use the Express CORS library
- "manual" - do code based CORS header insertion (not fully implemented or tested)
- "none" - dont do any CORS handling
- --help [-h] server and client command help
If you want to start an HTTPS server, make sure you have selfsigned.crt
and selfsigned.key
files in the same directory. These can be generated (on Linux) with sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./selfsigned.key -out selfsigned.crt
DVB-I Service List validator
Validates the value space of the instance document, validation against the schema should be performed seperately (for now) Supports
- the :2019 schema
- the :2020 schema with its classification scheme updates
- the :2021 schema with its classification scheme updates
- the :2022 schema
- the :2022b schema
- the :2023 schema
- the :2024 schema (latest details)
Checks performed:
- validation against the appropriate schema
- channel numbers are not duplictaed in LCN tables
- region identifiers are unique
- service identifiers are
- unique
- formatted according to the TAG URI scheme
- country codes are valid against ISO3166 aplha 3 for region tables and delivery parameters for DVB-T and DVB-C
- regions are not excessively nested
- @countryCodes attribute is not specified for sub-regions
- ServiceGenre is selected from
- TV Anytime ContentCS
- TV Anytime FormatCS
- DVB ContentSubjectCS
- AudioAttributes@href and AudioConformancePoints@href (deprecated in A177r5) accorinding to
- DVB AudioCodecCS and DVB AudioCodecCS:2020
- MPEG7 AudioCodingFormatCS
- DVB AudioConformancePointsCS
- VideoAttributes@href and VideoConformancePoints@href accorinding to
- DVB VideoCodecCS and DVB VideoCodecCS:2020
- MPEG7 VisualCodingFormatCS
- DVB VideoConformancePointsCS
- ServiceType according to DVB ServiceTypeCS-2019
- TargetRegion for the Service List, LCN Table and Services are defined in the region table
- Validation of <RelatedMaterial> for Service List, Service, Service Instance, Content Guide Source
- Unique @CGSID values
- <ContentGuideSourceRef> refers to a <ContentGuideSource> in the <ContentGuideSourceList>
- <ContentGuideServiceRef> for a servie is not the same as the <UniqueIdentifier> (warning)
- <SourceType> is according to specification and appropriate DeliveryParameters are provided (note that <SourceType> is deprecated)
- For <DASHDeliveryParameters>
- valid @contentType in <UriBasedLocation>
- only one element for each @xml:lang is specified in any mpeg7:TextualType element
- SAT>IP parameters are only specified with DVB-T or DVB-S delivery parameters
- unique service prominence values
- unigue global and national parental rating values for services and program metadata
- correct use of accessibility features and applications signalling
<server>/check gives a basic/primitive UI. Enter the URL to your service list or a local filename and press "Submit" button. Await results!
- Clone this repository
git clone --recurse-submodules https://github.com/paulhiggs/dvb-i-tools.git
- Install necessary libraries (express, libxmljs, morgan)
npm install
- run it -
node validate_sl [--port 3010] [--sport 3011]
If you want to start an HTTPS server, make sure you have selfsigned.crt
and selfsigned.key
files in the same directory. These can be generated (on Linux) with sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./selfsigned.key -out selfsigned.crt
Occassionally, the language-subtag-registry file can be updated from https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
- --urls [-u] forces the classification scheme, country and language values to be read from the internet. Default is to load values from local files.
- --port [-p] set the HTTP listening port (default: 3010)
- --sport [-s] set the HTTPS listening port (default: 3011)
DVB-I Content Guide validator
Validates the value space of the instance document, validation against the schema should be performed seperately (for now)
Checks performed:
- ensure only the permitted elements are present in <ProgramDescription>
- <BasicDescription> sub-elements (<Title>, <Synopsis>, <Keyword>, <Genre>, <CreditsList>, <ParentalGuidance>, <RelatedMaterial>) in <ProgramInformation>
<server>/check gives a basic/primitive UI. Enter the URL for a content guide query and the type of query/response from the endpoint. Press "Submit" button and await results!
<server>/checkFile gives a basic/primitive UI. Select the file containing a DVB-I content guide metadata fragment and the type of response from the endpoint. Press "Submit" button and await results!
- Clone this repository
git clone --recurse-submodules https://github.com/paulhiggs/dvb-i-tools.git
- Install necessary libraries (express, libxmljs, morgan)
npm install
- run it -
node validate_cg [--urls] [--port 3020] [--sport 3021]
If you want to start an HTTPS server, make sure you have selfsigned.crt
and selfsigned.key
files in the same directory. These can be generated (on Linux) with sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./selfsigned.key -out selfsigned.crt
- --urls [-u] forces the classification scheme, country and language values to be read from the internet. Default is to load values from local files.
- --port [-p] set the HTTP listening port (default: 3020)
- --sport [-s] set the HTTPS listening port (default: 3021)
Implements csr.js, validate_cg.js and validate_sl.js in a single node
Same as for the individual applications
<server>/check gives a basic/primitive UI. Select the valildation type (service list or Content Guide) and provide either a URL or local file. Press "Validate!" button. Await results!
<server>/validate_sl?url=<service_list_url> gives the validation results of the service list in the "url"-parameter as HTML, same format as the /check validation. Also accepts POST request with the servicelist in the request body with content type "application/xml". The url query parameter in the POST request can be used to show the name of the list in the resulting HTML
<server>/validate_sl_json?url=<service_list_url> valdiates the list in the "url"-parameter and gives the number of errors, warnings and informationals as JSON. Also accepts POST request with the servicelist in the request body with content type "application/xml" instead of the url query parameter. Example response:
{
"errors":1,
"warnings":0,
"informationals":0
}
<server>/validate_sl_json?url=<service_list_url>&results=all valdiates the list "url"-parameter and gives the complete validation results as JSON. Also accepts POST request with the servicelist in the request body with content type "application/xml" instead of the url query parameter. Example response:
{
"errs":
{
"countsErr":[],
"countsWarn":[],
"countsInfo":[],
"errors":[
{
"code":"SL005:6",
"message":"Error: Element '{urn:dvb:metadata:servicediscovery:2024}Service': Missing child element(s). Expected is one of ( {urn:dvb:metadata:servicediscovery:2024}ServiceName, {urn:dvb:metadata:servicediscovery:2024}ProviderName ).\n",
"element":" <Service version=\"1\">","line":3
}
],
"warnings":[],
"informationals":[],
"markupXML":[
{"value":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>","ix":1},{"value":"<ServiceList xmlns=\"urn:dvb:metadata:servicediscovery:2024\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema‑instance\" id=\"tag:example.com,2024:list1\" version=\"20240611115822\" xml:lang=\"en\">","ix":2},
{"value":" <Name>List</Name>","ix":3},
{"value":" <ProviderName>Provider</ProviderName>","ix":4},
{"value":" <Service version=\"1\">","ix":5,
"validationErrors":[
"(E) SL005:6: Error: Element '{urn:dvb:metadata:servicediscovery:2024}Service': Missing child element(s). Expected is one of ( {urn:dvb:metadata:servicediscovery:2024}ServiceName, {urn:dvb:metadata:servicediscovery:2024}ProviderName ).\n"
]
},
{"value":" <UniqueIdentifier>tag:example.com,2024:ch1</UniqueIdentifier>","ix":6},
{"value":" <ServiceName>Service</ServiceName>","ix":7},
{"value":" </Service>","ix":8},
{"value":"</ServiceList>","ix":9}
],
"errorDescriptions":[]
}
}
- Clone this repository
git clone --recurse-submodules https://github.com/paulhiggs/dvb-i-tools.git
- Install necessary libraries (express, libxmljs, morgan)
npm install
- run it -
node all-in-one [--port 3030] [--sport 3031] [--CORSmode library]
If you want to start an HTTPS server, make sure you have selfsigned.crt
and selfsigned.key
files in the same directory. These can be generated (on Linux) with sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./selfsigned.key -out selfsigned.crt
- --urls [-u] forces the classification scheme, country and language values to be read from the internet. Default is to load values from local files.
- --port [-p] set the HTTP listening port (default: 3030)
- --sport [-s] set the HTTPS listening port (default: 3031)
- --nocsr do not start the CSR function
- --nosl do not offer service list validation
- --nocg do not offer content guide validation
- --CORSmode [-c] select the type of CORS handling
- "library" - default mode - use the Express CORS library
- "manual" - do code based CORS header insertion (not fully implemented or tested)
- "none" - dont do any CORS handling
- Clone this repository
git clone --recurse-submodules https://github.com/paulhiggs/dvb-i-tools.git
- run it -
docker compose up