[mythtv-users] need help with station rescan after frequency change

DaveD mythtv at guiplot.com
Thu Jul 2 15:16:09 UTC 2020


On 6/30/20 8:01 AM, Jim Abernathy wrote:
>
> On 6/30/20 8:32 AM, Jim Abernathy wrote:
>>
>> On 6/30/20 7:31 AM, James Abernathy wrote:
>>> Last year all but one of my local OTA TV stations changed 
>>> frequencies as a part of the FCC repacking of the USA OTA channels.
>>>
>>> Today the last one switched.   I can't remember exactly what I did 
>>> last year, but I remember it was simple. I tried on my 
>>> development v31 FE/BE combo to make sure I had it right before I did 
>>> anything with my production backend.
>>>
>>> I failed on the initial test.  All I did was use mythtv-setup and in 
>>> the input connections I did a scan and updated all channels. I still 
>>> could not receive the channel that moved.
>>>
>>> 1. Do I have to reconfigure XMLTV?  I use tv_grab_zz_sdjson-sqlite. 
>>> The channel that moved is still called the same thing.
>>> 2. I have a mixture of HDHR and Hauppauge WinTV Quad PCIe tuners
>>>
>>> Jim A
>>> BTW I did the rescan on a real TV and it found the new channel
>>
>> Okay, I think I have this figured out.  I do not know if this is the 
>> optimal solution, but it worked.
>>
>> First I used mythtv-setup -> Edit Channels and deleted all channels 
>> from Video Source 'SD'. Then I re-scanned.
>>
>> I noticed that when that was done I had a lot of new unwanted 
>> channels so I marked them invisible.  I also noticed that my channel 
>> that moved overnight now had the changed freq. from 11 to 9 which is 
>> correct.  However the XMLTV ID was now blank.
>>
>> So I ran as user 'mythtv':
>>
>> tv_grab_zz_sdjson_sqlite --manage-lineups --config-file 
>> $HOME/.mythtv/SD.xmltv
>>
>> Then did option 5 to manually select the channels. That exercise was 
>> mostly to confirm what I already had.
>>
>> When I exited, I did mythfilldatabase, then exited user mythtv and 
>> back in mythtv-setup I found my changed channel had the XMLTV ID.
>>
>> Next I started mythbackend up and everything is now work.
>>
>> I have no idea what the right steps are but this worked for me.
>>
>> Jim A
>
> I think I added a step that was not needed. So here is what I think is 
> required at least on a RPi4 v31 with HDHomerun Quatro.
>
> 1. Run mythtv-setup which shuts down the backend.
>
> 2. in Edit channels, I deleted all the channels on the Video Source in 
> question. SD for me.
>
> 3. Run the scan and add all the channels and then edited channels I 
> didn't want to see.
>
> 4. Save and exit, which starts the backend.
>
> 5. At least on the RPi4, mythfilldatabase is triggered by just 
> starting mythbackend so I just waited.
>
> At this point I could view the new channel.
>
> Jim A

Seems like a BOATLOAD of work, just to change the frequency on ONE 
CHANNEL!  This is, IMHO, is the weakest part of MythTV (which I love, 
BTW, or I wouldn't waste so much time trying to get it just right!).  I 
have tried figuring out the schema used for channels so I can manually 
control them but I have still not figured it out.  I have ONE channel I 
would like to add and I have come close (I think), but it still would 
not tune in MythTV.

I wrote a GUI QT app based on the source from dvb-apps that lets me use 
scandvb to see what I can get on different days and different antenna 
placement, then optimize the antenna placement for which channels I care 
about.  I have done all my analysis using this app and have a good 
understanding of what is possible and am getting good results in my 
recordings.  But all this analysis revealed ONE channel that mythtv 
didn't see in the latest scan (different frequency?  bad weather?  
Irrelevant!) and now I have to go through all that messing around with 
xmltv IDs and visible and recording rules and channel numbers, etc, etc, 
etc, using what seems like very limited tools (channel editors) to do it 
(back up the DB first!).  Where is the Wiki article about how to 
manually add a channel?

Everything I can find tells me to run a scan, which seems to destroy 
everything I have set up so far.  I have tried backing up the DB, run a 
scan, then save the new DB and compare changes, but there are too many 
differences and I don't understand the inter-relations of the tables.  I 
tried the following:

insert into dtv_multiplex set 
mplexid=207,sourceid=6,frequency=473000000,inversion="a", 
updatetimestamp="2020-06-21 21:18:00", etc...

and then

insert into channel set atsc_major_chan=12, atsc_minor_chan=1, 
callsign="KVOS", name="KVOSDT", channum="12-1", etc...

but I don't really know if my field values were valid. 
https://www.mythtv.org/wiki/Channel_table and 
https://www.mythtv.org/wiki/Dtv_multiplex_table were helpful, but not 
thorough enough to know what needed to be entered or if there were any 
more tables involved.  A python script that prompts for parameters would 
be GREAT!  My above-mentioned app only needs frequency, "8VSB" (for 
ATSC), audio PID, video PID and stream ID and it can tune a channel.  It 
seems to me a script that prompts for those, a video source, a channel 
number, a callsign and an XMLTVID would be all one would need, and that 
is what I am trying to write, but have not succeeded... YET!

Dave D.




More information about the mythtv-users mailing list