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

Leo Butler leo.butler81 at googlemail.com
Fri Jul 3 14:33:14 UTC 2020


Klaas de Waal <klaas.de.waal at gmail.com> writes:

> On Thu, 2 Jul 2020 at 17:17, DaveD <mythtv at guiplot.com> wrote:
>
>> 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.
>>
>>
>> Hi Dave,
>
> The channel scanning process is now, since v31, documented in the Wiki in
> https://www.mythtv.org/wiki/Channel_Scanning
> If you nowadays do a scan of any kind, then the existing channel numbers,
> channel names, visibility and XMLTV information are all preserved.
> Only if you delete the channels before doing a scan then all the XMLTV info
> is of course gone.
> Adding individual channels manually is not supported mainly because the
> idea is that any channel that can be used to make recordings can be found
> by a mythtv-setup channel scan.
> Also this is a very error-prone process.
> I could, and probably will at some point in time, restore the once-present
> functionality of importing scan results from other utilities such as
> dvbv5-scan. However, the priority is to make the channel scanning in
> mythtv-setup so good that you do not need other utilities.
>
> If you want to check what a completely new channel scan would bring then
> you can do the following:
> - create new Video Source
> - connect your capture card (tuner) to the new Video Source
> - do a channel scan for the new Video Source
> This will not destroy your existing collection of channels.
> After experimenting you can connect the capture card back to the original
> Video Source and then you are back to using that. Or you can keep on using
> the new Video Source.
> Note that in the program guide you will see only the channels from video
> sources that do have a capture card.

It would be really helpful if the channel editor included fields to edit
the channel data like the frequency and so on, so that when a repack
happens, one can manually make the change.

I recently had to do this for one channel and after several attempts
used the ideas here

https://www.mythtv.org/wiki/Adding_Digital_Cable_Channels_(For_ATSC/QAM_Tuner_Cards_--_USA/Canada)

(see Manually adding channels)

Note that I wanted to preserve the chanid and other data, which your
suggested course of action does not.

Leo


More information about the mythtv-users mailing list