|
mc2xml options (case sensitive):
- -a append " *" to new programs
- -A append " *" to live programs
- -F output channel "name" first (rather than "number name")
- -L include <live /> tag (not part of xmltv.dtd)
- -u output date/time in UTC (default = localtime)
- -U output UTF-8 (default = "ISO-8859-1")
- -f force re-download (use with caution)
- -d <#> set listings duration (in hours)
- -s <[+/-]#> set listings relative start position (in hours)
- -c <code> set country code
- -g <code> set postal/zip code
- -w <seconds> wait for <seconds> and exit
- -t use titantv service
- -y <id> set 30 char id for titantv service
- -T <user>:<pass> use schedules direct service
- -i <#> add <#> to all channel numbers
- -I <xmltv file> include <xmltv file> in output
- -R <filename> set ren filename (default = "mc2xml.ren")
- -D <filename> set dat filename (default = "mc2xml.dat")
- -C <filename> set channel file (default = "mc2xml.chl")
- -o <filename> set output file (default = "xmltv.xml")
mc2xml quickstart: (see also: FAQ: gbpvr, mythtv, mediaportal, ...)
- Windows:
- Run "mc2xml", it has a simple graphical user interface
- Input postal code and country code and press OK
- Select lineup number from the returned list and an xmltv.xml file will be produced
- Other OSs and command line usage:
- Run mc2xml with both the -c and -g parameters to set your location
- -t is optional, and only works for US zipcodes
- -T is optional, and requires an account user:pass (-c & -g are not needed)
- -U is required for languages that contain non ISO-8859-1 characters
- Select lineup number from the returned list and an xmltv.xml file will be produced
- mc2xml setup examples:
- US: mc2xml -c us -g 20006
- US: mc2xml -c us -g 20006 -t -y <id>
- CA: mc2xml -c ca -g M1N2K3
- AT: mc2xml -c at -g 1000
- BE: mc2xml -c be -g 1000
- BR: mc2xml -c br -g 20010-020
- CH: mc2xml -c ch -g 1000
- CZ: mc2xml -c cz -g "100 10"
- DE: mc2xml -c de -g 10000
- DK: mc2xml -c dk -g 1000
- ES: mc2xml -c es -g 28000
- FI: mc2xml -c fi -g 10000
|
- FR: mc2xml -c fr -g 10000
- IE: mc2xml -c ie -g 0
- IL: mc2xml -c il -g 10000 -U
- IN: mc2xml -c in -g 110000
- JP: mc2xml -c jp -g 1028000 -U
- KR: mc2xml -c kr -g 100 -U
- MX: mc2xml -c mx -g 22440
- NL: mc2xml -c nl -g 1000
- NO: mc2xml -c no -g 1000
- PL: mc2xml -c pl -g 11-111
- SE: mc2xml -c se -g "100 10"
- SK: mc2xml -c sk -g "100 10"
- UK: mc2xml -c gb -g "SW1X 7LA"
|
 |
| mc2xml.exe (1469952 bytes) |
| MD5SUM:
03d040dc84e9ff35cf92b6e370f1a4a9
|
|
|
|
|
 |
| mc2xml (1781232 bytes) |
| MD5SUM:
f722d9cae85c2af2ddac25522b379387
|
|
|
|
|
 |
| mc2xml (2649740 bytes) |
| MD5SUM:
9e4a8884b9f0e8f15887e716e4e25ed5
|
|
|
|
|
- please do not mirror/redistribute files; integration within other package distributions prohibited without consent
- avoid malicious code by always downloading from the homepage and checking the hash!
- verify downloaded filesize to make sure your download is complete! if the program doesn't work ("not a valid application" or "program too big to fit" error) the download was interrupted and left incomplete!
|
|
DonationWare: If this software is useful to you please donate!
| |
This software is not crippled, but it is not freeware either. If you determine that it is useful to you please donate an appropriate amount. If it isn't useful, then you probably won't be using it! :)
|
- Microsoft legacy service: Vista Media Center (and all previous versions of media center) offer Satellite, Cable and NTSC listings for many countries, but the data service might not fully support ATSC with subchannels for the North American market (yet?). Microsoft calls this the "legacy service".
- TitanTV service: offers Satellite/Cable/NTSC & ATSC listings but only for the US market. The listings are good and the ATSC service seems complete, but the program details are not as robust as the media center service.
- Schedules direct service: is a subscription based service (with 7 day trial) for Satellite/Cable/NTSC/ATSC TV listings in North America (and additional regions) from TMS/Zap2it.
- Microsoft's (newest) service: If you have used Windows 7 you might have noticed more program information in the guide. It uses a completely new TV data service that seems to support everything that the microsoft legacy service supported, but adds full ATSC/subchannel support ("Digital Terrestrial"), plus listings include writer/producer credits, some season info,
DVD cover
&
program
images , as well as other miscellaneous program details.
 |
Support for this new service in mc2xml is working, and now donators above the $20 level are welcome to request this version if they want to try it out (please specify operating system).
(PBS offers mugs for donations; I don't have a mug for you but maybe this additional incentive will entice you to donate for the work that goes into mc2xml :) )
|
- mc2xml will save your lineup selection to "mc2xml.dat" in the current directory. (It does not save -o or other input/output optional parameters other than -U/-u/-F/-A/-a)
- Run "mc2xml" from the directory where "mc2xml.dat" is located whenever you want to output a new xml file. No command line parameters
are required once the "mc2xml.dat" file has been created if you use the default input/output filenames (mc2xml.chl, xmltv.xml, etc).
- To save bandwidth, the "mc2xml.dat" file also saves the version number of the listings when using one of the media center services. If you
run mc2xml again and the listings have not been updated on the server, they will not be
downloaded again ("No new data available").
If you need to temporarily force a redownload the -f option can be used, (not necessary on the titantv or schedules direct services), but since this can overburden the servers it isn't recommended.
It appears that media center server listings are only updated once a day at most, sometimes less frequently (and never on sunday's).
- If you only want to include certain channels in your xml file
you can create a "mc2xml.chl" text file (in the same directory as mc2xml.dat) listing the channel numbers, channel number ranges, channel names, or channel ids on separate lines:
5
9-15
17-21.2
HBO
BBC2 London
I20.515292.microsoft.com
I51.5.34392.tmsdatadirect.com
I54.3.3945.titantv.com
|
- If you want to rename some channel numbers or names you can create a "mc2xml.ren" text file (in the same directory as mc2xml.dat) listing the colon separated from:to channel numbers or names on separate lines:
(the "from" can also be a channel id, to distinguish duplicate channel numbers or names)
605:2
BBC1:BBC News
I20.515292.microsoft.com:55
|
- How would I use mc2xml with GBPVR?
- Create a folder for the EPG data and put the mc2xml.exe binary in that folder (use a GUI file manager or command line)
- Optionally create an "mc2xml.chl" file listing the channels you want included in your EPG (see above for file format) (make sure that notepad doesn't append a ".txt" extension to this filename)
- md "C:\Program Files\Devnz\GBPVR\EPG"
- copy "C:\mc2xml.exe" "C:\Program Files\Devnz\GBPVR\EPG\"
- notepad "C:\Program Files\Devnz\GBPVR\EPG\mc2xml.chl"
- Create a file called "UpdateEPG.bat" in the GBPVR folder and edit it with a text editor (notepad). Add any optional command line parameters to mc2xml that you might want. (make sure that notepad doesn't append a ".txt" extension to this filename)
| C:\Program Files\Devnz\GBPVR\UpdateEPG.bat |
|
C:
cd "C:\Program Files\Devnz\GBPVR\EPG"
mc2xml
|
|
- Run this .bat file (double click on UpdateEPG.bat) and mc2xml will ask you to input your Postal/Zip code (ie: "10000"), Country Code (ie: "us"), and will allow you to toggle any options (check "-a" and/or "-A" if you want *'s in your listings to indicate new programs).
It will then ask you to select a lineup number.
mc2xml will save this selection to mc2xml.dat and create an xmltv.xml file in this folder. (If you selected the wrong lineup delete mc2xml.dat and try again)
- Run GBPVR Config and select the "Capture Source" tab and "Edit" your source
- Set the "EPG Source" to "XMLTV Plugin", and press the "Settings" button
- Select the "Browse" button and choose the newly created "xmltv.xml" file
from the "C:\Program Files\Devnz\GBPVR\EPG" directory and press "OK"
- You can now press the "Update EPG" button and set the "Auto Update EPG" time. GBPVR will automatically run "UpdateEPG.bat" every time it imports the selected xmltv.xml file to update the EPG.
- How would I use mc2xml with MythTV?
- Create a directory and move mc2xml there
- mkdir ~/mc2xml
- cd ~/mc2xml
- mv ~/downloads/mc2xml .
- Make mc2xml executable and run mc2xml with the "-c" and "-g" parameters to select and save a lineup to mc2xml.dat, and update mythfilldatabase using the new xmltv.xml file
- chmod 755 mc2xml
- ./mc2xml -c us -g 10000
- mythfilldatabase --refresh-all --file 1 ./xmltv.xml
- Disable mythfilldatabase from mythfrontend->setup->general
- Set up a daily cron job to call a script that only updates mythfilldatabase if new tv
data is available. (mc2xml returns 0 when it updates, 1 when no new data is available). This example runs daily at 3:27 am.
|
|
27 3 * * * user /home/user/mc2xml/update.sh
|
|
| /home/user/mc2xml/update.sh |
|
#!/bin/sh
cd ~/mc2xml
if ~/mc2xml/mc2xml ; then
mythfilldatabase --refresh-all --file 1 ./xmltv.xml
fi
|
|
- From feedback: Mythfilldatabase loads the entire XMLTV file into RAM before entering it into the SQL database which can result in swapping/slowness with large XMLTV files or on machines with limited RAM. You may want to split the xmltv file into smaller chunks and import it in stages. Here is an example using tv_split from the xmltv package:
|
#!/bin/sh
#split by day:
nice tv_split xmltv.xml --output listings/%Y%m%d.xml
#or split by channel for even smaller files:
#nice tv_split xmltv.xml --output listings/%channel-%Y%m%d.xml
for f in $( ls listings/ ); do
nice mythfilldatabase --file 1 listings/$f
rm -f listings/$f
done
|
|
- How would I use mc2xml with MediaPortal? *
- Create a folder for the EPG data (example: c:\mc2xml) and put the mc2xml.exe binary and a copy of xmltv.dtd in that folder (use a GUI file manager or command line)
- Optionally create an "mc2xml.chl" file listing the channels you want included in your EPG (see above for file format) (make sure that notepad doesn't append a ".txt" extension to this filename)
- MediaPortal wants the produced .xml file to be called "tvguide.xml", so you must open a DOS box, change to the EPG data directory and specify the output filename on the mc2xml command line.
On the first run of mc2xml on Windows it will ask you to input your Postal/Zip code (ie: "10000"), Country Code (ie: "us"). If not using windows, you must specify this info on the command line.
mc2xml will then ask you to select a lineup number.
mc2xml will save this selection to mc2xml.dat and create a tvguide.xml file in this folder. (Delete mc2xml.dat if you selected the wrong lineup, and try again)
- md "C:\mc2xml"
- cd "C:\mc2xml"
- copy "C:\downloads\mc2xml.exe" "C:\mc2xml"
- copy "C:\downloads\xmltv.dtd" "C:\mc2xml"
- notepad "C:\mc2xml\mc2xml.chl"
- mc2xml -c us -g 10000 -o tvguide.xml
- Start MediaPortal's "TVserver configuration"
- Go to plugin "XmlTv" (make sure XmlTv plugin box is checked) and select the folder with the newly generated tvguide.xml (example: c:\mc2xml)
- Go to Tab "Mappings"
- Select your "Group"
- Press "Load/Refresh"
- The list box will now show your "channels" with drop down boxes to select the descriptions from the tvguide.xml file
- After selecting descriptions, press "Save"
- Verify the selections by pressing "Load/Refresh" again (all boxes should now be white)
- Go back to the "Settings" tab and press "Import" (you should see your channels/programs after importing (takes a few seconds))
- Close "TVserver configuration"
- Optionally schedule a daily task to keep the tvguide.xml file up-to-date:
- Start->Control Panel->Scheduled Tasks->Add Scheduled Task (Press Next)
- Browse and Select C:\mc2xml\mc2xml.exe
- Select daily -> Next
- Set desired time -> Next
- Set computer username/password -> Next
- Check "Open Advanced Properties when I click finish", and click Finish, and set these options (modify paths if necessary):
- Run: c:\mc2xml\mc2xml.exe -o "c:\mc2xml\tvguide.xml"
- Start in: C:\mc2xml
- Press OK
- Does mc2xml work with BeyondTV?
- The xmltv importer for this software may require that you put a xmltv.dtd file in the same folder as the mc2xml created xmltv.xml file.
- Does mc2xml work with SageTV?
- The xmltv importer for this software may require that you put a xmltv.dtd file in the same folder as the mc2xml created xmltv.xml file.
- Does mc2xml work with J. River Media Center?
- Probably. If you have step-by-step instructions please email them.
- How would I use mc2xml with Orb?
- The Orb software company has a history of stealing and embedding/hiding mc2xml.exe (renamed to xmltvgrabber.exe) in their software bundle and claiming it as their own work. Avoid this company.
- How do I crop the output of the schedules?
- Use the -s and/or -d command line parameters (media center listings usually have 14 days worth of data by default). Make note of the "+" and "-" signs!
- mc2xml -s -5 -d 10
- output programs that start later than 5 hours ago, and include only the following 10 hours of programming
- mc2xml -s +5
- output programs that start later than 5 hours from now
- mc2xml -s 5
- output programs that start later than 5 hours after the downloaded listing's start time
- Can I combine channels from multiple lineups and put them in one xml file?
- If you are mindful of duplicate channels when creating your .chl files you can save
your lineups to different .dat files and then chain them with the "-I xmlfile" insertion parameter
- mc2xml -D NL.dat -C NL.chl -o NL.xml
- mc2xml -D UK.dat -C UK.chl -I NL.xml -o UK_NL.xml
- mc2xml -D DE.dat -C DE.chl -I UK_NL.xml -o DE_UK_NL.xml
- How do I use the Schedules Direct service?
- Use the "-T user:pass" command line parameter (user:pass is saved in mc2xml.dat). Default is 7 day download (change with -d <hours>).
- How do I use the TitanTV service?
- TitanTV is a source for US TV listings (and only US), but it does support ATSC and sub channels.
- Add "-t" to the command line when initially selecting your lineup. Service selection is saved in mc2xml.dat
- The service now requires your 30 character ID (not the same as a username on their web service) which can be specified on the command line by using the "-y " parameter (a default one has been included; if it expires you will receive a "-y" error and will need to specify your own (or find one on ye olde interweb)).
- This service doesn't seem to compress its listings so the downloads can be large
- By default a week of listings are downloaded, but this is configurable with the "-d" (duration in hours) parameter
- This service occasionally seems slow or overloaded (or is running on a 286?) so if it is taking a few minutes to connect or download, it isn't stuck!, it really is just that slow
- When the service is so busy that it is rejecting connections a status message is displayed and mc2xml will immediately exit with code 2 (to aid retry scripts)
- Are there example retry scripts for the titantv service?
• Example for windows:
@ECHO OFF
SET CNT=0
SET MAX=15
c:
cd c:\mc2xml
:START
mc2xml -y <id>
IF ERRORLEVEL 2 GOTO RETRY
GOTO END
:RETRY
SET /A CNT += 1
IF %CNT% == %MAX% GOTO END
mc2xml -w 30
GOTO START
:END
|
|
• Example for linux:
#!/bin/sh
CNT=0
MAX=15
cd ~/mc2xml
while [ $CNT -lt $MAX ];
do
./mc2xml -y <id>
if [ $? -eq 2 ]
then
CNT=`expr $CNT + 1`
./mc2xml -w 30
else
break
fi
done
|
|
- Miscellaneous
- Not all listing sources seem to have data available on the media center servers. If you select a source and receive a "No new data" status, try a different source.
- Channel ids are currently a concatenation of number and id, since some listings have duplicate numbers while others have duplicate ids.
- Libiconv is statically linked along with other libs in an attempt to keep the binary portable (but at the expense of file size).
- The linux binary is statically compiled.
- Definitions:
- NTSC: analog terrestrial OTA (Over the air) aka Antenna (the US discontinued this service nationwide June 12 2009, Canada plans to do so in 2011)
- ATSC: digital terrestrial OTA (Over the air) aka Antenna: some channels are broadcast in High Definition but not all! Digital does not mean HD :)
- ATSC sub channels: A digital channel has a certain amount of bandwidth (6MHz). Six 480i (standard definition) or two 1080i (high definition) streams can fit on one channel, so ATSC
allows stations to divide a channel into subchannels. Example: 4.1, 4.2, 4.3.
|