ATSC in Canada with Windows 7 via loadmxf.exe (almost!) - Canadian TV, Computing and Home Theatre Forums
Reply
 
LinkBack Thread Tools Search this Thread Display Modes

post #1 of 58 (permalink) Old 2009-04-20, 01:43 AM Thread Starter
 
Join Date: Nov 2005
Posts: 823
ATSC in Canada with Windows 7 via loadmxf.exe (almost!)

Vista TV Pack introduced a new database file for storing the electronic program guide (EPG) and the device configurations for Media Center. This had the unfortunate effect of disabling the well-know registry hack used to enable the reception of over-the-air high definition ATSC broadcasts in Canada. Windows 7 uses the same mcepg1-0-0.db database and to-date still lacks support for Canadian ATSC reception.

I hope to take an EPG file setup for a Canadian location and insert the parameters needed to enable my digital tuner and define the DTV channels. To that end, I'm starting with an “empty” database and trying to replicate a bare-bones US setup for ATSC reception only. So far, I have been able to insert almost all of the parameters except for one.

A key table in the database is MergedLineup. I believe it identifies the cable channel lineup and the ATSC lineup used for the merged EPG. I believe the channel field links this table with the MergedChannels table which lists all of the available cable/ATSC channels. Unfortunately, while they are very similar to the tables, Channels and Lineup, they do not link in the same way.

This is what I've done so far.

Delete mcepg1-1-0.db. You may have to end the mcglidhost process first. Start 7MC. Copy and save the file it created:
C:\ProgramData\Microsoft\eHome\mcepg1-1-0.db
This is the “empty” EPG database. (approximately 1,684 kb)

Next Set up TV Signal as if in the US but do not agree to use the EPG. Do not accept the Program Guide Terms of Service. Do not install PayReady. Allow 7MC to download settings for your region and examine TV signals. Configure the TV signal manually to select only the settings for the digital tuner. Scan for over-the-air HDTV channels. Copy the new EPG file mcepg1-1-0.db. It should contain basic information about your tuners, but no EPG data.

You can examine the databases using mcupdate.exe. I create shortcuts with these commands to open the EPG files.
%windir%\ehome\mcupdate.exe -v c:\hack\mcepg1-1-0-copy1.db (the empty EPG)
%windir%\ehome\mcupdate.exe -v c:\hack\mcepg1-1-0-copy2.db (the ATSC only EPG)

Microsoft uses the command line program, loadmxf.exe, to load an XML file into the EPG database. You have to open a cmd window to use it.

LoadMXF [-s storename] [-v] [-i input Filename]
Where:
-s storeFilename - the filename of the EPG database. If not specified, the default store will be used.
-v verbose. Show progress during the load
-i inputFilename the filename of the MXF file to load
After some experimentation, I've been able to load this MXF file. But I cannot link the MergedChannels with the MergedLineup. With a little help, I'm sure I can make this work.


Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<MXF version="1.0" xmlns:sql="urn:schemas-microsoft-com:xml-sql">

<!-- 

2009/03/23 
Removed primaryProvider field to prevent an object reference error 
Tried unsuccessfully primaryProvider = !MergedLineup!Canadian ATSC

2009/04/02
Added Type LineupMergeRule to mcepg and mcstore assemblies to enable entry to be inserted
Added id=lmr1 to associate entry with lineupMergeField in MergedLineup
Lineup:primaryProvider = "ml1" ID of MergedLineup for default lineup ATSC-US and for Broadband
Lineup:secondaryProvider = "ml1" ID of MergedLineup for default Scanned Digital channel ATSC
Unable to replicate secondaryProvider.
NOTE MergedLinup:primaryLineups = Lineup:primaryProvider when field  has ID of the MergedLineup
NOTE MergedLinup:secondaryLineups = Lineup:secondaryProvider when field  has ID of the MergedLineup
FavoriteLineup appears to be auto-generated. Try removing entry
NOTE Cannot replicate database loading TC2 or loading TC2 into MCEPG. Why?

2009/04/03
Load TC2 into MCEPG
FavoriteLineup does not get generated? Why?
Cannot link MergedLineup:secondaryLineups to Lineup:secondaryProvider
Added scannedLineups an wmisLineups to Device
Added scannedDevices to Lineup name="Home Baked EPG"
Cannot add ScanDeviceConfig

2009/04/04
Comparing TC2 with MCEPG2
Added MergedLineup:state=2
Removed MergedLineup:primaryLineup
reload TC2 into MCEPG1

2009/04/05
This is not causing Object Reference error referencingPrimaryChannels="!MergedChannel!KVOS-DT" 
Added type FavoriteLineup and defined them befoe referencing them in Lineup and MergedLineup
MUST define types before referencing them. Explains why I need to sometimes load a file twice before links etablished
Added type ScanDeviceConfig and moved Devices AFTER DeviceType, DeviceGroups and ScanDeviceConfig
Should Devices be nested?

2009/04/07
Added type DeviceType and was able to update entry already in mcepg1
Moved DeviceGroup after Devices and added link to DeviceGroup:devices, and changed isEnabled=true. 

2009/0/08
ContentRecorder instanceId value is from registry entry [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Video\Tuners]
see tuners.reg file.
replace ampersand character (&) with XML entity &amp; 

-->

  <Assembly name="mcepg" version="6.1.0.0" cultureInfo="" publicKey="0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9">
    <NameSpace name="Microsoft.MediaCenter.Guide">
      <Type name="Affiliate" />
      <Type name="Channel" parentFieldName="lineup" />
      <Type name="GuideImage" />
      <Type name="Lineup" />
      <Type name="Service" />
      <Type name="MergedLineup" />
      <Type name="MergedChannel" parentFieldName="mergedlineup" />
	<Type name="TuningInfo" />
	<Type name="ChannelTuningInfo" />
	<Type name="DeviceGroup" />
	<Type name="ScanDeviceConfig" />
	<Type name="Device" /> 
	<Type name="ContentRecorder" /> 
	<Type name="DeviceType" /> 
	<Type name="Region" />
	<Type name="LineupMergeRule" />
	<Type name="FavoriteLineup" />
    </NameSpace>
  </Assembly>


  <Assembly name="mcstore" version="6.1.0.0" cultureInfo="" publicKey="0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9">
    <NameSpace name="Microsoft.MediaCenter.Store">
      <Type name="Attachment" />
      <Type name="MergedLineup" />
      <Type name="MergedChannel" parentFieldName="mergedlineup" />
	<Type name="TuningInfo" />
	<Type name="ChannelTuningInfo" />
	<Type name="DeviceGroup" />
	<Type name="ScanDeviceConfig" />
	<Type name="ContentRecorder" /> 
	<Type name="Device" />
	<Type name="DeviceType" /> 
	<Type name="Region" />
      <Type name="Channel" parentFieldName="lineup" />
      <Type name="Lineup" />
      <Type name="Service" />
      <Type name="Package" />
      <Type name="Provider" />
      <Type name="UId" parentFieldName="target" />
	<Type name="LineupMergeRule" />
	<Type name="FavoriteLineup" />
    </NameSpace>
  </Assembly>

  <Providers>
    <Provider id="HB" name="Home Baked" displayName="Home Baked Computer Solutions" copyright="Copyright Michael DeAbreu - visit homebakedsolutions.blogspot.com"/>
  </Providers>

<With provider="HB">

	<FavoriteLineups>	
		<FavoriteLineup id="fl1" priority="2147483647" isAutoEnabled="1" isAutoGenerated="1" name="Most Viewed" />
		<FavoriteLineup id="fl2" priority="2147483647" isAutoEnabled="1" isAutoGenerated="1" name="Most Viewed" />
	</FavoriteLineups>	

	<ChannelTuningInfos>
		<ChannelTuningInfo id="cti1" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="12" modulation="0" physicalNumber="35" serializationFormat="1" signalQuality="83" subNumber="1" tuneRequestHash="6122305190831188328" />
		<ChannelTuningInfo id="cti2" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="24" modulation="0" physicalNumber="19" serializationFormat="1" signalQuality="81" subNumber="1" tuneRequestHash="8177779702397388314" />
		<ChannelTuningInfo id="cti3" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="2" modulation="0" physicalNumber="58" serializationFormat="1" signalQuality="89" subNumber="1" tuneRequestHash="1398354354822166646" />
		<ChannelTuningInfo id="cti4" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="32" modulation="0" physicalNumber="33" serializationFormat="1" signalQuality="89" subNumber="1" tuneRequestHash="5383266711928631595" />
		<ChannelTuningInfo id="cti5" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="8" modulation="0" physicalNumber="22" serializationFormat="1" signalQuality="88" subNumber="1" tuneRequestHash="117711887397597135" />
	</ChannelTuningInfos>


	<LineupMergeRules>
		<LineupMergeRule id="lmr1" keepAllPrimary="0" keepAllSecondary="1" mergeType="1" />
	</LineupMergeRules>

	<MergedLineups>
		<MergedLineup id="ml1" deviceGroups="!DeviceGroup!all" favoriteLineups="fl2" uid="!MergedLineup!Canadian ATSC" lineupMergeRule="lmr1" name="(Broadband, USA/DefaultLineup:ATSC-US)+(Scanned (Digital Antenna (ATSC)))" state="2" >
		</MergedLineup>
	</MergedLineups>
		
	<ScanDeviceConfigs>
		<ScanDeviceConfig id="sdc1" locatorMaxMins="10" locatorMinSecs="15" periodicScanIntervalSeconds="2147483647" scheduleExitFactor="85" userRunScanSetting="8" />
	</ScanDeviceConfigs>

	<DeviceTypes>
		<DeviceType uid="!DeviceType!ATSC" displayName="Digital Antenna (ATSC)" headendType="ATSC" isSetTopBox="0" name="ATSC" networkType="0dad2fdd-5fd7-11d3-8f50-00c04f7971e2" sqmid="128" tuningSpaceName="ATSC" viewPriority="900" />
	</DeviceTypes>

	<ContentRecorders>
		<ContentRecorder id="cr1" uid="!ContentRecorder!PCI\VEN_1745&amp;DEV_2100&amp;SUBSYS_48B81043&amp;REV_00\4&amp;247B58F0&amp;0&amp;00580" instanceId="PCI\VEN_1745&amp;DEV_2100&amp;SUBSYS_48B81043&amp;REV_00\4&amp;247B58F0&amp;0&amp;00580" lastKnownTuneRequestHash="-3767322195512165671" />
	</ContentRecorders>

	<Devices>
		<Device uid="!Device!ViXS PureTV ATSC/DVBC Tuner" contentRecorder="cr1" countryCode="US" deviceType="!DeviceType!ATSC" name="ViXS PureTV ATSC/DVBC Tuner" preferredOrder="900" recorderId="674743b2-44fa-4620-b102-2308ce6ff3ef" scanDeviceConfig="sdc1" scannedLineup="l1" wmisLineups="l2" />
	</Devices>

	<DeviceGroups>
		<DeviceGroup id="dg1" uid="!DeviceGroup!all" devices="!Device!ViXS PureTV ATSC/DVBC Tuner" isEnabled="1" lineup="!MergedLineup!Canadian ATSC" name="All" rank="0" />
	</DeviceGroups>

	<Affiliates>
		<Affiliate description="" logoImage="" name="KVOS-DT" uid="!Affiliate!KVOS-DT" />
		<Affiliate description="" logoImage="" name="KBCB-DT" uid="!Affiliate!KBCB-DT" />
		<Affiliate description="" logoImage="" name="CBUT-DT" uid="!Affiliate!CBUT-DT" />
		<Affiliate description="" logoImage="" name="CIVT-DT" uid="!Affiliate!CIVT-DT" />
		<Affiliate description="" logoImage="" name="CHAN-DT" uid="!Affiliate!CHAN-DT" />
	</Affiliates>

	<Services>
		<Service id="s1" uid="!Service!KVOS-DT" name="KVOS-DT" callSign="KVOS-DT" logoImage="" affiliate="!Affiliate!KVOS-DT" />
		<Service id="s2" uid="!Service!KBCB-DT" name="KBCB-DT" callSign="KBCB-DT" logoImage="" affiliate="!Affiliate!KBCB-DT" />
		<Service id="s3" uid="!Service!CBUT-DT" name="CBUT-DT" callSign="CBUT-DT" logoImage="" affiliate="!Affiliate!CBUT-DT" />
		<Service id="s4" uid="!Service!CIVT-DT" name="CIVT-DT" callSign="CIVT-DT" logoImage="" affiliate="!Affiliate!CIVT-DT" />
		<Service id="s5" uid="!Service!CHAN-DT" name="CHAN-DT" callSign="CHAN-DT" logoImage="" affiliate="!Affiliate!CHAN-DT" />
	</Services>

	<Lineups>
		<Lineup name="Home Baked EPG" id="l1" favoriteLineups="fl1" secondaryProvider="ml1" uid="!Lineup!Home Baked EPG" >
			<channels>
				<Channel lineup="l1" service="s1" tuningInfos ="cti1" uid="!Channel!KVOS-DT" channelNumberPriority="2" channelType="1" matchName="OC:12:1" matchNameCount="1" normalizedMatchName="|oc:12:1|" number="12" oneToucheNumber="-1" originalNumber="12" originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
				<Channel lineup="l1" service="s2" tuningInfos ="cti2" uid="!Channel!KBCB-DT" channelNumberPriority="2" channelType="1" matchName="OC:24:1" matchNameCount="1" normalizedMatchName="|oc:24:1|" number="24" oneToucheNumber="-1" originalNumber="24" originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
				<Channel lineup="l1" service="s3" tuningInfos ="cti3" uid="!Channel!CBUT-DT" channelNumberPriority="2" channelType="1" matchName="OC:2:1"  matchNameCount="1" normalizedMatchName="|oc:2:1|"  number="2"  oneToucheNumber="-1" originalNumber="2"  originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
				<Channel lineup="l1" service="s4" tuningInfos ="cti4" uid="!Channel!CIVT-DT" channelNumberPriority="2" channelType="1" matchName="OC:32:1" matchNameCount="1" normalizedMatchName="|oc:32:1|" number="32" oneToucheNumber="-1" originalNumber="32" originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
				<Channel lineup="l1" service="s5" tuningInfos ="cti5" uid="!Channel!CHAN-DT" channelNumberPriority="2" channelType="1" matchName="OC:8:1"  matchNameCount="1" normalizedMatchName="|oc:8:1|"  number="8"  oneToucheNumber="-1" originalNumber="8"  originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
			</channels>
		</Lineup>
		<Lineup name="DefaultLineup:ATSC-US" id="l2" primaryProvider="ml1" uid="!Lineup!DefaultLineup:ATSC-US" />
		<Lineup name="Broadband" id="l3" primaryProvider="ml1" uid="!Lineup!Broadband" />
	</Lineups>

			<MergedChannels>
				<MergedChannel id="mc1" lineup="!MergedLineup!Canadian ATSC" service="s1" tuningInfos ="cti1" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:12:1" matchNameCount="1" normalizedMatchName="|oc:12:1|" number="12" oneToucheNumber="-1" originalNumber="12" originalSubNumber="1" primaryChannel="!Channel!KVOS-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
				<MergedChannel id="mc2" lineup="!MergedLineup!Canadian ATSC" service="s2" tuningInfos ="cti2" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:24:1" matchNameCount="1" normalizedMatchName="|oc:24:1|" number="24" oneToucheNumber="-1" originalNumber="24" originalSubNumber="1" primaryChannel="!Channel!KBCB-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
				<MergedChannel id="mc3" lineup="!MergedLineup!Canadian ATSC" service="s3" tuningInfos ="cti3" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:2:1"  matchNameCount="1" normalizedMatchName="|oc:2:1|"  number="2"  oneToucheNumber="-1" originalNumber="2" originalSubNumber="1" primaryChannel="!Channel!CBUT-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
				<MergedChannel id="mc4" lineup="!MergedLineup!Canadian ATSC" service="s4" tuningInfos ="cti4" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:32:1" matchNameCount="1" normalizedMatchName="|oc:32:1|" number="32" oneToucheNumber="-1" originalNumber="32" originalSubNumber="1" primaryChannel="!Channel!CIVT-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
				<MergedChannel id="mc5" lineup="!MergedLineup!Canadian ATSC" service="s5" tuningInfos ="cti5" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:8:1"  matchNameCount="1" normalizedMatchName="|oc:8:1|"  number="8"  oneToucheNumber="-1" originalNumber="8" originalSubNumber="1" primaryChannel="!Channel!CHAN-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
			</MergedChannels>


</With>
</MXF>
Michael DeAbreu is offline  
Sponsored Links
Advertisement
 
post #2 of 58 (permalink) Old 2009-04-20, 03:04 PM
 
Join Date: Jan 2006
Location: Toronto
Posts: 247
I just used a Grand Island NY zip code and got the local DTV from the US and Niagara Falls Canada, this enabled the EPG in Win7MC

Sony 46XBR3, STR-DE898, PS3 60GB, JBL fronts, Bose rears, Polk sub/center, HK-DVD22, BellTVHD, Harmony1
BadLag is offline  
post #3 of 58 (permalink) Old 2009-04-21, 01:05 PM Thread Starter
 
Join Date: Nov 2005
Posts: 823
I found a path forward. I turns out that 7MC creates a backup of the EPG file when it downloads new guide data. The good news for me is that it is an MXF file that I can examine, edit and re-load with loadmxf.exe. Up until now, I've had to guess at the MXF structure based on the information in the database. Some tests with the lineup backup are very encouraging.
Michael DeAbreu is offline  
 
post #4 of 58 (permalink) Old 2009-04-26, 04:13 AM Thread Starter
 
Join Date: Nov 2005
Posts: 823
How to Enable Your ATSC Tuner in Canada

Windows 7 continues the unwelcome tradition of disabling support for ATSC tuners in Canada. When you first setup your TV signal, media center downloads a list of analog broadcast channels and cable providers in your postal code as well as the settings which disable ATSC/QAM tuners.

The trick is to create a copy of mcepg1-1-0.db that contains both your lineup of analog channels and a lineup of ATSC channels. Fortunately, Windows 7 provides all the tools you need to do this. Each time you run the TV setup, media center creates a backup of database in a plain text format they call, MXF. Essentially, it is an XML file that can be read using Notepad or any other text editor. Microsoft uses the command line program, loadmxf.exe, to load the MXF files into the EPG database.

The basic steps are:
  1. Backup then delete the existing mcepg database and backup folder:
    C:\ProgramData\Microsoft\eHome\mcepg1-1-0.db
    C:\ProgramData\Microsoft\eHome\mcepg1-1-0
    .
  2. Open media center and setup the TV signal again for a nearby US zipcode.
    Do not accept the Program Guide Terms of Service
    Do not install PlayReady
    Download the TV setup data for the US zipcode
    Cancel TV signal detection and manuallly configure the TV signal
    Select the TV signal type: Digital Antenna (ATSC)
    Let media center scan for ATSC channels
    Add any missing DTV channels (you won't be able to later)
    Close media center
    .
  3. Delete mcepg1-1-0.db
    Open Media Center and setup the TV signal again for your region in Canada.
    Accept the Program Guide Terms of Service
    Do not install PlayReady
    Download the TV setup data and guide listings for your region
    Let media center examine your signals and configure your analog tuners
    Confirm that your ATSC tuners were detcted but not configured
    Select your analog cable provider and download the EPG
    Close media center.
    .
  4. Confirm that the backup files were created in the folders
    C:\ProgramData\Microsoft\eHome\mcepg1-1-0\backup\lineup
    C:\ProgramData\Microsoft\eHome\mcepg1-1-0\backup\recordings
    C:\ProgramData\Microsoft\eHome\mcepg1-1-0\backup\subscriptions
    In each folder, rename the corresponding backup file: CA.mxf
    .
  5. In Notepad, open the backup file with the Canadian lineup: ..\backup\lineup\CA.mxf
    In Notepad, open the lineup backup file with the US ATSC lineup
    Drag one window to the left, the other to the right to tile them vertically
    .
  6. Copy the following element from the US lineup to the Canadian lineup
    <Type name="ScanDeviceConfig" groupName="ScanDeviceConfigsCollection" />
    .
  7. Search US for <devices>
    Copy the <Device> element and all of its nested elements
    Search CA for </devices>
    Paste the <Device> element directly before it.
    .
  8. Search US and CA for <lineup uid="!MCLineup!MainLineup"
    Compare the names of the lineups
    replace +(Scanned (Analog Cable)) with +(Scanned (Digital Antenna (ATSC)))
    .
  9. Search US for the last instance of the element: <MergedChannel
    The preceeding <MergedChannel> elements should be for the ATSC channels
    Look for a field like: matchName="OC:8:1" where 8.1 is the ATSC channel number
    Copy all of the <MergedChannel> elements for your ATSC channels
    Search CA for the last instance of the element: <MergedChannel
    Paste the the ATSC <MergedChannels> directly after it
    .
  10. Scroll to the bottom of the US file an copy the element that starts with,
    <Lineup uid="!MCLineup!ATSC-US" primaryProvider="!MCLineup!MainLineup"
    Scroll to the bottom of the CA file and paste after the last <Lineup> element
    .
  11. In the CA file find: countryCode="US" and replace with countryCode="CA"
    .
  12. Open a command prompt or write a batch file to execute the commands:
    C:\Windows\ehome\loadmxf.exe -v -i C:\ProgramData\Microsoft\eHome\mcepg1-1-0\backup\lineup\CA.mxf
    C:\Windows\ehome\loadmxf.exe -v -i C:\ProgramData\Microsoft\eHome\mcepg1-1-0\backup\recordings\CA.mxf
    C:\Windows\ehome\loadmxf.exe -v -i C:\ProgramData\Microsoft\eHome\mcepg1-1-0\backup\subscriptions\CA.mxf
    .
  13. Open media center
    Download the latest Guide Listings (Do not rn TV Setup)
    Edit the listings to combine the ATSC and analog channels.
    .
Michael DeAbreu is offline  
post #5 of 58 (permalink) Old 2009-04-26, 11:20 PM
 
Join Date: May 2007
Location: Winnipeg, Manitoba
Posts: 273
i wish i could get OTA...
KingBuzzo is offline  
post #6 of 58 (permalink) Old 2009-04-27, 04:54 PM Thread Starter
 
Join Date: Nov 2005
Posts: 823
It appears very complex, but the basic XML structure is relatively simple. In the example below I've drastically simplified the code to highlight the important XML elements which define the ATSC tuner device, lineup and channels. The <Assembly> elements define the structure of the XML file. The <Device> elements define the characteristics of your tuner. The <Lineup> elements define a collection of <Channels> available on the tuner. While the <MergedLineup> element defines a collection of <MergedChannels> from all your tuners.

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<MXF>
  <Assembly name="mcepg" version="6.1.0.0" cultureInfo="" publicKey="">
    <NameSpace name="Microsoft.MediaCenter.Guide">
      <Type name="DeviceGroup" />
      <Type name="MergedLineup" />
      <Type name="DeviceType" />
      <Type name="Device" />
      <Type name="LineupMergeRule" />
      <Type name="MergedChannel" />
      <Type name="ContentRecorder" />
      <Type name="Lineup" />
      <Type name="ScanDeviceConfig" groupName="ScanDeviceConfigsCollection" />
      <Type name="Service" />
      <Type name="Channel" />
      <Type name="ChannelTuningInfo" />
    </NameSpace>
  </Assembly>
  <Assembly name="mcstore" version="6.1.0.0" cultureInfo="" publicKey="">
    <NameSpace name="Microsoft.MediaCenter.Store">
      <Type name="Provider" />
      <Type name="UId" parentFieldName="target" />
    </NameSpace>
  </Assembly>
  <DeviceGroup uid="!DeviceGroup!All" name="All" permitAnyDeviceType="false" >
    <permittedDeviceTypes>
      <DeviceType displayName="Digital Antenna (ATSC)"viewPriority="900" />
    </permittedDeviceTypes>
    <devices>
      <Device countryCode="US" name="ViXS PureTV ATSC/DVBC Tuner" >
        <wmisLineups>
          <Lineup uid="!MCLineup!ATSC-US" />
        </wmisLineups>
        <contentRecorder />
        <scannedLineup name="Scanned (Digital Antenna (ATSC))" >
          <channels>
            </Channel>
            <Channel matchName="OC:8:1" >
              <tuningInfos>
                <ChannelTuningInfo countryCode="US" >
                  <serializedTuneRequest>AAEAAAA=</serializedTuneRequest>
                </ChannelTuningInfo>
              </tuningInfos>
              <service name="CHAN-DT" callSign="CHAN-DT" >
                <affiliate uid="!Loaders!Glid!Affiliates!CHAN-DT" />
              </service>
            </Channel>
          </channels>
        </scannedLineup>
        <scanDeviceConfig scanMergePolicy="0" scanDeletePolicy="0" scanMode="0" />
      </Device>
    </devices>
    <lineup uid="!MCLineup!MainLineup" name="(Broadband, USA/DefaultLineup:ATSC-US) + (Scanned (Digital Antenna (ATSC)))" >
      <channels>
        <MergedChannel matchName="OC:8:1" >
          <tuningInfos>
            <ChannelTuningInfo idref="00020" />
          </tuningInfos>
        </MergedChannel>
      </channels>
      <favoriteLineups>
        <FavoriteLineup isAutoGenerated="true" />
      </favoriteLineups>
      <lineupMergeRule mergeType="1" keepAllPrimary="false" keepAllSecondary="true" />
    </lineup>
  </DeviceGroup>
  <Assembly name="mcepg" version="6.1.0.0" cultureInfo="" publicKey="">
    <NameSpace name="Microsoft.MediaCenter.Guide">
      <Type name="Lineup" />
      <Type name="MergedLineup" />
    </NameSpace>
  </Assembly>
  <Assembly name="mcstore" version="6.1.0.0" cultureInfo="" publicKey="">
    <NameSpace name="Microsoft.MediaCenter.Store">
      <Type name="UId" parentFieldName="target" />
      <Type name="Provider" />
    </NameSpace>
  </Assembly>
  <Lineup uid="!MCLineup!ATSC-US" primaryProvider="!MCLineup!MainLineup" />
</MXF>
Michael DeAbreu is offline  
post #7 of 58 (permalink) Old 2009-04-27, 05:43 PM Thread Starter
 
Join Date: Nov 2005
Posts: 823
LOADMXF.EXE Command Line Syntax

Media Center uses the command line program, loadmxf.exe, to load an MXF file into the EPG database. The executable file is located in the folder, C:\Windows\ehome. It is a standalone executable that can be run from any folder. You run it from the command prompt or from a batch file or shortcut in Windows. The syntax is:

LoadMXF.exe [-s storeFilename] [-v] [-i inputFilename] [-?]

Where:
  • -s storeFilename The filename of the store.
    If not specified, the default store will be used,
    C:\ProgramData\Microsoft\eHome\mcepg1-1-0.db
  • -v verbose Show progress during the loqd.
  • -i inputFilename The filename of the MXF file to load.
  • -? Help. Prints this message.
Michael DeAbreu is offline  
post #8 of 58 (permalink) Old 2009-04-28, 11:04 PM
Veteran
 
Join Date: Mar 2002
Location: Scarboro
Posts: 6,331
Quote:
Originally Posted by BadLag View Post
I just used a Grand Island NY zip code and got the local DTV from the US and Niagara Falls Canada, this enabled the EPG in Win7MC
That approach works fine if all you want is OTA. If you want a system that combines cable/sat sources from Canada (i.e. Rogers, Bell, StarChoice) with OTA then this doesn't work.
Wayne is offline  
post #9 of 58 (permalink) Old 2009-05-08, 04:01 PM Thread Starter
 
Join Date: Nov 2005
Posts: 823
Still Works with Windows 7 RC

I was able to setup Media Center on a clean install of Windows 7 RC by following the steps in my previous post. The XML file structure and content is mostly unchanged from the beta release.

One notable change is that the name of the EPG file changed to, mcepg1-5-0.db as did the folder containing the EPG backups. Consequently you need to change the loadmxf.exe commands. Also, you will have to change Explorer's file and view options to see hidden system files and folders and display file extensions. Otherwise you cannot easily change the extension from .txt to .bat

Code:
C:\Windows\ehome\loadmxf.exe -v -i C:\ProgramData\Microsoft\eHome\mcepg1-5-0\backup\lineup\CA.mxf
C:\Windows\ehome\loadmxf.exe -v -i C:\ProgramData\Microsoft\eHome\mcepg1-5-0\backup\recordings\CA.mxf
C:\Windows\ehome\loadmxf.exe -v -i C:\ProgramData\Microsoft\eHome\mcepg1-5-0\backup\subscriptions\CA.mxf
.
Michael DeAbreu is offline  
post #10 of 58 (permalink) Old 2009-05-08, 04:44 PM Thread Starter
 
Join Date: Nov 2005
Posts: 823
XML Editors

For me, this procedure is relatively easy. But manipulating XML files maybe daunting for others. Especially if you are using Notepad as I first suggested. I looked at two free and simple XML editors which make it easier to explore and edit the .mxf files. Both allow you to open multiple windows, cut & paste (or drag 'n drop) XML elements, nodes and entire branches. I found both could be a little slow and flaky at times.

XML Notepad 2007

From Microsoft. It can compare two XML files to show the differences. The source view simply opens the XML file in Notepad. Difficult to find elements because you have to first expand the node to see what it contains

Peter's XML Editor

Cute, simple editor. Nice tree structure, easy to find the correct elements.
Michael DeAbreu is offline  
post #11 of 58 (permalink) Old 2009-05-10, 04:08 AM Thread Starter
 
Join Date: Nov 2005
Posts: 823
How to Use XML Notepad to Edit MXF Files

t i n y url.com/pgetpj
(remove spaces)

The above zip file (2.74 MB) contains a Windows 7 RTF document. It explains how to use XML Notepad 2007 to edit the MXF files that enable ATSC reception in Canada. It has screen shots showing which nodes need to be copied.
Michael DeAbreu is offline  
post #12 of 58 (permalink) Old 2009-05-13, 12:26 PM Thread Starter
 
Join Date: Nov 2005
Posts: 823
Back to the Drawing Board

After about 2-3 days, the ATSC Tuners are disabled. I'll be picking apart the MXF backups and the mcepg databases looking for the cause.

After enabling the tuners I was able to download the Canadian EPG and combine the ATSC and cable channel listings and set tuner priorities. Live TV and recordings would use the ATSC tuner when available. Guides, movies, cast&crew, thumbnails were all working flawlessly even after forcing the EPG download several times. Then a few days later, the ATSC tuners are disabled.

I thought that once the digital tuners were configured, the EPG download would not check for or disable them. I'm hoping that there is some other problem. Perhaps combining the digital/analog listings screws up the EPG download.
Michael DeAbreu is offline  
post #13 of 58 (permalink) Old 2009-05-14, 10:03 AM
Rookie
 
Join Date: Jan 2008
Posts: 15
Wow, was so excited to install windows 7 and extend it to my xbox360. After all that work I find out you cant work ATSC tuners in canada. When will this end. Why is always hard work to use media center?
Does Microsoft have any plans on fixing this?
Im reading all your posts and not understanding most or seeing how its not 100% successful. Where do we stand now?
[CaM]Spoon is offline  
post #14 of 58 (permalink) Old 2009-05-14, 05:27 PM Thread Starter
 
Join Date: Nov 2005
Posts: 823
Media Center spends a lot of time calling home to mama. I don't think the EPG download is a problem. I suspect one of the other packages it downloads disables the Canadian ATSC tuners. I'm checking the download logs to find out which package when it happens and if it can be disabled or undone. So far 24 hrs with no problem.
Michael DeAbreu is offline  
post #15 of 58 (permalink) Old 2009-05-19, 09:02 PM
Rookie
 
Join Date: Jan 2009
Posts: 6
Michael - Keep up the great work! This sounds very exciting.

I'm in Vancouver running W7 RC and have 2 Hauppauge 1600 dual tuners (currently only recording SD cable). Would love to start recording the 3 local OTA HD channels through your fix.

Paul
xterrastrial is offline  
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the Canadian TV, Computing and Home Theatre Forums forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools Search this Thread
Show Printable Version Show Printable Version
Email this Page Email this Page
Search this Thread:

Advanced Search
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome