Channel remapping attempt

Channel remapping attempt

My approach to getting channel numbers that I like,
is to simply copy a channel and then hide the orginal.

I don't know that this will even work, but hopefully
someone will offer suggestions.

I'm not interested in the "docker" approach (at the moment).
And using the tvc-guide-stationid works great, but shouldn't
be needed, since the guide data is always generated.

To get m3u links, I used:
to create the file ChannelsPlus.m3u.

From the ChannelsPlus.m3u I selected one channel:

#EXTINF:-1 channel-id="6767" tvg-chno="6767" tvg-logo="" tvg-name="ABCNL" group-title="HD",ABCNEWS

It appears that tvg-chno and channel-number can be used for the display name.
I want the new (mapped) channel to be 10.


#EXTINF:-1 channel-id="6767" channel-number="10" tvg-logo="" tvg-name="ABCNL" group-title="",ABCNEWS

Then created a new source called MyTest.
I set Stream Format to MPEG-TS.
The source URL as text. And pasted the above.
Prefer channel-number from M3U.

Channel #10 now shows in the guide.

No mapping is shown:

Not very practical, so I need guide data.

To get a day of xml guide data, I used:
to create the file ChannelsPlus.xml.

Used "Set Provider" option under MyTest Source.
Clicked USA and selected XMLTV Custom URL.

Pasted the URL
and saved.

Now under "Manage Lineup" I have:

I believe this mapping was sucessful because the m3u entry has channel-id="6767"
and the xml file has channel id="6767">.

But .. No guide data shown.

In ChannelsPlus.xml

  <channel id="10">
    <icon src=";h=270"></icon>

is created without without any


tags. But I thought this was ok, since I want the data from "6767".

  <channel id="6767">
    <icon src=";h=270"></icon>
  <programme start="20210305153000 +0000" stop="20210305160000 +0000" channel="6767">

has all the guide data for 6767.

I did "Guide Data Redownload XMLTV" option. Still no guide data.

2021/03/05 10:44:16.065751 [DVR] Fetched guide data for XMLTV-MyTest in 2s
2021/03/05 10:44:16.351463 [DVR] Indexed 0 airings into XMLTV-MyTest (0 channels over 0s) + 0 skipped [0s index]
2021/03/05 10:44:16.351463 [IDX] Pruned 0 expired groups from XMLTV-MyTest in 0s.

Anyone see what I'm missing here to populate the guide data?

Might you have any suggestions on this approach?

Here's an example from my custom m3u:

#EXTINF:-1 tvg-chno="100" tvc-guide-stationid="64241" channel-id="6050" tvg-name="MNBCHD" group-title="News",MSNBC

The problem with the 24-hour news streams in the 67XX channels is that they have no guide data.

A minimal example using the data provided by @mike_here in his example above follows:

#EXTINF:-1 channel-id="tve-msnbc" channel-number="100" tvc-guide-stationid="64241",MSNBC

This will put MSNBC on channel 100. It will also automatically map guide data from Gracenote onto the "new" channel, without the need to do any additional guide setup.

However, this will only work for channels that Channels has EPG data for. Unfortunately for you, the ABC News channel on 6767 is not one of those channels.

1 Like

mike and racameron,

Thanks for your replies. I played around with tvc-guide-stationid
and was impressed on how easy it is to get guide data. Even saw
the zap2it explore trick to get the id. And yes, did run into no ids
for streaming channels such as ABC News Live and CBSN.

But the approach above does not require Gracenote.

Any clue why the mapping from 10 --> 6767 shows ok, yet I still
don't get any guide data? Everything I need is in the xml file
ChannelsPlus.xml. Do I need tvg-chno, tvg-id or other?
Bound to be a way to match m3u to xml.

Help me understand what you are doing with the xml file. Are you using that as the guide source?

The file ChannelsPlus.xml is basically a dump of guide data that Channels uses.
I assigned it with the "Set Provider" options when creating a m3u source.

The guide data for "ABC News Live" is there.

 <channel id="6767">
    <icon src=";h=270"></icon>
  <programme start="20210305153000 +0000" stop="20210305160000 +0000" channel="6767">

What I need to do is match it to my new channel #10.

And my thought that "channel-id" (in m3u) matches to "channel id" (in xml) is not working.
If it was, I'd have guide data. Gotta' be something I'm not understanding here.

The snippet of the XMLTV data you supplied is malformed.

These three things must all be set to the same thing:

  • id attribute of the channel element
  • channel attribute of the programme element
  • channel-id tag of the playlist entry (This is actually optional, but will aid in guide mapping.)

Also, each programme element must have a title element. Because it contains children elements, that means the programme element also needs a closing tag.

As a followup, embedded here is a playlist for remapping TVE channels to their DirecTV channel equivalents. (Because this is tailored for my parents, the Spanish language channels, locals, and a few others have been omitted. However, it is fairly complete.) If you plan to follow this as an example, make sure you set the M3U playlist type to MPEG-TS, not HLS.

To get the most use out of it, it's recommended to have this as a higher priority than the TVE-DTV source on the clients, and stack channels based upon guide data rather than channel number. That way, channels that are received via TVE that have no DirecTV mapping (such as C-SPAN3) will still be present later in the guide, but others (like C-SPAN and C-SPAN2) won't be repeated.

#EXTINF:-1 channel-id="dtv-cspan" channel-number="350" tvc-guide-stationid="68344",CSPAN

#EXTINF:-1 channel-id="dtv-cspan2" channel-number="351" tvc-guide-stationid="68334",CSPAN2

#EXTINF:-1 channel-id="dtv-cc" channel-number="249" tvc-guide-stationid="64599",CCP

#EXTINF:-1 channel-id="dtv-mtv" channel-number="331" tvc-guide-stationid="64630",MTVP

#EXTINF:-1 channel-id="dtv-vh1" channel-number="335" tvc-guide-stationid="64634",VH1P

#EXTINF:-1 channel-id="dtv-cmt" channel-number="327" tvc-guide-stationid="27203",CMTP

#EXTINF:-1 channel-id="dtv-bet" channel-number="329" tvc-guide-stationid="64673",BETP

#EXTINF:-1 channel-id="dtv-tvland" channel-number="304" tvc-guide-stationid="74134",TVLANDP

#EXTINF:-1 channel-id="dtv-para" channel-number="241" tvc-guide-stationid="59186",PARAMOUNT

#EXTINF:-1 channel-id="dtv-logo" channel-number="272" tvc-guide-stationid="96972",LOGOP

#EXTINF:-1 channel-id="dtv-nickjr" channel-number="301" tvc-guide-stationid="87339",NICKJRP

#EXTINF:-1 channel-id="dtv-cnn" channel-number="202" tvc-guide-stationid="58646",CNN

#EXTINF:-1 channel-id="dtv-hln" channel-number="204" tvc-guide-stationid="64549",HLN

#EXTINF:-1 channel-id="dtv-cnni" channel-number="358" tvc-guide-stationid="10146",CNNI

#EXTINF:-1 channel-id="dtv-tbs" channel-number="247" tvc-guide-stationid="58515",TBS

#EXTINF:-1 channel-id="dtv-tbsw" channel-number="247-1" tvc-guide-stationid="67890",TBSP

#EXTINF:-1 channel-id="dtv-tnt" channel-number="245" tvc-guide-stationid="42642",TNT

#EXTINF:-1 channel-id="dtv-tntw" channel-number="245-1" tvc-guide-stationid="61340",TNTP

#EXTINF:-1 channel-id="dtv-tru" channel-number="246" tvc-guide-stationid="64490",TRU

#EXTINF:-1 channel-id="dtv-truw" channel-number="246-1" tvc-guide-stationid="65717",TRUP

#EXTINF:-1 channel-id="dtv-tcm" channel-number="256" tvc-guide-stationid="64312",TCM

#EXTINF:-1 channel-id="dtv-toon" channel-number="296" tvc-guide-stationid="60048",TOON

#EXTINF:-1 channel-id="dtv-toonw" channel-number="297" tvc-guide-stationid="67703",TOONP

#EXTINF:-1 channel-id="dtv-aetv" channel-number="265" tvc-guide-stationid="51529",AETV

#EXTINF:-1 channel-id="dtv-hist" channel-number="269" tvc-guide-stationid="14771",HISTORY

#EXTINF:-1 channel-id="dtv-fyi" channel-number="266" tvc-guide-stationid="58988",FYI

#EXTINF:-1 channel-id="dtv-life" channel-number="252" tvc-guide-stationid="60150",LIFETIME

#EXTINF:-1 channel-id="dtv-msnbc" channel-number="356" tvc-guide-stationid="64241",MSNBC

#EXTINF:-1 channel-id="dtv-cnbc" channel-number="355" tvc-guide-stationid="58780",CNBC

#EXTINF:-1 channel-id="dtv-usa" channel-number="242" tvc-guide-stationid="74030",USAP

#EXTINF:-1 channel-id="dtv-syfy" channel-number="244" tvc-guide-stationid="65626",SYFYP

#EXTINF:-1 channel-id="dtv-e" channel-number="236" tvc-guide-stationid="91579",EP

#EXTINF:-1 channel-id="dtv-bravo" channel-number="237" tvc-guide-stationid="73994",BRAVOP

#EXTINF:-1 channel-id="dtv-oxy" channel-number="251" tvc-guide-stationid="74032",OXYGENP

#EXTINF:-1 channel-id="dtv-ukds" channel-number="295" tvc-guide-stationid="105306",SPROUTP

#EXTINF:-1 channel-id="dtv-ngc" channel-number="276" tvc-guide-stationid="49438",NGC

#EXTINF:-1 channel-id="dtv-ngcp" channel-number="276-1" tvc-guide-stationid="71601",NGCP

#EXTINF:-1 channel-id="dtv-ngwld" channel-number="283" tvc-guide-stationid="67331",NGWILD

#EXTINF:-1 channel-id="dtv-fnc" channel-number="360" tvc-guide-stationid="60179",FNC

#EXTINF:-1 channel-id="dtv-fbn" channel-number="359" tvc-guide-stationid="58718",FBN

#EXTINF:-1 channel-id="dtv-fx" channel-number="248" tvc-guide-stationid="58574",FX

#EXTINF:-1 channel-id="dtv-fxw" channel-number="248-1" tvc-guide-stationid="59814",FXP

#EXTINF:-1 channel-id="dtv-fxx" channel-number="259" tvc-guide-stationid="66379",FXX

#EXTINF:-1 channel-id="dtv-fxxw" channel-number="259-1" tvc-guide-stationid="82571",FXXP

#EXTINF:-1 channel-id="dtv-fxm" channel-number="258" tvc-guide-stationid="14988",FXM

#EXTINF:-1 channel-id="dtv-sundance" channel-number="239" tvc-guide-stationid="92041",SUNDANCE

#EXTINF:-1 channel-id="dtv-amc" channel-number="254" tvc-guide-stationid="59337",AMC

#EXTINF:-1 channel-id="dtv-bbca" channel-number="264" tvc-guide-stationid="64492",BBCA

#EXTINF:-1 channel-id="dtv-ifc" channel-number="333" tvc-guide-stationid="92008",IFC

#EXTINF:-1 channel-id="dtv-wetv" channel-number="260" tvc-guide-stationid="92020",WETV

#EXTINF:-1 channel-id="dtv-hmc" channel-number="312" tvc-guide-stationid="66268",HALLMARK

#EXTINF:-1 channel-id="dtv-hmm" channel-number="565" tvc-guide-stationid="46710",HALLMARKMM

#EXTINF:-1 channel-id="dtv-hdr" channel-number="564" tvc-guide-stationid="105723",HALLMARKDRAMA

#EXTINF:-1 channel-id="dtv-ova" channel-number="274" tvc-guide-stationid="69061",OVATION

#EXTINF:-1 channel-id="dtv-weather" channel-number="362" tvc-guide-stationid="58812",WEATHER

#EXTINF:-1 channel-id="dtv-reelz" channel-number="238" tvc-guide-stationid="52199",REELZ

#EXTINF:-1 channel-id="dtv-own" channel-number="279" tvc-guide-stationid="70388",OWN

#EXTINF:-1 channel-id="dtv-disc" channel-number="278" tvc-guide-stationid="56905",DISCOVERY

#EXTINF:-1 channel-id="dtv-food" channel-number="231" tvc-guide-stationid="50747",FOOD

#EXTINF:-1 channel-id="dtv-apl" channel-number="282" tvc-guide-stationid="57394",ANIMAL-PLANET

#EXTINF:-1 channel-id="dtv-hgtv" channel-number="229" tvc-guide-stationid="49788",HGTV

#EXTINF:-1 channel-id="dtv-tlc" channel-number="280" tvc-guide-stationid="57391",TLC

#EXTINF:-1 channel-id="dtv-trvl" channel-number="277" tvc-guide-stationid="59303",TRAVEL

#EXTINF:-1 channel-id="dtv-id" channel-number="285" tvc-guide-stationid="65342",INVESTIGATION-DISCOVERY

#EXTINF:-1 channel-id="dtv-diy" channel-number="230" tvc-guide-stationid="67375",DIY

#EXTINF:-1 channel-id="dtv-cook" channel-number="232" tvc-guide-stationid="68065",COOKING-CHANNEL

#EXTINF:-1 channel-id="dtv-sci" channel-number="284" tvc-guide-stationid="57390",SCIENCE

#EXTINF:-1 channel-id="dtv-ahc" channel-number="287" tvc-guide-stationid="78808",AHC

#EXTINF:-1 channel-id="dtv-dest" channel-number="286" tvc-guide-stationid="60468",DESTINATION-AMERICA

#EXTINF:-1 channel-id="dtv-dlif" channel-number="261" tvc-guide-stationid="92204",DISCOVERY-LIFE

#EXTINF:-1 channel-id="dtv-mtrtrd" channel-number="281" tvc-guide-stationid="31046",MOTORTREND

#EXTINF:-1 channel-id="dtv-dis" channel-number="290" tvc-guide-stationid="59684",DISNEY

#EXTINF:-1 channel-id="dtv-disw" channel-number="291" tvc-guide-stationid="63320",DISNEYP

#EXTINF:-1 channel-id="dtv-disjr" channel-number="289" tvc-guide-stationid="74885",DISNEYJR

#EXTINF:-1 channel-id="dtv-disjrw" channel-number="289-1" tvc-guide-stationid="75004",DISNEYJRP

#EXTINF:-1 channel-id="dtv-dxd" channel-number="292" tvc-guide-stationid="60006",DISNEYXD

#EXTINF:-1 channel-id="dtv-dxdw" channel-number="292-1" tvc-guide-stationid="63322",DISNEYXDP

#EXTINF:-1 channel-id="dtv-frfm" channel-number="311" tvc-guide-stationid="59615",FREEFORM

#EXTINF:-1 channel-id="dtv-frfmw" channel-number="311-1" tvc-guide-stationid="63324",FREEFORMP

#EXTINF:-1 channel-id="dtv-espn" channel-number="209" tvc-guide-stationid="32645",ESPN1

#EXTINF:-1 channel-id="dtv-espn2" channel-number="209" tvc-guide-stationid="45507",ESPN2

#EXTINF:-1 channel-id="dtv-espnu" channel-number="208" tvc-guide-stationid="60696",ESPNU

#EXTINF:-1 channel-id="dtv-espnews" channel-number="207" tvc-guide-stationid="59976",ESPNEWS

#EXTINF:-1 channel-id="dtv-sec" channel-number="611" tvc-guide-stationid="89714",SEC

#EXTINF:-1 channel-id="dtv-lhn" channel-number="677" tvc-guide-stationid="72861",LONGHORN

#EXTINF:-1 channel-id="dtv-acc" channel-number="612" tvc-guide-stationid="111871",ACC

#EXTINF:-1 channel-id="dtv-tennis" channel-number="217" tvc-guide-stationid="60316",TENNIS

#EXTINF:-1 channel-id="dtv-golf" channel-number="218" tvc-guide-stationid="61854",GOLF

#EXTINF:-1 channel-id="dtv-olympic" channel-number="624" tvc-guide-stationid="104089",OLYMPICS

#EXTINF:-1 channel-id="dtv-nbcsn" channel-number="220" tvc-guide-stationid="48639",NBCSN

#EXTINF:-1 channel-id="dtv-nesn" channel-number="628" tvc-guide-stationid="35038",NESN

#EXTINF:-1 channel-id="dtv-nesna" channel-number="628-1" tvc-guide-stationid="63516",NESNPLUS

#EXTINF:-1 channel-id="dtv-nfl" channel-number="212" tvc-guide-stationid="45399",NFL

#EXTINF:-1 channel-id="dtv-mlb" channel-number="213" tvc-guide-stationid="62079",MLBTV

#EXTINF:-1 channel-id="dtv-cbssn" channel-number="221" tvc-guide-stationid="59250",CBSSPORTS

#EXTINF:-1 channel-id="dtv-fs1" channel-number="219" tvc-guide-stationid="82547",FS1

#EXTINF:-1 channel-id="dtv-fs2" channel-number="618" tvc-guide-stationid="59305",FS2

#EXTINF:-1 channel-id="dtv-btn" channel-number="610" tvc-guide-stationid="58321",BTN

#EXTINF:-1 channel-id="dtv-fswest" channel-number="692" tvc-guide-stationid="116191",FS-RSN-FSW3LA

#EXTINF:-1 channel-id="dtv-nasa" channel-number="352" tvc-guide-stationid="12553",NASA

#EXTINF:-1 channel-id="dtv-"newsmax channel-number="349" tvc-guide-stationid="97163",NEWSMAX

#EXTINF:-1 channel-id="dtv-bloom" channel-number="353" tvc-guide-stationid="71799",BLOOMBERG

#EXTINF:-1 channel-id="dtv-nhkw" channel-number="322" tvc-guide-stationid="66347",NHKWRLD

#EXTINF:-1 channel-id="dtv-fstv" channel-number="348" tvc-guide-stationid="16220",FSTV

#EXTINF:-1 channel-id="dtv-rt" channel-number="321" tvc-guide-stationid="105350",RT-AMERICA

Thanks for the DirecTV mapping. That really needs
to be in a reference section or at least, a "sticky".
Will save alot of time in not having to search.

Sorry about the XMLTV data. I purposely did that
as not to show hours and hours of data. The title
is present in each entry and closing tags are there.

However, it does show the data is there and that
<channel id="6767"> and channel="6767". Those
were results of a system generated file.
In my m3u file I have channel-id="6767".

I think that gets all three of your bullets for
"must all be set to the same thing?"

Well, without the actual XMLTV, it's not really possible to tell you what's going on. That's the problem with only posting portions of the data, or selectively editing/removing parts: something might get lost in translation.

Also, you may want to see about validating your XMLTV to ensure that your file is correct and well-formed. The XMLTV project provides tv_validate_file to ensure you've got a good file that can be parsed.

I'm still not clear why the XML Tv Guide data is involved and I may not be understanding fully. But I'll show how I remap channels on my DVR.

I have 1 Channels DVR as a "server". No recordings or season passes are configured. I setup the guide data in the traditional way for each source (YTTV, HDHR, Locast).

I have 3 Channel DVRs running in containers (but that doesn't matter).

On each of the 3 Channel DVRs (each person in the household has their own DVR) I do the following:

  • I create a m3u with custom channel numbers as show earlier. The video URL simply points back to my Channels-DVR "server".
  • The guide data for the m3u's is configured as "Custom XML" and it points to the "server" guide endpoint:
  • This gives me a guide source as X-M3U which all m3u can use.

Each personal DVR has a 4 m3u sources (Local, TVE, Pluto, Sports) but only one guide source and that's the X-M3U.

The point is that if you properly set the tvc-guide-stationid tag in the playlist, you don't need the XMLTV. Channels will pick up this tag, and automatically map the guide data. For channels that are simply 24 hour streaming news streams, there is no StationID, and no guide data.

If all you're doing is feeding one Channels instance into another, then there is no need to make it more complicated.

racameron and mike,

Thanks for all your help!

Didn't totally resolve this,
but learned alot in the processs.

mike - members of your household should consider themselves lucky!
racameron - Gracenote it is. And the list of IDs is great!

1 Like

I was finally able to achieve want I wanted.

The solution was to alter my copy of the guide
data with a small program that created my own mappings.

Assigned actual channel numbers to my locals.
And ranges for other categories.

0 - 99 Locals
100 - 199 Entertainment
200 - 299 News
300 - 399 Kids
400 - 499 Sports

Even went as far as using group-title="" for these.
Channels appears to not use these, as it appears to
get categories from the guide data on a per airing
basis. But the order allows me to know where I am
in the guide.

The second screenshot shows that the streaming services
ABC New Live and CBSN have guide data. This is one
advantage of using the XMLTV that already exists.

Probably polish some rough edges and pay-the-man at
Channels for my next month!

1 Like

i just saw this now, but i'll throw this out there:

As a followup, embedded here is a playlist for remapping TVE channels to their DirecTV channel equivalents. (Because this is tailored for my parents, the Spanish language channels, locals, and a few others have been omitted. However, it is fairly complete.) If you plan to follow this as an example, make sure you set the M3U playlist type to MPEG-TS , not HLS.

I'm running on a Pi. Can I put the mapping file back on the Pi, not have to have anyplace else to host it?

This sounds exactly what I'm wanting. Can you share any tips or the file location of what you had to modify?

Yes. Or just paste it into the DVR web UI.

Ah! I think I found it. There's a whole lot in the custom channels thing I need to learn more about.