USING MC2XML TO MAKE YOUR OWN EPG - tuturial with open discussion

I tried watching something earlier and the channel borked so I had to use the task manager to kill Kodi and that put every channel (dammit) back in the pvr, so I gave the Kodi TV Manager a try again. Guess what? It worked. Wanted to pass that info along to you. Just make sure you change the channels in both places (top and bottom) and it should work for you, too. It was all done in 4 minutes as opposed to 30 in Kodi.

Not that the channels are actually working though...

Ex, Thank you buddy for passing the info about Kodi Channel Manager, works without a hitch and like you said instead of spending 30 minutes on clicking each channel it took me few minutes to disable the channels I don't want and I don't watch.
Plus I don't know if you noticed but by using fewer channels it uses less RAM so the system works a bit faster and snappier. You can disable the channel alone or channel and the epg. Nicee. Again Thank you EX for pointing out this great little software.

Have a great one buddy.
 
Good Morning Everyone,

Thanks for the excellent instructions for the DIY guide and taking the time to do so. I have a quick question. Now i have my text files renamed to cl and ren (eg. us.cl, us. ren, uk.cl, uk.ren) But when i run the command "mc2xml (-J user/pass) -D us.dat -C us.chl -R us.ren -d 200 -a -U -u -F -o us.xml" (my username and password is inserted by user/pass) i dont get any UK channels, maybe i am doing something wrong?For the US channels you login to SD and choose a lineup but how do i get the UK channels from SD as well. I tried searching but no results. Also i have three 4 files that are empty, mc2xml.dat, mc2xml.ren, us.dat, uk.dat. There are no information in those files. Should those files be empty? Thanks for any assistance. Truly appreciate it.
 
@zedenka,

The channels should follow this naming convention. uk.chl, uk.dat, uk.ren . The command line you posted would only give you US channels. To include UK channels the command would be:

mc2aml (-J user/pass) -D us.dat -C us.chl -R us.ren -d 200 -U -u -a -F -I uk.xml -o us.xml

Which then requires you to create the UK channels first. The -I give you the ability to add/combine two xmls.

I only run -d 48, otherwise it takes too long for the guide to load 200hrs. I also do not use -a , I don't need to know which channels have new programming.

To create the UK files, make sure to first rename your existing .dat file and .xml file or they will get overwritten. Same process, just load up the SD GUI only this time select GB enter postal code (I think I used CF31) and let mc2xml create the xml file and dat files. same as you did for US. Rename these files to uk.xml, uk.dat . The resulting xml will contain all channels. So you need to create the uk.chl lists in a text file format.
 
@cwh060

Thanks a lot for all your assistance. I truly appreciate it. I think i got it working so now i want to test it. I am using Perfect IPTV Player and for the EPG they are asking for a URL for the guide. Can i host my xml file online so my family, friends and even the forum can have access to it and use? Any recommendations on which website to use? So when person enter the URL information it goes straight to the EPG? THanks for any assistance.
 
@cwh060

Thanks a lot for all your assistance. I truly appreciate it. I think i got it working so now i want to test it. I am using Perfect IPTV Player and for the EPG they are asking for a URL for the guide. Can i host my xml file online so my family, friends and even the forum can have access to it and use? Any recommendations on which website to use? So when person enter the URL information it goes straight to the EPG? THanks for any assistance.

Since you are using Perfect Player, it can use an epg in a zip format (or several other compressed formats). So, you can use any free file sharing site. Google for them and pick one. Alternatively, you can use google drive or dropbox.
If you look in the thread, there's a few times where I shared my epg for a few weeks. That will show you which service I used. It was free.

Since I am now using a playlist and only have 182 channels active, doing an epg for one week (I use 150 hours) is no problem as far as loading time. It loads up...FAST!
 
@expatter

Thanks a lot my friend, i now finish loading the application and it work but it only loaded 39 channels. So i looked at the epg through Perfect Player i realize that it is pulling the last channel name instead of the first. For example:

<display-name>ITV</display-name>
<display-name>178 ITV</display-name>
<display-name>178</display-name>
<display-name>ITV1 HD (London)</display-name>

Instead of seeing ITV, Perfect IPTV player is seeing ITV1 HD (London) which is the last display name.


Same thing with Fox:

<display-name>FOX</display-name>
<display-name>188 FOX</display-name>
<display-name>188</display-name>
<display-name>FXHDE</display-name>

FOX is not showing but FXHDE so Perfect Player wont recognized it.

Am i doing something wrong? This issue is happening with most ( about 90%) of the channels. Why is it not using the first display name but the last? Any assistance will be greatly appreciated. Sooo close yet it feel so far. lol.
 
@expatter

Thanks a lot my friend, i now finish loading the application and it work but it only loaded 39 channels. So i looked at the epg through Perfect Player i realize that it is pulling the last channel name instead of the first. For example:

<display-name>ITV</display-name>
<display-name>178 ITV</display-name>
<display-name>178</display-name>
<display-name>ITV1 HD (London)</display-name>

Instead of seeing ITV, Perfect IPTV player is seeing ITV1 HD (London) which is the last display name.


Same thing with Fox:

<display-name>FOX</display-name>
<display-name>188 FOX</display-name>
<display-name>188</display-name>
<display-name>FXHDE</display-name>

FOX is not showing but FXHDE so Perfect Player wont recognized it.

Am i doing something wrong? This issue is happening with most ( about 90%) of the channels. Why is it not using the first display name but the last? Any assistance will be greatly appreciated. Sooo close yet it feel so far. lol.

I'm sorry, but I can't really help with this one. While PP is a great app, I don't use it due to problems with some channels buffering and epg parse errors. I know there are settings you can tweak (and I have) but I would prefer an app that let's you have a local xmltv file only and not something net-based. And since Simple Client is working a treat for me now that we have the playlist optioin...

But I did look at the forum on kodi.tv as well as the devs forum at niklabs.com and the guy is incredibly responsive, so I would suggest you just ask there. Sorry I fell down on this one. :(
 
Hey guys,

I am working on my EPG Guide and I am able to get the US channels from schedules direct the way expatter explained. Did anyone knows where I get the information from the latinoamerica and mexico channels? I have not been able to find the channels on schedules direct, but on their website mexico is on the list.

I will appreciate the information

GREAT JOB expatter!!!! very easy steps to follow.

Thanks
 
If you start the mc2xml.exe, and then select Mexico from the drop down. Input postal code (I used Mexico City) and then select Sky Mexico Digital. That should give you most of the channels. I only use a couple, so unfortunately you'll have to search the mx.xml once it's created to find the channels needed.

I combine mc2xml files with webgrab+ files for my guide.

cwh
 
Hey guys,

I am working on my EPG Guide and I am able to get the US channels from schedules direct the way expatter explained. Did anyone knows where I get the information from the latinoamerica and mexico channels? I have not been able to find the channels on schedules direct, but on their website mexico is on the list.

I will appreciate the information

GREAT JOB expatter!!!! very easy steps to follow.

Thanks

cwh060 gave you a good answer to getting these channels. Something else you could do though, is get the url for pach's epg since it also has Spanish channels and open the url in a web browser and look through the guide and copy the channel names and IDs to a .chl and .ren file to pull just those channels.

Glad my tutorial helped you out in getting started with pulling your own guide data. Cheers!
 
cwh060 gave you a good answer to getting these channels. Something else you could do though, is get the url for pach's epg since it also has Spanish channels and open the url in a web browser and look through the guide and copy the channel names and IDs to a .chl and .ren file to pull just those channels.

Glad my tutorial helped you out in getting started with pulling your own guide data. Cheers!

cwh060 Thank for the info, I was forgetting to choose the MX region. How are you able to access SD and grab the information using Webgrab+?

The only issue I am having is with the timezone time and I haven't been able to figure out. When I grab the information from SD, the time is UTC and I am on CST and on the command is the -U -u options. Is there something missing on the command?

mc2xml -J User: Password -D USdirect.dat -C USdirect.chl -R USdirect.ren -d 120 -U -u -F -o USdirect.xml

Start time .. : 2017-05-09T00:00:00 UTC
End time .... : 2017-05-15T02:30:00 UTC

programme start="20170509100000 +0000" stop="20170509110000 +0000"

Thanks,:cool:
 
The commands look right. The timezone (if I recall) is a function of whatever EPG you are using. I'm in EDT, for me it just worked without having to do anything.

For mixing Webgrab+ and SD, I used the mc2xml command, similar to combining SD XML's. I run the Webgrab+ files an hour, before the SD files are generated. The output of WG is the same directory of SD xml files.

Then I use
mc2xml -J User/Pass -D can.dat -C can.chl - R can.ren -d 48 -F -U -u -I Webgrab.xml -o can.xml

my next line then combines the can.xml (which now has Webgrab.xml) embedded to my next list in this case Mexico.

mc2xml -J User/Pas -D mx.dat -C mx.chl -R mx.ren -d 48 -F -U -u -I can.xml -o mx.xml

Eventually my final output is a guide.xml which is output to my Apache directory, where all my devices can pick up the EPG and channel M3U's.
 
The commands look right. The timezone (if I recall) is a function of whatever EPG you are using. I'm in EDT, for me it just worked without having to do anything.

For mixing Webgrab+ and SD, I used the mc2xml command, similar to combining SD XML's. I run the Webgrab+ files an hour, before the SD files are generated. The output of WG is the same directory of SD xml files.

Then I use
mc2xml -J User/Pass -D can.dat -C can.chl - R can.ren -d 48 -F -U -u -I Webgrab.xml -o can.xml

my next line then combines the can.xml (which now has Webgrab.xml) embedded to my next list in this case Mexico.

mc2xml -J User/Pas -D mx.dat -C mx.chl -R mx.ren -d 48 -F -U -u -I can.xml -o mx.xml

Eventually my final output is a guide.xml which is output to my Apache directory, where all my devices can pick up the EPG and channel M3U's.

I was able to figure out why I was getting the channels on UTC time. Looks like the version I downloaded mc2mxl.exe v16 doesn't need the -u when the command runs. hopefully I will have my EPG setup this weekend.;)

mc2xml -J user/PW -U -F -D data.dat -C data.chl -R data.ren -d 48 -o data.xml
programme start="20170510120000 -0500" stop="20170510130000 -0500"

The only issues I am having is with the channels have these words "Español & Televisión" the "ñ & ó" looks like mc2mxl doesn't recognize them and guide does not load for those channels and finding some of the channels on SD.
are you using the -a or -A on your script? and how often you run the script?

Thanks a lot for you help Expatter & cwh060,
Cheers!!!!
 
I do not use the -A or -a, I just don't like my EPG populated with an * when no program is available, just a preference really.

I know the "&" is a special character I tried escaping it using & but it didn't work suspect I missed the ; after now just reviewing. You will have to find the escape characters for the Spanish letters. In my case I just changed the EPG channel name to A and E from A&E, works fine.

Found this.
Code:
http://www.starr.net/is/type/htmlcodes.html

I run the script every night and request data for 48hrs. (Sometimes my Apache server goes down, so at least I have a guide till I get it back up. )
 
Last edited:
I do not use the -A or -a, I just don't like my EPG populated with an * when no program is available, just a preference really.

I know the "&" is a special character I tried escaping it using & but it didn't work suspect I missed the ; after now just reviewing. You will have to find the escape characters for the Spanish letters. In my case I just changed the EPG channel name to A and E from A&E, works fine.

Found this.
Code:
http://www.starr.net/is/type/htmlcodes.html

I run the script every night and request data for 48hrs. (Sometimes my Apache server goes down, so at least I have a guide till I get it back up. )

That make sense I will try to modify the EPG file and I will create a schedule task on my Windows machine.

I thought I fix the issue with the timezone but at least is only 1 hour off for now. Is getting the UTC -0500 EST but I need the UTC -0600 CST

Cheers!
 
That make sense I will try to modify the EPG file and I will create a schedule task on my Windows machine.

I thought I fix the issue with the timezone but at least is only 1 hour off for now. Is getting the UTC -0500 EST but I need the UTC -0600 CST

Cheers!

A few more options to try:

You can add the following to the top of the playlist m3u to fix the 1 hour offset in Kodi 17.1:

#EXTM3U
tvg-shift=-1
#EXTINF:-1 tvg-id="I243.10112.schedulesdirect.org" tvg-name="CHching!" tvg-logo="http://content.iptvprivateserver.tv:88/stalker_portal/misc/logos/240/3660.png" group-title="Entertainments",CHching! etc ...

For Kodi Jarvis, just change the epg offset in the Simple Client pvr settings and select to Apply To All Channels. (This works a treat for me every time. Easiest option.)

Krypton Note: In Kodi settings>TV> Clear data and also Guide data. Exit Kodi. Delete the TV29.db and EPG11.db from UserData/Database/ and also delete all the the files from the cache directory Kodi/Cache (delete the cookie.dat file as well).

Restart Kodi and clear data for TV and Guide again. (I had to do it twice...) Should load up ok now.

Awardspace.info has a tool called xmltv_time_correct.exe and a batch file to fix offsets.

(xmltv_time_correct is a small program that allows to change the start and stop times for certain channels in a xmltv file.)

bat file directory contents info~

How to use :

1. edit xmltv_time_correct.bat
It contains text lines how to do that.
2. edit chans2correct.xml
It contains text lines how to do that.
3. run xmltv_time_correct.bat

Hope this helps.
 
Last edited:
A few more options to try:

You can add the following to the top of the playlist m3u to fix the 1 hour offset in Kodi 17.1:

#EXTM3U
tvg-shift=-1
#EXTINF:-1 tvg-id="I243.10112.schedulesdirect.org" tvg-name="CHching!" tvg-logo="http://content.iptvprivateserver.tv:88/stalker_portal/misc/logos/240/3660.png" group-title="Entertainments",CHching! etc ...

For Kodi Jarvis, just change the epg offset in the Simple Client pvr settings and select to Apply To All Channels. (This works a treat for me every time. Easiest option.)

Krypton Note: In Kodi settings>TV> Clear data and also Guide data. Exit Kodi. Delete the TV29.db and EPG11.db from UserData/Database/ and also delete all the the files from the cache directory Kodi/Cache (delete the cookie.dat file as well).

Restart Kodi and clear data for TV and Guide again. (I had to do it twice...) Should load up ok now.

Awardspace.info has a tool called xmltv_time_correct.exe and a batch file to fix offsets.

(xmltv_time_correct is a small program that allows to change the start and stop times for certain channels in a xmltv file.)

bat file directory contents info~

How to use :

1. edit xmltv_time_correct.bat
It contains text lines how to do that.
2. edit chans2correct.xml
It contains text lines how to do that.
3. run xmltv_time_correct.bat

Hope this helps.

Expatter thanks so much for taking this time to help me out and also cwh060.

I tried everything you mention but didn't work.

But I was able this time to figure out how to make the mc2xml.exe to set the CST 1 hour offset on my Windows 10 PC. Looks like the mc2xml.exe is not able to convert the 1 hour offset on Windows 10 or 8. The only way I was able get the UTC -0600 CST is manually changing the dstoff on the script.

Here is the script, (the timeout is for me to see if if the time change)

tzutil /s "Central Standard Time_dstoff" (This command made the trick for the 1 hour offset)
timeout /T 10
mc2xml -J user/PW -U -F -D Mexdata.dat -C Mexdata.chl -R Mexdata.ren -d 48 -o Mexdata.xml (Most Mex Channels)
mc2xml -J user/PW -U -F -D UKdata.dat -C UKdata.chl -R UKdata.ren -d 48 -I Mexdata.xml -o UKdata.xml (Only Sport Channels)
mc2xml -J user/PW -U -F -D USdata.dat -C USdata.chl -R USdata.ren -d 48 -I UKdata.xml -o TVGuide.xml (All USA Channels)
timeout /T 30
tzutil /s "Central Standard Time"
timeout /T 10


"programme start="20170519033000 -0600" stop="20170519040000 -0600" - (CST)"

Hope this will help anyone having this issue.
 
Last edited:
Expatter thanks so much for taking this time to help me out and also cwh060.

I tried everything you mention but didn't work.

But I was able this time to figure out how to make the mc2xml.exe to set the CST 1 hour offset on my Windows 10 PC. Looks like the mc2xml.exe is not able to convert the 1 hour offset on Windows 10 or 8. The only way I was able get the UTC -0600 CST is manually changing the dstoff on the script.

Here is the script, (the timeout is for me to see if if the time change)

tzutil /s "Central Standard Time_dstoff" (This command made the trick for the 1 hour offset)
timeout /T 10
mc2xml -J user/PW -U -F -D Mexdata.dat -C Mexdata.chl -R Mexdata.ren -d 48 -o Mexdata.xml (Most Mex Channels)
mc2xml -J user/PW -U -F -D UKdata.dat -C UKdata.chl -R UKdata.ren -d 48 -I Mexdata.xml -o UKdata.xml (Only Sport Channels)
mc2xml -J user/PW -U -F -D USdata.dat -C USdata.chl -R USdata.ren -d 48 -I UKdata.xml -o TVGuide.xml (All USA Channels)
timeout /T 30
tzutil /s "Central Standard Time"
timeout /T 10


"programme start="20170519033000 -0600" stop="20170519040000 -0600" - (CST)"

Hope this will help anyone having this issue.

Thanks for sharing this solution with us and kudos for figuring it out! I'm going to give it a try myself for krypton. I just installed Leia on a usb and it also has the 1 hour ahead epg issue. Aside from that, I can't get over how blazingly fast it is in every way, and most notable being startup and exit.

There is another solution that should work across all versions and platforms and that is with adding a line in advancedsettings.xml:

<pvr>
<timecorrection>-60</timecorrection> <!-- Correct all times (epg tags, timer tags, recording tags) by this amount of minutes. -->
</pvr>

It's good to share different options with users. Cheers.