Use Recording Schedule backup to customize settings?

Post Reply
cycletourist

Posts: 81
Joined: Mon Feb 11, 2013 2:43 am
Location: Colorado

HTPC Specs: Show details

Use Recording Schedule backup to customize settings?

#1

Post by cycletourist » Tue Apr 30, 2013 2:14 am

I'm starting to learn just enough to be dangerous. I see that the recording schedule is backed up in C:\ProgramData\Microsoft\eHome\mcepgn-n in an XML file that I have no problem reading and changing.

I have also read how to restore a recording schedule using loadmxf.exe. It occurred to me that I could fine tune my recording schedule by editing the backup file and then using loadmxf.exe to restore from it. I believe I have read that it will add them and I will have duplicate requests for every recording in the schedule. I can not find that article anymore. Is that true? Do I need to erase my recording schedule before I restore with loadmxf.exe and an altered backup file?

My reasons: I am trying to get around WMC's inability to adjust recording start (and end) padding time on a per show or series basis. All scheduled recordings are given the default (global) value from Settings -> TV -> Recorder. Using 2 minutes early is more than enough in pretty much every case, but one series I like always starts 2 ½ minutes early, so I have had to set the global value to 3 minutes. I would really prefer the global value be one minute. Using the above technique I could change the following attributes in the <SeriesRequest> entry:

prePaddingRequired="PT0S" prePaddingRequested="PT2M" postPaddingRequired="PT0S" postPaddingRequested="PT2M"

It was easy to pick up that 0S and 2M refer to 0 seconds and 2 minutes, so .... why not change those to a custom value, per series, and then restore the recording schedule from that altered backup file.

Has anyone done this? Am I overlooking some pitfalls?

Also, .... since that's just the backup file, I assume that the settings Windows Media Center uses are in the mcepgN-N.db file in C:\ProgramData\Microsoft\eHome. I tried, optimistically, to open that file with sqlite - no luck. Am I correct in assuming that the .db file contains the active settings that WMC uses?

(And does it replace recordings.xml that was in Vista? If so, does than mean that changing the xml file in Vista would work?)

Has anyone figured out the layout (and perhaps encoding?) of that WMC7 mcepgN-N data file? It sure would be nice to be able to go in and tweak the actual settings.

User avatar
CyberSimian

Posts: 516
Joined: Mon Jun 20, 2011 5:52 pm
Location: Southampton, UK

HTPC Specs: Show details

#2

Post by CyberSimian » Tue Apr 30, 2013 9:08 am

cycletourist wrote:And does it replace recordings.xml that was in Vista? If so, does than mean that changing the xml file in Vista would work?
I still use Vista for my HTPC. One of the "quirks" with Vista is that if you use a batch script to delete DVR-MS files from the "Recorded TV" folder (for example, after the batch script has copied the files to other locations in your recordings library), Vista Media Center thinks that the files were deleted by mistake, and so schedules the programmes to record again. This can be avoided by editing "recordings.xml" and changing the values of certain fields in the entries for the deleted files.

I have written a batch script to do this (using the REXX scripting language), but the gotcha is that the batch script works correctly only if Media Center is not running. This means that not only must you exit from Media Center, but you must also stop the MC Scheduler service and the MC Receiver service (in that order). Then the batch script can run successfully. Then you need to restart the MC services, but I found that some parts of MC get out of sync (the red blob recording-dot in the system tray no longer works correctly), so I usually reboot after running the batch script.
cycletourist wrote:Has anyone figured out the layout (and perhaps encoding?) of that WMC7 mcepgN-N data file? It sure would be nice to be able to go in and tweak the actual settings.
For Win7 MC, I think that trying to interpret and then modify the DB file is probably pointless, because you are likely to need to stop and restart MC for any changes to take effect. Stopping and restarting MC is just too disruptive. However, using LOADMXF to load an edited version of the backup file might work, as one would expect that MC would update its in-memory tables in response to the LOADMXF command, without having to stop MC first.

What you want to do is very near to what I want, so I shall follow your progress with interest!

-- from CyberSimian in the UK

TheApocalyptican

Posts: 11
Joined: Thu Oct 24, 2013 9:22 am
Location:

HTPC Specs: Show details

#3

Post by TheApocalyptican » Mon Nov 25, 2013 9:24 pm

I'd like to bring this topic back up, as it would be extremely helpful. I tried doing this, but it didn't work. I think the reason it didn't is because these are the backup files, and the current active and non backup file is still being used for the recordings, even though the loadmxf.exe should overwrite the active file. Anyone have any more info on how to get this to work?

Edit: or does it possibly work, just in WMC it doesn't show the difference due to the fact that I set it to something other than the normal record lengths?

TheApocalyptican

Posts: 11
Joined: Thu Oct 24, 2013 9:22 am
Location:

HTPC Specs: Show details

#4

Post by TheApocalyptican » Mon Nov 25, 2013 11:46 pm

Ok, I tested it, and it still records at whatever amount of time it was originally set to in WMC.

User avatar
CyberSimian

Posts: 516
Joined: Mon Jun 20, 2011 5:52 pm
Location: Southampton, UK

HTPC Specs: Show details

#5

Post by CyberSimian » Tue Nov 26, 2013 9:59 am

I still use, Vista, so I am not sure that I have anything of value to contribute with regard to Win7.
TheApocalyptican wrote:I tried doing this, but it didn't work. I think the reason it didn't is because these are the backup files, and the current active and non backup file is still being used for the recordings, even though the loadmxf.exe should overwrite the active file.
Speaking philosophically, what would be the point of a product providing a backup facility if there were no way of restoring that backup? This suggests that you are not using it correctly.

(1) Did you exit from Media Center before running the LOADMXF command?
(2) Did you stop the Media Center Scheduler and Media Center Receiver services before running the LOADMXF command?
(3) Did you reboot after running the LOADMXF command?

My experience with Vista suggests that the Media Center Scheduler and Receiver services autostart after a period of time, so you may need to run LOADMXF immediately after stopping those services (and then reboot immediately after running LOADMXF).
TheApocalyptican wrote:or does it possibly work, just in WMC it doesn't show the difference due to the fact that I set it to something other than the normal record lengths?
Media Center does not show in the recording schedule the start and stop times adjusted by the padding amounts -- it shows the start and stop times as specified by the EPG.
TheApocalyptican wrote:Ok, I tested it, and it still records at whatever amount of time it was originally set to in WMC.
Although DVR-MS files have metadata entries for both "SoftPrePadding" and "HardPrePadding" (similarly for soft and hard post padding), I am not aware of any evidence that Media Center has ever honoured the "HardXxxPadding" values. It is possible that these settings were part of the initial design of MC, but that Microsoft decided not to implement them. If this is true, then what you need to do is adjust the start and stop times of the programme itself, not the padding times.

-- from CyberSimian in the UK

TheApocalyptican

Posts: 11
Joined: Thu Oct 24, 2013 9:22 am
Location:

HTPC Specs: Show details

#6

Post by TheApocalyptican » Tue Nov 26, 2013 7:20 pm

I tried doing it with and without the services stopped. Also tried rebooting. I found out though, that using loadmxf it is definitely working as far as telling WMC to use a different file. I moved all the back ups to another folder, and then ran the loadmxf. After a short time, a new backup showed up that matched my custom changes. So the loadmxf did it's job, it's just that wmc didn't follow said changes. I'll have to check out what you said about the padding. What seems odd though, is that the backup file does show the padding settings as originally set in MC, and it does follow them. However, these numbers could be just that...numbers in a file saying what WMC plans to do, but not actually instructing WMC to.

I'll have to play around with it some more, and see if I can't somehow get it to work.

tzr916

Posts: 445
Joined: Tue May 28, 2013 11:56 pm
Location: Stockton CA

HTPC Specs: Show details

#7

Post by tzr916 » Tue Nov 26, 2013 7:48 pm

I have restored my C:\ProgramData\Microsoft\eHome\mcepgn-n using loadmxf.exe before and found it didn't seem to re-populate until I did a guide update manually (Tasks > TV > Guide > Get Latest Guide Listings) as per http://www.hack7mc.com/2009/03/backup-a ... edule.html

TheApocalyptican

Posts: 11
Joined: Thu Oct 24, 2013 9:22 am
Location:

HTPC Specs: Show details

#8

Post by TheApocalyptican » Wed Nov 27, 2013 6:40 pm

After some serious screwing around....this method does work. I found out that hard way that when using loadmxf, it adds to whatever is already in the recording schedule. So, if you want to modify a backup and restore it, you must clear all your recordings in media center, BEFORE, you run loadmxf. Now comes the more scary part. I had a problem initially after using loadmxf, and long story short, I had to erase my guide, and basically start with a fresh WMC. I believe this happened due to having too many recordings set up, as I ran loadmxf several times before realizing that it was duplicating recording settings.

So to sum up how to do this:
Go to C:\ProgramData\Microsoft\eHome\ and find your most recent mcepgX-X folder, and inside that folder will be a backup folder, and then inside that will be a recordings folder. Inside the recordings folder are the actual files which can be opened in either notepad, or xml notepad. Xml notepad makes it a bit easier to read and interpret the file. So, in my case, the full path for the file I used is: C:\ProgramData\Microsoft\ehome\mcepg2-2\backup\recordings\20131125_023435. Once you have edited your file, go to WMC, tasks, settings, tv, recorder, and Clear Recording Schedule. Once you do this, you can set up your loadmxf like this, which will restore the backup. And be sure, as tzr916, and hack7mc say to go in, and Get Latest Guide Listings. Once that's done, your recordings should be set up, in the same way that you set the in the now restored backup file.

One other thing to add is that the when using the post padding settings, there is a postPaddingRequested, and postPaddingRequired. Now, since I had hard post padding set up already, I saw that the postPaddingRequired setting was a normal setting, but postPaddingRequested, always has a - before the setting. For example, a hard padding:

prePaddingRequired="PT0S" prePaddingRequested="PT2M" postPaddingRequired="PT15M" postPaddingRequested="-PT15M"

and a soft padding:

prePaddingRequired="PT0S" prePaddingRequested="PT2M" postPaddingRequired="PT0S" postPaddingRequested="PT5M"

Post Reply