FreeView Tuning appears to drift

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

FreeView Tuning appears to drift

Post by diyhouse »

Having had issues with poor signal quality for some time with certain channels I decided to do some testing on a "Test System build ( same h/w just another disk to boot off",.. To this end I did a MythBuntu build,.. applied all updates,.. and installed drivers as appropriate for my two TBS cards. Quad FreeView and Daul FreeSAT card.

I then setup the DVB-S/2 tuning and all looked good, all channels including HD at 79% signal quality,.. so proceeded to tune the DVB-T/2 card and again all looked good, with signal quality around 99% for both HD and other channels.

Riding the crest of a wave I thought great,.. what do I have to loose,.. So I proceeded to re-tune my primary system, same h/w ( just another boot disk ). I did a full retune of both FreeView and FreeSAT,.. having removed the cards ( from Mythtv ),.. so a clean slate ( I assume ).

Having done all the other admin stuff of shuffling channels around,.. everything looked great,.. all channels with good signal quality,...

Now,.. having run the primary system for a few days post a re-tune,.. things are starting to fail/degrade again,... I do not understand why a channels signal should degrade in this way less than 25%. And what REALLY perplexes me is that if I boot into my test system,.. and tune the degraded channels everything is perfect!!,.. good signal / picture quality,... all around 79 and 99% for FreeSAT and FreeView respectfully.

Other things I have noted,.. is that tuning a channel takes approx. 12Seconds,.. ( once the select new channel button is pressed ), although the tuning delay setting with the backend setup only seems to go up to 10Seconds.... and is there a different setting for when tuning for a recording...

Does anyone have any suggestions,.. how do I read the FreeView tuning setting from the database so I can compare settings... Are tuning settings dynamic?... does Myth go out and periodically check them/tweak them.

thanks for any feedback and assistance,.. Oh BTW nearly forgot,.. I am running 14.04 mythbuntu, with all the latest updates.. so 27.4+ ( I think),..

Rgds
User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

Re: FreeView Tuning appears to drift

Post by diyhouse »

Ok I'm still looking for help,... and having further pondered my problem,.. I wondered....

How do I use/look at the parameters used to tune a channel,.. ie if,.. Myth wishes to record channel 101 (BBC One) for example,.. where does it pull the information for tuning that channel from,.... and is it possible for me to extract that information from the Dbase and then pass it to say vlc as a set of parameters to tune an adapter to,.. once backend has been stopped and freed up the adapters of course... is it possible to intercept the tuning files, ( assuming they are created somewhere ) so I my pass them externally to vlc,.. just thinking aloud as they say,.. does anyone else have any better ideas or suggestions.

Many thanks
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: FreeView Tuning appears to drift

Post by dizygotheca »

Don't know about satellite, but for Freeview the tuning parameters are in table channelscan_dtv_multiplex.

But you can inspect/edit them more easily from mythtv-setup/Channel Editor/Edit Transports. Tweaking the frequency may have some effect.

And you can log the tuning process using mythbackend -v channel --loglevel debug

AFAIK Myth never changes the parameters so it's more likely to be a tuner/driver issue IMHO.
User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

Re: FreeView Tuning appears to drift

Post by diyhouse »

Tx for your suggestions
AFAIK Myth never changes the parameters so it's more likely to be a tuner/driver issue IMHO.
Humm,.. yes that does make sense,.. I have always assumed Myth tweaks these values but thinking about it,.. that is ridiculous,.. why would transmission frequencies drift... they have to be locked.

So if tuned values do not change,... and a "freshly tuned system works",.. why or what drifts causing poor channel reception over time ( apparently ). As if I boot into my test environment,.. perfect reception!! most strange.

have enabled a debug logging,.. to see what that can show..
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: FreeView Tuning appears to drift

Post by PhilB »

This is bit reminiscent of the dvb-t problems I had a while back. See ''loss of multiplex' in this wiki

https://www.mythtv.org/wiki/DVB-T_Recep ... _multiplex
A database corruption could cause your symptoms. If so then deleting channels, video sources and capture cards and recreating them may fix it.
Good luck
Phil
User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

Re: FreeView Tuning appears to drift

Post by diyhouse »

Tx Phil,.. I appreciate your comments and I see where you are coming from, as I have experienced such issues when the channels were all being swapped in the UK over the past years in the UK.

However in this instance I only did a complete retune last week,.. as in removing tuned channels and capture cards,.. and then retuned both Freeview and FreeSAT,... As i said I retuned a "test system", and my Default running system,... and both worked fine to start with,.. say a couple of days,... then the normal systems tuning seams to drift,... if I find a channel ,.. say FReeView PICK,... that has poor reception,.. I can immediately reboot into test system,.. ( same tuning hardware, same drivers, tuned the same day as default system,.. just different boot disk and different Dbase Of course ),.. and tuning reception for FreeView PICK is perfect,... inferring ( and I use the term loosely ) tuning on default mythTv system has drifted,.. but this cannot be so,... what else is playing with the tuned signal.

Hence my confusion and bewilderment,...
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: FreeView Tuning appears to drift

Post by PhilB »

Puzzling indeed! Two thoughts:
1. I wonder what would happen to your test system if you were to import a database backup from your live system?
That would tell you whether the issue is in the database or elsewhere.

2. There are APIs for checking tuning parameters. You could check if they are different.
eg
You'll have to play with the SourceID - you can get them with a VideoSourceList call. eg
hth
Phil
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: FreeView Tuning appears to drift

Post by PhilB »

Presumably when your program 'drifts' then all others in the same multiplex do too.
You can get the tuning parameters more concisely with:

http://your ip:6544/Channel/GetVideoMultiplexList?SourceID=1

I imagine that there will be different SourceID's for dvb-t and dvb-s.
Phil
User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

Re: FreeView Tuning appears to drift

Post by diyhouse »

Phil,... Brilliant,.. just what I was looking for,.. something that pulls or the tuning data out of the database..

So have pulled the tuning data from my two systems,... what the "default system" tuning parameters were to start,.. I do not know,... as I never took a snap shot,...

But looking and comparing the two systems,.. and just three channels I have found the following... Now I must confess I'm not quite sure how to read this,... but I may be barking up the wrong tree,.. but why are there differences with the MplexId's,.. FrequenceyId's and frequency table ( the Test system uses the default FrequencyTable ) .... should I correct FrequencyTable or not....

Just looking at the frequency for my local transmitter ( oxford and 618MHz is not even listed,.. where has this come from? 762MHz is correct and IS the HD multiplex...),.. So Some things for consideration... does anyone else have any input/comment..
Many Tx

Something that has just occurred to me,.... BBC 2 HD was a great quality channel,... Picture quality wise... then one it just became naf!!! lots of pixelation,.. sound break up,.. etc.. hence my question about signal drift,.. but I still cannot explain why... Humm
<ChannelInfo>
<ChanId>24208</ChanId>
<ChanNum>180</ChanNum>
<CallSign>Pick</CallSign>
<IconURL>p160784.png</IconURL>
<ChannelName>Pick</ChannelName>
<MplexId>42</MplexId>
<TransportId>20544</TransportId>
<ServiceId>22208</ServiceId>
<NetworkId>9018</NetworkId>
<ATSCMajorChan>0</ATSCMajorChan>
<ATSCMinorChan>0</ATSCMinorChan>
<Format/>
<Modulation>auto</Modulation>
<Frequency>778000000</Frequency>
<FrequencyId>44</FrequencyId>
<FrequencyTable>europe-west</FrequencyTable>
<FineTune>0</FineTune>
<SIStandard>dvb</SIStandard>
<ChanFilters/>
<SourceId>2</SourceId>
<InputId>0</InputId>
<CommFree>0</CommFree>
<UseEIT>false</UseEIT>
<Visible>true</Visible>
<XMLTVID>pick.sky.com</XMLTVID>
<DefaultAuth>www.sky.com</DefaultAuth>
<Programs/>
</ChannelInfo>
----------------------------------------------------------
<ChannelInfo>
<ChanId>2067</ChanId>
<ChanNum>180</ChanNum>
<CallSign>Pick</CallSign>
<IconURL>pick_tv_uk.png</IconURL>
<ChannelName>Pick</ChannelName>
<MplexId>67</MplexId>
<TransportId>20544</TransportId>
<ServiceId>22208</ServiceId>
<NetworkId>9018</NetworkId>
<ATSCMajorChan>0</ATSCMajorChan>
<ATSCMinorChan>0</ATSCMinorChan>
<Format/>
<Modulation>auto</Modulation>
<Frequency>778000000</Frequency>
<FrequencyId>59</FrequencyId>
<FrequencyTable>default</FrequencyTable>
<FineTune>0</FineTune>
<SIStandard>dvb</SIStandard>
<ChanFilters/>
<SourceId>2</SourceId>
<InputId>0</InputId>
<CommFree>0</CommFree>
<UseEIT>true</UseEIT>
<Visible>true</Visible>
<XMLTVID>pick.sky.com</XMLTVID>
<DefaultAuth>www.sky.com</DefaultAuth>
<Programs/>
</ChannelInfo>
********************************************************************
<ChannelInfo>
<ChanId>2101</ChanId>
<ChanNum>102</ChanNum>
<CallSign>BBC one HD</CallSign>
<IconURL>p131686.png</IconURL>
<ChannelName>BBC ONE HD</ChannelName>
<MplexId>35</MplexId>
<TransportId>16515</TransportId>
<ServiceId>17540</ServiceId>
<NetworkId>9018</NetworkId>
<ATSCMajorChan>0</ATSCMajorChan>
<ATSCMinorChan>0</ATSCMinorChan>
<Format/>
<Modulation>auto</Modulation>
<Frequency>618000000</Frequency>
<FrequencyId>57</FrequencyId>
<FrequencyTable>europe-west</FrequencyTable>
<FineTune>0</FineTune>
<SIStandard>dvb</SIStandard>
<ChanFilters/>
<SourceId>2</SourceId>
<InputId>0</InputId>
<CommFree>1</CommFree>
<UseEIT>false</UseEIT>
<Visible>true</Visible>
<XMLTVID>hd.bbc1.bbc.co.uk</XMLTVID>
<DefaultAuth>fp.bbc.co.uk</DefaultAuth>
<Programs/>
</ChannelInfo>
------------------------------------------------------------------
<ChannelInfo>
<ChanId>2055</ChanId>
<ChanNum>102</ChanNum>
<CallSign>BBC one HD</CallSign>
<IconURL>bbc_one_hd.png</IconURL>
<ChannelName>BBC ONE HD</ChannelName>
<MplexId>64</MplexId>
<TransportId>16515</TransportId>
<ServiceId>17540</ServiceId>
<NetworkId>9018</NetworkId>
<ATSCMajorChan>0</ATSCMajorChan>
<ATSCMinorChan>0</ATSCMinorChan>
<Format/>
<Modulation>auto</Modulation>
<Frequency>762000000</Frequency>
<FrequencyId>57</FrequencyId>
<FrequencyTable>default</FrequencyTable>
<FineTune>0</FineTune>
<SIStandard>dvb</SIStandard>
<ChanFilters/>
<SourceId>2</SourceId>
<InputId>0</InputId>
<CommFree>1</CommFree>
<UseEIT>true</UseEIT>
<Visible>true</Visible>
<XMLTVID>hd.bbc1.bbc.co.uk</XMLTVID>
<DefaultAuth>fp.bbc.co.uk</DefaultAuth>
<Programs/>
</ChannelInfo>
**********************************************************************
ChannelInfo>
<ChanId>30292</ChanId>
<ChanNum>105</ChanNum>
<CallSign>BBC Two HD</CallSign>
<IconURL>bbc_two_uk_hd.png</IconURL>
<ChannelName>BBC TWO HD</ChannelName>
<MplexId>64</MplexId>
<TransportId>16515</TransportId>
<ServiceId>17472</ServiceId>
<NetworkId>9018</NetworkId>
<ATSCMajorChan>0</ATSCMajorChan>
<ATSCMinorChan>0</ATSCMinorChan>
<Format/>
<Modulation>auto</Modulation>
<Frequency>762000000</Frequency>
<FrequencyId>57</FrequencyId>
<FrequencyTable>default</FrequencyTable>
<FineTune>0</FineTune>
<SIStandard>dvb</SIStandard>
<ChanFilters/>
<SourceId>2</SourceId>
<InputId>0</InputId>
<CommFree>1</CommFree>
<UseEIT>true</UseEIT>
<Visible>true</Visible>
<XMLTVID>hd.bbc2.bbc.co.uk</XMLTVID>
<DefaultAuth>fp.bbc.co.uk</DefaultAuth>
<Programs/>
</ChannelInfo>
-----------------------------------
<ChannelInfo>
<ChanId>2102</ChanId>
<ChanNum>105</ChanNum>
<CallSign>BBC Two HD</CallSign>
<IconURL>p142703.png</IconURL>
<ChannelName>BBC TWO HD</ChannelName>
<MplexId>35</MplexId>
<TransportId>16515</TransportId>
<ServiceId>17472</ServiceId>
<NetworkId>9018</NetworkId>
<ATSCMajorChan>0</ATSCMajorChan>
<ATSCMinorChan>0</ATSCMinorChan>
<Format/>
<Modulation>auto</Modulation>
<Frequency>618000000</Frequency>
<FrequencyId>57</FrequencyId>
<FrequencyTable>europe-west</FrequencyTable>
<FineTune>0</FineTune>
<SIStandard>dvb</SIStandard>
<ChanFilters/>
<SourceId>2</SourceId>
<InputId>0</InputId>
<CommFree>1</CommFree>
<UseEIT>false</UseEIT>
<Visible>true</Visible>
<XMLTVID>hd.bbc2.bbc.co.uk</XMLTVID>
<DefaultAuth>fp.bbc.co.uk</DefaultAuth>
<Programs/>
</ChannelInfo>
*********************************
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: FreeView Tuning appears to drift

Post by dizygotheca »

Just looking at the frequency for my local transmitter ( oxford and 618MHz is not even listed,.. where has this come from? 762MHz is correct and IS the HD multiplex...),.. So Some things for consideration... does anyone else have any input/comment..
Many Tx
618 is coming from Hannington (probably along with all your other weak channels)
http://www.ukfree.tv/transmitters/tv/Hannington

Do you not have any duplicate channels then ? Could your 'drifting' be caused by you periodically re-scanning and replacing good Oxford channels with weak Hannington ones ?

For Freeview, you should edit your transports (multiplexes) so that you're only using the Oxford ones, then always "Scan Existing Transports". Or use the 'linked transport' option.
and frequency table ( the Test system uses the default FrequencyTable ) .... should I correct FrequencyTable or not....
I believe Frequency Table is used by the scanner. Not sure what the effect of using the wrong setting is, but you should set it to europe-west.
User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

Re: FreeView Tuning appears to drift

Post by diyhouse »

Yes I see what you mean about the Hannington transmitter,.....

I think I will bite the bullet again a do a full retune,.. I always dread this as shifting the 200 or so channels with duplicates is a real pain,.. some 1200 key presses to select a suggested new channel id number etc....

Once a retune is complete I can take a dump of the tuning info with the API PhilB suggested, ( Tx Phil ),.... and then see if things really do drift/change by some random/unknown interaction,.. .... but I am open minded here until I get a reference dump of a good tuned data set... then compare,.. as all these bad channels were once good ( honestly!! ),... somewhere along the line they go south on the quality scale....

But we shall see where the facts and data take us....

Tx guys....
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: FreeView Tuning appears to drift

Post by dizygotheca »

I think I will bite the bullet again a do a full retune,.. I always dread this as shifting the 200 or so channels with duplicates is a real pain,.. some 1200 key presses to select a suggested new channel id number etc....
You're missing the point - you shouldn't have any duplicates! They only occur because the full scan is detecting distant transmitters and the weak signals are overriding your local ones.
  1. Go into mythtv-setup/Channel Editor/Edit Transports. For the Oxford transmitter you want the transports on (MHz) 730, 785, 762, 706, 777, 746, 554, (714?). Delete all the rest ('D' key).
    http://www.ukfree.tv/transmitters/tv/Oxford
  2. Delete All Channels
  3. Rescan using "Scan Existing Transports". You should then get a full set of good local channels with no duplicates.
Regarding your "Reference set": Most of that data you listed (mplexid, transportid, serviceid etc) is technical mux info only relevant to coders (detected from the broadcast), or internal Myth data (ChanId, UseEIt). You can edit things like Modulation and Guard Freq but IME the scanner just resets them to the correct (detected) values. The only relevant info is the mux frequency (many websites will tell you the current values of your local transmitter) and the ChanNum (assigned automatically or overridden by yourself).

The scanner UI is acknowledged to be inadequate. If you're habitually re-assigning duplicate channels the question is: Are you re-assigning the good ones or the weak ones ? I suspect in your 'dump' you'll find another (good) BBC 2 HD channel on 762 MHz with a different channel number (1105 ?). In which case you're just selecting the wrong channel...
User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

Re: FreeView Tuning appears to drift

Post by diyhouse »

Sorry when I say "duplicates",... I mean duplicate programs on FreeView,.. as I have already scanned against FreeSAT.... so hence the FreeView / FreeSAT duplicates.. Not Purley FreeView Duplicated from other transmitters and Muliplex's.

My Confusion/bewilderment is that when I 1st tuned these channels,... they were good quality 99% signal top notch sound etc...

Your comment about the Multiplex's I understand,.. and will take on board... Just checked my FreeView Transports and I have 13 listed.... I will Delete the Naf ones,.. and do a re-scan,...

BTW is it possible to export the "Transport list" to a file and import it later during a rebuild for instance... and is the "rounding" on the frequencies important,.. ie 730.2MHz or 730MHz

Thanks for this input,... this really does help....

Rgds
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: FreeView Tuning appears to drift

Post by dizygotheca »

My Confusion/bewilderment is that when I 1st tuned these channels,... they were good quality 99% signal top notch sound etc...
My hypothesis is that you originally tuned to the Oxford transmitter but then a re-tune with the cryptic "Add/Replace/Ignore Channels" dialogs resulted in those channels being re-tuned to the weaker Hannington transmitter (as your BBC 2 HD dump showed). The coverage map is a bit weird/patchy. Of course it's possible that you've always used Hannington and sometimes it'll give a good signal and other times drop off rapidly due to weather/interference etc.
BTW is it possible to export the "Transport list" to a file and import it later during a rebuild for instance... and is the "rounding" on the frequencies important,.. ie 730.2MHz or 730MHz
Not that I'm aware of. It only boils down to looking up/remembering the frequencies though. If full scan/edit transports/delete all channels/rescan is a PITA because of FreeSat, then it's quite feasible to create your own transport using one of the published frequencies and everything else set to Auto. Scan off that with the "use linked transports" option and the scanner should discover all the other Oxford ones by itself. I've never tried it though.

Always use the scanner-detected frequency - I just rounded them out of laziness. Interestingly my system reports frequencies that are slightly different (kHz) from the published ones. It doesn't affect signal quality though.
User avatar
diyhouse
Senior
Posts: 223
Joined: Mon Mar 31, 2014 9:42 am
Great Britain

Re: FreeView Tuning appears to drift

Post by diyhouse »

My hypothesis is that you originally tuned to the Oxford transmitter but then a re-tune with the cryptic "Add/Replace/Ignore Channels" dialogs resulted in those channels being re-tuned to the weaker Hannington transmitter (as your BBC 2 HD dump showed).
Yes I can Buy that,.... many thanks for your input,... this has been bugging me for months as I sort knew frequencies could not drift,... but still tuning was clearly ( apparently ) changing....

Checked my default system,.. and the "Transports List" is full of muliplexes... Oxford ones as well as Hannington,....

Played with test system and played tuning of defined Mux's,.. this seemed to work,.. so returned to Default system and deleted All Freeview channels and Mux's and started by seeding a new Oxford Mux,.. channels tuned,... but one Mux was missing,.. added manually,.. and all seems well.. did one more rescan against known Mux's,.. and all seems pretty good.... Almost......

I use an SQL script similiar to following

Code: Select all

 -- ITVBe
 set @chancnt := @chancnt+1;	
 UPDATE channel SET channum=@chancnt, visible=1, xmltvid="be.itv.com", callsign='ITVBe' WHERE name='ITVBe' and freqid='50'; -- FV ITVBe 
 UPDATE channel SET channum=@chancnt+1000, visible=1, xmltvid="be.itv.com", callsign='ITVBe' WHERE name='ITVBe' and sourceid='1'; -- FS ITVBe 
 --
having run the following SQL line

Code: Select all

update channel SET channum=channum+50000, visible=FALSE WHERE channum<60000 AND sourceid=2;
this saves me a lot of pain when previously I have tuned both sources,...

Now!!,..... Previously when I have tuned Freeview I have had a Freqid stored with each Freeview channel found,... scanning of just selected Mux's this does not seem to happen,... is this expected behaviour??? that the freqid is NOT stored. I can obviously modify my script to use sourceid,.. as I seem to have only one instance of each channel,.. ( I think from quick scan ),.. so not the issue it was previously..

And going forward,... how do I stop Myth scanning and tuning "other" mux's including the dreaded Hannington transmitter Mux's.... ( no offence to the Hannington transmitter ).

Just checked the API dump as suggested earlier,... and Frequencyid is blank there to,... and interestingly it does not seem to be correctly formatted.... but a "dev' needs to look at that I think,.. as I am not an expert..
<Modulation>qam_64</Modulation>
<Frequency>706000000</Frequency>
<FrequencyId/>
<FrequencyTable>europe-west</FrequencyTable>
<FineTune>0</FineTune>
Thanks for your comments guys..
Post Reply