Mailing List Archive

need help with station rescan after frequency change
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
Re: need help with station rescan after frequency change [ In reply to ]
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


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: need help with station rescan after frequency change [ In reply to ]
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


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: need help with station rescan after frequency change [ In reply to ]
Hi Jim!

> 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.

What I had done here with the various repacks in eastern Iowa was to do
a channel scan, which did find the new channels. The last one was sort
of a fake-out: I assumed they would switch at 12:00 midnight, they
didn’t update until 12 noon, so my morning scan didn’t come up with
anything new.

Scanning later and with earlier packings did come up with new channels
but the original one was still present and this is the channel MythTV
was looking it, though now dead air. The scan did create “Channel 1”,
“Channel 2”, etc., which as the newly found repack stations. Deleted the
old, edited the new, everything works. Found out later the proper way to
do is delete the old/original channels, do your scan, and the newly
located stations will be (should be!) properly inserted.

Another possibility is the transmitter physically moved. Here when the
repack occurred “Channel 6” moved their transmitter from the Orion IL
Antenna Farm about 15 miles SSE of the house to the antenna farm about 4
miles NE of the house, so effectively ‘behind the antenna’. Perhaps this
is why you are not obtaining the new stations.

HTH,

Barry
Re: need help with station rescan after frequency change [ In reply to ]
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.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: need help with station rescan after frequency change [ In reply to ]
On Thu, 2 Jul 2020 08:16:09 -0700, you 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.

I regularly alter or add to my DVB-T and SAT>IP DVB-S2 channels
manually. You certainly seem to have the right idea about what is
needed, so I am not sure why it is not working for you. One thing
that we do have here on DVB-T is that you get channels which appear on
a frequency scan but are not real channels - they are just place
holders that do not have any actual data being transmitted. So maybe
your channel is one of them. MythTV is able to tell such channels and
does not add them. Does your TV pick up this channel? TVs usually
also can tell place holder channels and will not list them in the
available channel list.

The way I normally add a channel is to use a GUI SQL editor on the
channel table. I copy a row that is similar to what I want and just
edit the fields that are different. It is rare here to need to add
anything to the dtv_multiplex table - all the channels on one
frequency use the same dtv_multiplex row, so you only need to add that
if you do not have any other channels on the same multiplex. But when
I have done it, I used the same system - find a row that is similar,
copy it and edit it.

There is no need to know the PIDs for a channel normally - that
information is picked up from the packets for a channel. All that
MythTV needs is the frequency and tuning parameters and (for DVB-T)
the service ID. For ATSC, I believe it only needs the frequency and
tuning parameters and the major/minor channel numbers. The tuning
process will select the frequency and use the tuning parameters to
acquire the digital stream of data from the multiplex. Then it will
look for the header packets that describe the channels and their
streams. Those packets are broadcast regularly so they will be seen
rapidly. From those packets, it uses the service ID or the combined
major/minor channel number to pick out the data for the required
channel. That data provides the stream numbers (PIDs).

If the PIDs are known, you can skip waiting for the header packets and
immediately select out the stream packets for the channel using the
PID numbers, but doing that risks that something will have changed and
the old PIDs will no longer be valid. For example, a programme may
have an extra audio stream being broadcast for a new language. Or the
channel may even have been moved to a different multiplex and no
longer be there at all, in which case the multiplex it was on may
optionally be broadcasting information to tell where the channel was
moved to.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: need help with station rescan after frequency change [ In reply to ]
On Thu, 2 Jul 2020 at 17:17, DaveD <mythtv@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.

Hope this helps!
Klaas.
Re: need help with station rescan after frequency change [ In reply to ]
Klaas de Waal <klaas.de.waal@gmail.com> writes:

> On Thu, 2 Jul 2020 at 17:17, DaveD <mythtv@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
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: need help with station rescan after frequency change [ In reply to ]
On 6/30/20, James Abernathy <jfabernathy@gmail.com> 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
>

For me, channel scanning in MythTV has ALWAYS been a total nightmare,
most notably when you end up with a new id for an existing channel and
your recorded history becomes a total mess.

I'm in New Jersey and in fact I just had PBS channel 13.1 move
frequencies. I change those with a very nice perl script that I have
attached here:

https://lists.gt.net/mythtv/users/626354#626354

That post describes how you can use it based on the output of an
hdhomerun_config scan. That simply changes the dtv_multiplex of the
exiting channel in place and is capable of creating the dtv_multiplex
is needed.

Note that I also have a script for adding channels. That one doesn't
create dtv_multiplex but that can be done with the above script.

This is the ONLY way I ever do this.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: need help with station rescan after frequency change [ In reply to ]
On 7/3/20 10:01 AM, Tom Dexter wrote:
> On 6/30/20, James Abernathy <jfabernathy@gmail.com> 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
>>
> For me, channel scanning in MythTV has ALWAYS been a total nightmare,
> most notably when you end up with a new id for an existing channel and
> your recorded history becomes a total mess.
>
> I'm in New Jersey and in fact I just had PBS channel 13.1 move
> frequencies. I change those with a very nice perl script that I have
> attached here:
>
> https://lists.gt.net/mythtv/users/626354#626354
>
> That post describes how you can use it based on the output of an
> hdhomerun_config scan. That simply changes the dtv_multiplex of the
> exiting channel in place and is capable of creating the dtv_multiplex
> is needed.
>
> Note that I also have a script for adding channels. That one doesn't
> create dtv_multiplex but that can be done with the above script.
>
> This is the ONLY way I ever do this.
>
> Tom

Thank you for the post/info/script.  Would you be willing to post the
other one you mentioned to add a channel?

Dave D.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: need help with station rescan after frequency change [ In reply to ]
On 7/4/20, DaveD <mythtv@guiplot.com> wrote:
> On 7/3/20 10:01 AM, Tom Dexter wrote:
>> On 6/30/20, James Abernathy <jfabernathy@gmail.com> wrote:
>
> Thank you for the post/info/script. Would you be willing to post the
> other one you mentioned to add a channel?
>
> Dave D.
>

Sure! Here it is.

Tom
Re: need help with station rescan after frequency change [ In reply to ]
On 7/4/20, Tom Dexter <digitalaudiorock@gmail.com> wrote:
> On 7/4/20, DaveD <mythtv@guiplot.com> wrote:
>> On 7/3/20 10:01 AM, Tom Dexter wrote:
>>> On 6/30/20, James Abernathy <jfabernathy@gmail.com> wrote:
>>
>> Thank you for the post/info/script. Would you be willing to post the
>> other one you mentioned to add a channel?
>>
>> Dave D.
>>
>
> Sure! Here it is.
>
> Tom
>
Note that both of those have -h (and --help) options that explain them
in detail.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: need help with station rescan after frequency change [ In reply to ]
On 7/4/20, Tom Dexter <digitalaudiorock@gmail.com> wrote:
> On 7/4/20, Tom Dexter <digitalaudiorock@gmail.com> wrote:
>> On 7/4/20, DaveD <mythtv@guiplot.com> wrote:
>>> On 7/3/20 10:01 AM, Tom Dexter wrote:
>>>> On 6/30/20, James Abernathy <jfabernathy@gmail.com> wrote:
>>>
>>> Thank you for the post/info/script. Would you be willing to post the
>>> other one you mentioned to add a channel?
>>>
>>> Dave D.
>>>
>>
>> Sure! Here it is.
>>
>> Tom
>>
> Note that both of those have -h (and --help) options that explain them
> in detail.
>
> Tom
>

For anyone ho might want to use this, and who's not using the MythTV
perl bindings I've attached versions that don't use it, where you just
need to manually edit the mythtv user/password etc in the script
itself (around line 10).

Tom