This project has moved. For the latest updates, please go here.

WTV and Keep Until Deleted Location in File?

Dec 21, 2015 at 3:54 AM
I noticed if I copied WTV to WTV it reset the keep until to Keep until Delete. Where is this stored in the file as I can't find it in the properties?

I have 8,000 recordings! Due to missing the keep until delete in an upgrade of windows I ended up with many with keep until space needed and have had random shows deleting even though reasonable space left 1TB!

Since I put my WTV files that had keep until space needed into another media center and they keep the keep until setting and MCEBuddy seems to strip it out there must be somewhere in the file that sets this and logic says it should be in the properties. Any clues as I want to find and bulk change that setting. I could run everything through MCEBuddy but it would take a long time and I am not sure if it would reliably work anyway.

Thanks for any info on this.
Coordinator
Dec 21, 2015 at 12:40 PM
That info is not stored inside the WTV but rather in MCE's own database. When a WTV is converted back to a WTV the metadata is copied over byte for byte with the exception of one or two which are updated (like duration etc which may have changed during the conversion).

Dec 21, 2015 at 12:51 PM
Thanks, that's strange as when I move the file to another media center it seems to keep the same keep until settings. You don't have any idea which file contains this data do you?
Coordinator
Dec 21, 2015 at 1:28 PM
Can't say for sure but I think it looks at the metadata in the recording to determine how long to keep it (maybe recording date etc).

Dec 21, 2015 at 5:26 PM
Edited Dec 21, 2015 at 5:29 PM
Ok I found the database and deleted and rebuilt. I then completely uninstalled media center and all directories as per thegreenbutton.tv then I gave up an reinstalled windows 8.1 after formatting the disk. This took quite a while setting everything up. Still programs remember delete until settings. I then setup a Virtual Machine and dragged the files into that media center same result. There is something in the file that flags how long to keep the recording. It would be nice to set media center up to just not delete at all and give a warning. Problem is every install it flags new recordings to keep until space needed and WMC seems to have a mind of its own on when that happens and it occurs without warning. I lost 50 programs in the last week before I noticed probably only really wanted 5. So now I know if I run the files through your app it will clean them up to keep until delete but thats going to take forever for 8,000! There seems to be no easy way to change this and it takes quite a few keystrokes to change the keep until settings on each recording. I would be happy to convert everything to MP4 but I don't undersand how that works, obviously media center really only wants to see WTV files, the meta data does not transfer to videos placed in Videos folder for Media Center.

I guess what people are doing is WMC for recording PVR then another front end.

The more I read I just wish Microsoft worked on WMC where it has remained virtually abandoned since VISTA with only very minor tweaks.

What is the best workflow and Playback device that will work with WMC as a recorder, MCEBuddy as converter and then something to play back that gives me more value than WMC? I have used WMC since 2005.

Thanks for your time, I will donate even if I don't use the new version just because you have answered questions that no one does anywhere else including thegreenbutton.tv

Edit: Donated now
Coordinator
Dec 22, 2015 at 12:08 AM
What's your goal? Remove commercials ? Rename only?

Coordinator
Dec 22, 2015 at 12:10 AM
You know you can change the DEFAULT settings in WMC to not delete. Then you can delete it manually.

The reason new files are marked delete until required is because that's what you default setting is set to

Dec 22, 2015 at 1:07 AM
Thanks my goal is to stop recordings from deleting without notice when WMC thinks 1TB is low disk space. I setup windows 8.1 some time back and it went for quite a while where the default delete option was set keep until space needed, that option is applied at record time not on existing recordings. I changed it to keep until delete quite a while later but now I have recordings deleting because they don't have keep until delete set.

I assume you know how many remote operations it takes to change this for every recording so nothing deletes but I get a low disk warning that I can manage :-)

So Goal make media center think all WTV files are tagged "Keep until Delete"

On the remove comercials that would be great but I don't have the confidence. I'm in Australia and use VideoRedo TV if I want to get rid of comercials and it has false positives so it takes a while to go through manually. If Videoredo was the ad detection and I ran it on automatic I would not like to lose real content. Maybe your software is more reliable but I read people have problems and have to fiddle a lot. Down the track I might look at an other Media Player and use WMC as a back end PVR but I still like Recorded TV it keeps things easily accessible and fairly reliable. I was hoping someone would know a quick way to sort and identify different keep until WTV recordings so I could limit how many I have to change or have a fast way of bulk changing.

I experimented with the free MCEBuddy and WTV - WTV seemed to change the file although I checked before and after and they look identical properties except created and modified date of today but suprisinginly size was smaller using the WTV Unprocessed in MCEBuddy 2.3 Release 13. I did notice it did fast remuxing. It also then shows in media Center as the perfect "Keep until Delete" not sure why size smaller though as not sure what it is remuxing?

It takes some time though and not sure if it will effect recordings adversely might have to experiment. I paid and got the login so will get latest version. I might do WTV to WTV mpg4. I liked MP4 as an option but in Media Center shows next to no metadata. If I could see on an other player similar layout and useability in an other app I would move away from playing back from recorded TV and get out of the proprietary WTV container.

If you have any suggestions on player and what format will work best I am open to suggestions but each time I try and move away from WMC it seems to get complicated. Thanks for all your help.
Coordinator
Dec 22, 2015 at 2:22 AM
> So Goal make media center think all WTV files are tagged "Keep until Delete"

Then see my previous post. The setting is defined in the WMC settings, nothing to do with the files. the files data is just used to calculate the expiration date - for your purpose you need to configure WMC to NOT delete any files.

Dec 22, 2015 at 2:33 AM
Yes exactly thanks you set the setting to "Keep to Delete" will work on all NEW recordings. I still have 8,000 old recordings to search through and fix. That setting is baked into the WTV file somewhere. Have files with different "keep to" settings and copy them to other WMC and the settings go with the file. I am trying to make all the Old files Keep until Delete. Sorry I must not have been clear enough. Thanks for following up.
Coordinator
Dec 22, 2015 at 8:27 AM
Not that I'm aware of but you can try this:

Download this software DVREdit

Open your WTV file which has the issue in it and look through all the metadata items to see if you can find anything that might resemble the keep until option (it may be a code or a string or a date or number). If you find it post back and we'll see what can be done.

Coordinator
Dec 22, 2015 at 6:30 PM
hmm my bad, I guess there is a field called WM/WMRVKeepUntil in the metadata.

Anyways MCEBuddy doesn't disturb this setting, it just copies all metadata over. MCEBuddy only updates the WM/WMRVEndTime and Duration tags to update the file length.

Dec 23, 2015 at 5:56 AM
Thanks for pointing me in the right direction. dvredit.zip file wouldn't work on Windows 8.1 I found something that did and your metadata copying is more comprehensive with latest MCEBuddy. Here is what I found and a request.

Use http://blogs.msdn.com/b/toub/archive/2005/05/12/416874.aspx
Download EditDvrmsMetadata.exe
Open Program and Select .
Open WTV File
Near the properties bottom you will see this
WM/WMRVKeepUntil DWORD

By experimentation I found what the number represented

0= Keep Until I Delete
-1= Keep Until Space Needed
-2= Keep Until I Watch
-1= Keep Until (date) 1 Week cant find any difference between this and Keep Until Space Needed. Must be some value not viewable with editor.

Cant find anything to batch edit the metadata would be great to run batch over all WTV and change WM/WMRVKeepUntil 0 = Keep Until I Delete, someone suggested Powershell but no idea how to write something like that.

Running MCEBuddy 2.3 Release 13 deletes the WM/WMRVKeepUntil metadata field completly and WMC then assumes = 0 so never deletes which is what I want.

Running MCEBuddy 2.4.2 Keeps the WM/WMRVKeepUntil metadata field completly and WMC then uses the original value recorded. Not so good as I need to batch change all recordings to = 0 Keep Until I delete or it seems just delete the metadata field completly WM/WMRVKeepUntil but that may have unintended consequences so best to change value.

Conversion from WTV to WTV H264 even with only HD4000 Intel onboad Graphics is reasonable time so looking at doing that.

So still need a way to batch change the WM/WMRVKeepUntil metadata field when processing to Zero happy for someone by PayPal to charge me to do this or add feature to MCEBuddy 2.4.2 Advanced Setting.

Thanks for your time getting me to this rboy1
Coordinator
Dec 23, 2015 at 5:12 PM
Try this program VideoToolsUpdater (version 1.5.1)

You can find it here:

It has a CLI program called WMCMetadataUpdater which allows you to update Metadata items for Windows Media files (like WTV, DVR-MS, WMV, ASF, anything that uses Windows Streams metadata).

It's simple to use:
E.g. WMCMetadataUpdater "C:\update me\test.srt" WM/WMRVKeepUntil "-1" dword
E.g. WMCMetadataUpdater "C:\update me\test.srt" WM/MediaIsSport "true" bool
E.g. WMCMetadataUpdater "C:\update me\test.srt" Title "Doctor Who" string


You can run a batch script to iterate through all your files/directories and use the filenames inputs to the WMCMetadataUpdater.exe file and update the values.

Taken from:

Iterate through...

  • ...files in current dir: for %f in (.\*) do @echo %f
  • ...subdirs in current dir: for /D %s in (.\*) do @echo %s
  • ...files in current and all subdirs: for /R %f in (.\*) do @echo %f
  • ...subdirs in current and all subdirs: for /R /D %s in (.\*) do @echo %s

Marked as answer by rboy1 on 12/23/2015 at 10:12 AM
Dec 23, 2015 at 11:56 PM
Thanks very much for the Links, I have the VideoToolsUpdater.

Ok you have found me out. I can't work out what this would look like in my world. I don't know how to write batch files but if easy to understand can edit them from time to time.

WM/WMRVKeepUntil "0" dword

Is the only bit I can follow.

Would you mind writing the batch file so I can just edit the directory?

Sorry I know you have already spent a lot of time with me.

Let me know what you want and I can send you an extra donation to your PayPal.
Coordinator
Dec 24, 2015 at 1:05 AM
Edited Dec 24, 2015 at 1:08 AM
Here you go.
Copy this into a batch file and place the batch file in the directory you want it to start working. It will take all the WTV files (*.wtv) in the directory and all sub directories and run them through the WMCMetadataUpdater.exe and set the KeepUntil flag to 0.

Things to note:
  1. Set the location of the WMCMetadataUpdater.exe correctly in the script in the variable VTU
  2. Make sure you put this batch script in the folder you want it to start looking
  3. You can change the filter from *.wtv to anything else you like (e.g. *.dvr-ms)
  4. It is set to work recursively by default, if you DO NOT want it to work recursively in all sub directories then REMOVE the /R in the for statement
@echo off
set VTU="C:\VideoUpdaterTools\WMCMetadataUpdater.exe" 
for /R %%f in (*.wtv) do (
  %VTU% "%%f" WM/WMRVKeepUntil "0" dword
)
Thanks for your support.
Marked as answer by rboy1 on 12/23/2015 at 6:05 PM
Dec 24, 2015 at 2:33 AM
Edited Dec 24, 2015 at 2:34 AM
Thanks very much rboy1

Very easy instructions.

I ran the bat file and looked all ok put test files in WMC Recorded TV and what the Keep Unil still showed old settings.

Looked at the Metadata for WM/WMRVKeepUntil and it had updated to = 0

Had a think then decided probably the database needed deleting and updating. Not sure if it can be forced to update or not but deleting is a pain to set everything up again.

What I did is
  1. Removed WTV files from Recorded TV to separate folder.
  2. Opened Windows media center for a while assuming it would see files not there and delete from database
  3. Ran the batch file in Temporary folder not viewable in WMC Recorded TV
  4. Shutdown WMC
  5. Copied updated metadata WTV files to Recorded TV
  6. Opened WMC and Recorded TV recordings now showed the Correct Keep Until details.
So what I have learnt is whatever the setting is in the WMC for Keep until fills the WM/WMRVKeepUntil with the value and records in the WMC database also so both have to update.

If you delete the database you have to do a full re setup WMC so painful but if you need to the details are below.

http://social.technet.microsoft.com/wiki/contents/articles/22442.how-to-rebuild-windows-media-center-database-in-windows-8-1.aspx?tduid=(7f23beadf580d7ea1f0d5aebadbc7424)(256380)(2459594)(TnL5HPStwNw-H0n0AAU.psWBTrcRhwUzng)()

Hope this helps someone else.

Thanks for all your time. I will send some money.