|
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
- -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 setup: (see also: FAQ: gbpvr, mythtv, mediaportal, ...)
(Note: Windows version has a simple graphical user interface to aid configuration)
- 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
Examples for mc2xml setup:
- US: mc2xml -c us -g 20006
- US: mc2xml -c us -g 20006 -t
- 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 setup: (see also: FAQ: gbpvr, mythtv, mediaportal, ...)
- 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
|
(please 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!)
 |
| mc2xml.exe (1469952 bytes) |
| MD5SUM:
d2cb50298f6566868189466e3c641299
|
|
|
|
|
 |
| mc2xml (1768200 bytes) |
| MD5SUM:
4be0cafe399173b5033e3b8ef1ec3b4d
|
|
|
|
|
 |
| mc2xml (2649740 bytes) |
| MD5SUM:
568c489048fb3051e62327fad0c71b91
|
|
|
|
|
(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!)
- 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)
| 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. (Delete mc2xml.dat if you selected the wrong lineup, 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?
- Based on feedback (I've not used mythtv) mythfilldatabase might have problems importing large xmltv.xml files. If you experience this, you can try cutting down the number of channels or programming hours, or perhaps you know the real mythfilldatabase limitation and can provide more insight?
- 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
|
|
- 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.
- Does mc2xml run on Ubuntu 64bit?
- mc2xml requires libc6-i386 and lib32nss-mdns libraries
- sudo apt-get install libc6-i386
- sudo apt-get install lib32nss-mdns
- 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
- 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
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
if [ $? -eq 2 ]
then
CNT=`expr $CNT + 1`
./mc2xml -w 30
else
break
fi
done
|
|
- You are welcome to report any problems or successes
- Not all listing sources seem to have data available on the server. 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 now 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.
- Service Differences:
- 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 doesn't fully support ATSC with subchannels for the North American market (yet?). Microsoft calls this the "legacy service".
- TitanTV: 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: the subscription based source (with 7 day trial) for Satellite/Cable/NTSC/ATSC TV listings in North America (and additional regions) from TMS/Zap2it.
- Microsoft's (new) service: If you have tested 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 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 will be welcome to request this test 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 :) )
- Initial Release
- 2008-07-24
- Fixed parsing bug (DF)
- Support Brazil
- 2008-07-27
- Fix parsing with duplicate channel numbers
- 2008-08-02
- Fix duplicate stereo tag output
- 2008-08-10
- Add -a and -A command line parameters
- Allow filtering by "channel id" in mc2xml.chl files
- 2008-08-14
- Add date to previously-shown tag
- Add -s and -d command line parameters for those that want to crop their schedules (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
- 2008-09-15
- Add episode-num "xmltv_ns" tag and fix part numbers
- Add language tag support
- Support utf8 during listings setup
- Add "-t" command line parameter. mc2xml will use the titantv service instead
of the media center service when you add "-t" to the command line when initially selecting a lineup. (Service selection is saved in mc2xml.dat)
- TitanTV is a source for US TV listings (and only US), but it does fully support ATSC and sub channels. The media center listings
seem better, but since they don't have full ATSC support yet I've added titantv service support
- 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)
- 2008-12-20
- Port to OSX x86 darwin
- Add -w option (to help retry scripts on platforms without a sleep command)
- Add -i option (adds a fixed # to all channel numbers, "-i 1000" renames channel 2 to 1002, etc. For use when combining lineups with -I)
- Add -R option (default file = "mc2xml.ren") to rename channel numbers or names (file format described above)
- Add "-T user:pass" command line parameter. mc2xml will use the schedules direct service instead
of the media center service. (user:pass is saved in mc2xml.dat). Default is 7 day download (change with -d <hours>). (mc2xml is faster & less memory intensive than most alternative programs.)
- Fix skipping of duplicate channels from the titantv service
- Other fixes/enhancements
- 2009-02-20
- Add fcc channel numbers to some listings that provide them
- The OSX binary is now compiled as a "Fat" binary -- it should work on both Intel and PPC systems (I've only tried Intel, but if you have a PPC Mac please let me know if it works)
- Added a small and simple setup dialog for the Windows binary on first run. This should help Windows users that are used to a gui setup rather than using the command line.
- Other bug fixes
- 2009-03-01
- Escape lt and gt symbols (<,>) in some listings that improperly contain them
- Add gui lineup selection dialog to the Windows version, and a few more options for initial gui configuration to improve ease of use
- Save -U/-u/-F/-A/-a options to .dat file if they are specified during initial configuration
- Updated Service differences section on the web page, describing the new windows 7 service which supports ATSC, program & movie images and additional program detail, with an incentive for donators.
- 2009-04-20
- Update for the few still using the titantv service: it requires your 30 character ID which can now be specified on the command line by using the new "-y <id>" 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)).
If you were using this service only for ATSC, there are better options available (as well as the classics).
|
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! :) )
|
Comments:
|