Pre-scanned channel files: what it is and how to use them

DVBLink Remote API clients and tools

Pre-scanned channel files: what it is and how to use them

Postby Oberon » Tue Nov 06, 2012 2:22 pm

What are "channel files"?
Channel files store information about pre-scanned channels and can be used to populate the DVBLink source channel tree without doing channel scan on the actual hardware.

Channel files implement the concept of differentiation between logical and physical channel properties - e.g. the visible (logical) channel characteristics like name, number etc. and the characteristics required for tuning the channel (physical) like frequency, modulation, fec etc. This allows for easy modification of physical channel properties in case channel moving to another transponder, without affecting the rest of the system.
Channel files introduce a "virtual receiver". Virtual receiver is a counterpart of the actual physical tuner and has a collection of channels that this physcal tuner can receive.

How to use channel files
Channel files should be put into "channel_files" folder in DVBLink installation directory.
Virtual receivers from channel files appear in the TV Provider combobox of a TVSource web configuration interface.

Channel file format
Channel file has xml formatting and its general structure is shown below:
Code: Select all
<channel_data>
   <receivers>
      <receiver>
         <channels>
            <channel/>
               <pchannel/>
            </channel>
            <channel/>
               <pchannel/>
            </channel>
            ...
         </channels>
      </receiver>
      ...
   </receivers>
   <sats>
      <sat/>
      ...
   </sats>
   <providers>
      <provider/>
      ...
   </providers>
</channel_data>


Structures and their data fields
<receiver>
Receiver has the following data fields:
Code: Select all
   <name> - Human readable receiver name
   <id> - Unique receiver id
   <signal> - Signal type that this receiver supports. Can be dvb-s, dvb-c, dvb-t


<channel>
Channel has the following data fields:
Code: Select all
   <id> - Unique logical channel id
   <name> - Channel name
   <num> - Channel (major) number
   <subnum> - Channel minor number
   <provider_id> - Provider id to which this channel belongs. It is a reference to a provider described in the <providers> section of a channel files
   <auto_sync> - Flag to automatically synchronize this channel with the selected DVBLink channels


<pchannel>
This structure defines physical characteristics of the channel and its contents depends on the signal type:
common to all types
Code: Select all
   <type> - Channel type: tv, radio, other
   <encrypted> - If present, shows that channel is encrypted

dvb-s channel
Code: Select all
   <sat_id> - Satellite id on which this channel resides. It is a reference to a satellite described in the <sats> section of a channel files
   <nid> - Network id
   <tid> - Transponder id
   <sid> - Service id
   <transponder> - defines physical transponder properties:
      <freq> - Frequency in KHz
      <pol> - Polarity: v, h, l, r
      <sr> - Synbol rate in Ks/c
      <fec> - Inner FEC: auto, 12, 13, 14, 23, 25, 34, 35, 45, 56, 67, 78, 89, 9a, 5b
      <mod> - Modulation: qpsk, 8psk, nbc-qpsk, 16apsk, 32apsk
      <dvb_s_type> - DVB-S type: dvb-s, dvb-s2

dvb-c channel
Code: Select all
   <nid> - Network id
   <tid> - Transponder id
   <sid> - Service id
   <transponder> - defines physical transponder properties:
      <freq> - Frequency in KHz
      <sr> - Synbol rate in Ks/c
      <mod> - Modulation: qam4, qam16, qam32, qam64, qam128, qam256

dvb-t channel
Code: Select all
   <nid> - Network id
   <tid> - Transponder id
   <sid> - Service id
   <transponder> - defines physical transponder properties:
      <freq> - Frequency in KHz
      <band> - Bandwitdh: 6, 7, 8
      <dvb_t_type> - DVB-T signal type: dvb-t, dvb-t2


<sat>
This structure describes a satellite and has the following data fields:
Code: Select all
   <name> - Satellite name
   <id> - Unique satellite id


<provider>
This structure describes a provider and has the following data fields:
Code: Select all
   <name> - Provider name
   <id> - Unique provider id


Channel file example
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<channel_data>
   <receivers>
      <receiver>
         <name>CanalDigitaal</name>
         <id>5226e12e-10e3-41d5-8ac1-607662f97d8e</id>
         <signal>dvb-s</signal>
         <channels>
            <channel>
               <id>ce2c6ce8-8c2b-4d22-a87e-0d9fdfe32b78</id>
               <name>Ned1 HD</name>
               <num>1</num>
               <provider_id>46049f68-5555-47a9-a751-c23934ec4103</provider_id>
               <pchannel>
                  <type>tv</type>
                  <encrypted/>
                  <sat_id>46049f68-d689-47a9-a751-c23934ec4103</sat_id>
                  <transponder>
                     <freq>10935000</freq>
                     <pol>V</pol>
                     <sr>22000</sr>
                     <fec>23</fec>
                     <mod>8PSK</mod>
                     <dvb_s_type>dvb-s2</dvb_s_type>
                  </transponder>
                  <nid>100</nid>
                  <tid>100</tid>
                  <sid>100</sid>
               </pchannel>
            </channel>
            <channel>
               <id>4f3852bc-3ad5-4319-885b-fb7b26570ccc</id>
               <name>Ned2 HD</name>
               <num>2</num>
               <provider_id>46049f68-5555-47a9-a751-c23934ec4103</provider_id>
               <pchannel>
                  <type>tv</type>
                  <encrypted/>
                  <sat_id>46049f68-d689-47a9-a751-c23934ec4103</sat_id>
                  <transponder>
                     <freq>10935000</freq>
                     <pol>V</pol>
                     <sr>22000</sr>
                     <fec>23</fec>
                     <mod>8PSK</mod>
                     <dvb_s_type>dvb-s2</dvb_s_type>
                  </transponder>
                  <nid>101</nid>
                  <tid>102</tid>
                  <sid>103</sid>
               </pchannel>
            </channel>
            <channel>
               <id>4f3852bc-1111-4319-885b-fb7b26570ccc</id>
               <name>Ned3 HD</name>
               <num>3</num>
               <provider_id>46049f68-5555-47a9-a751-c23934ec4103</provider_id>
               <pchannel>
                  <type>tv</type>
                  <encrypted/>
                  <sat_id>46049f68-2222-47a9-a751-c23934ec4103</sat_id>
                  <transponder>
                     <freq>10935000</freq>
                     <pol>V</pol>
                     <sr>22000</sr>
                     <fec>23</fec>
                     <mod>8PSK</mod>
                     <dvb_s_type>dvb-s2</dvb_s_type>
                  </transponder>
                  <nid>201</nid>
                  <tid>202</tid>
                  <sid>203</sid>
               </pchannel>
            </channel>
         </channels>
      </receiver>
   </receivers>
   <sats>
      <sat>
         <name>Astra 23</name>
         <id>46049f68-d689-47a9-a751-c23934ec4103</id>
      </sat>
   </sats>
   <sats>
      <sat>
         <name>Astra 19</name>
         <id>46049f68-2222-47a9-a751-c23934ec4103</id>
      </sat>
   </sats>
   <providers>
      <provider>
         <name>DVBLogic</name>
         <id>46049f68-5555-47a9-a751-c23934ec4103</id>
      </provider>
   </providers>
</channel_data>
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am


Re: Pre-scanned channel files: what it is and how to use the

Postby elyl » Wed Nov 07, 2012 12:14 am

Hi Oberon,

Is there some provision in the API, or otherwise, to replace the XML file on the fly and then signal TV Source that it's been updated, without restarting the service or rebooting?
elyl
 
Posts: 34
Joined: Sun Dec 23, 2007 1:30 am

Re: Pre-scanned channel files: what it is and how to use the

Postby Oberon » Thu Nov 08, 2012 2:46 pm

elyl wrote:Hi Oberon,

Is there some provision in the API, or otherwise, to replace the XML file on the fly and then signal TV Source that it's been updated, without restarting the service or rebooting?

You can replace the file with a new one any time, but it will become effective only when you do rescan in tvsource with the new file contents. However if you keep channel id the same and just change physical channel data (if channel has moved to another transponder for example) then TVSource will pick it up automatically.
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am

Re: Pre-scanned channel files: what it is and how to use the

Postby MauiJim » Wed Jan 02, 2013 11:23 am

<channel>
Channel has the following data fields:
Code: Select all
   <id> - Unique logical channel id
   <name> - Channel name
   <num> - Channel (major) number
   <subnum> - Channel minor number
   <provider_id> - Provider id to which this channel belongs. It is a reference to a provider described in the <providers> section of a channel files
   <auto_sync> - Flag to automatically synchronize this channel with the selected DVBLink channels


How do i generate the channel id?
I would like to add some channels to the channel file
MauiJim
 
Posts: 10
Joined: Sun Nov 28, 2010 3:49 pm

Re: Pre-scanned channel files: what it is and how to use the

Postby Oberon » Wed Jan 02, 2013 11:35 am

MauiJim wrote:
<channel>
Channel has the following data fields:
Code: Select all
   <id> - Unique logical channel id
   <name> - Channel name
   <num> - Channel (major) number
   <subnum> - Channel minor number
   <provider_id> - Provider id to which this channel belongs. It is a reference to a provider described in the <providers> section of a channel files
   <auto_sync> - Flag to automatically synchronize this channel with the selected DVBLink channels


How do i generate the channel id?
I would like to add some channels to the channel file

It can be whatever you like. It just has to be unique. We usually use guids for them.
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am

Re: Pre-scanned channel files: what it is and how to use the

Postby MauiJim » Wed Jan 02, 2013 3:56 pm

Oberon wrote:
MauiJim wrote:
<channel>
Channel has the following data fields:
Code: Select all
   <id> - Unique logical channel id
   <name> - Channel name
   <num> - Channel (major) number
   <subnum> - Channel minor number
   <provider_id> - Provider id to which this channel belongs. It is a reference to a provider described in the <providers> section of a channel files
   <auto_sync> - Flag to automatically synchronize this channel with the selected DVBLink channels


How do i generate the channel id?
I would like to add some channels to the channel file

It can be whatever you like. It just has to be unique. We usually use guids for them.


but usually they are generated from which parameters? or are they all random?
MauiJim
 
Posts: 10
Joined: Sun Nov 28, 2010 3:49 pm

Re: Pre-scanned channel files: what it is and how to use the

Postby elyl » Thu Jan 03, 2013 11:25 pm

Oberon, can you tell me, is it still possible to overwrite the DVBLink_Channel_Storage.xml file with an updated file (from http://epg.whmcr.com/ for example) and have the new channels picked up, or do we need to go through the channel_files route (which is a different format from the DVBLink_Channel_Storage.xml file)?

If the latter, then I might write a program to grab the data from epg.whmcr.com and reformat it to a channel_files format and update it on a schedule, which would hopefully avoid the channel reshuffle issues that we see frequently in the UK on Sky.
elyl
 
Posts: 34
Joined: Sun Dec 23, 2007 1:30 am

Re: Pre-scanned channel files: what it is and how to use the

Postby Oberon » Fri Jan 04, 2013 10:36 am

I would not touch dvblink_channel_storage.xml as its content is partial and refers to the channel data actually stored within sources.
For your purpose channel files is the way to go. If you keep channel id the same across different version of the file and change only the "physical" channel characteristics, dvblink will automatically update channels within tvsource from the channel file and all changes will be taken by the rest of dvblink seamlessly.
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am

Re: Pre-scanned channel files: what it is and how to use the

Postby Satnewbie » Thu Mar 07, 2013 7:19 am

Hi everyone, just wanted to see if anyone can clarify a few things for me. I'm trying to make a channel file for North America in hopes to clean up all the channels found by scans (1600+).

I've been playing around with this and haven't been able to make it work just yet. Really the only questions I have is where some of the data elements are coming from. I'm going to paste the sample xml below, and put in my best guess at where the data is coming from. If anyone can help me clear up any incorrect information, it would be very appreciated.

Thanks

Hopefully if all goes well I can make a nice excel sheet that will import some information and kick it out in a formatted channel file.

<?xml version="1.0" encoding="utf-8"?>
<channel_data>
<receivers>
<receiver>
<name>CanalDigitaal</name>Source Name Maybe?
<id>5226e12e-10e3-41d5-8ac1-607662f97d8e</id> Not sure where this is coming from
<signal>dvb-s</signal>Should be ok for NA right?
<channels>
<channel>
<id>ce2c6ce8-8c2b-4d22-a87e-0d9fdfe32b78</id> User generated Unique
<name>Ned1 HD</name> User Generated? Match Providers Name, or might need to match scanned name.
<num>1</num> User Generated (or use the providers standard numbering)
<provider_id>46049f68-5555-47a9-a751-c23934ec4103</provider_id> User Generated, should be the same for all channels
<pchannel>
<type>tv</type> tv sounds right
<encrypted/> Leave blank, this I assume is just a flag, and doesn't effect the decryption of encrypted content
<sat_id>46049f68-d689-47a9-a751-c23934ec4103</sat_id> User generated, but needs to match one of the ID's in the Sat Section
<transponder>
<freq>10935000</freq> 8 digit transponder frequency
<pol>V</pol> V for all the North American Sats, because of the way 22hz switching is handled (I think).
<sr>22000</sr> 5 digit symbol rate
<fec>23</fec> fec, get this from the transponder list used to initially scan
<mod>8PSK</mod>get this from the transponder list used to initially scan
<dvb_s_type>dvb-s2</dvb_s_type> dvb-s for NA?
</transponder>
<nid>100</nid> Get from the Sources Settings file?
<tid>100</tid> Get from the Sources Settings file?
<sid>100</sid> Get from the Sources Settings file?
</pchannel>
</channel>
</channels>
</receiver>
</receivers>
<sats>
<sat>
<name>Astra 23</name> Channel Source name from Source Settings xml
<id>46049f68-d689-47a9-a751-c23934ec4103</id> HeadendID6 from Source Settings xml
</sat>
</sats>
<providers>
<provider>
<name>DVBLogic</name> User generated?
<id>46049f68-5555-47a9-a751-c23934ec4103</id> user generated?
</provider>
</providers>
</channel_data>
Satnewbie
 
Posts: 3
Joined: Fri Feb 22, 2013 6:35 pm


Return to Development corner

Who is online

Users browsing this forum: No registered users and 0 guests

cron