-
2nd April 2009 04:03 PM #1
Help to write a batch file to convert recorded TV to DVR-MS
As Windows 7 build 7048 and above now include a built in convertor to convert .wtv to .dvr-ms I want to run a batch file that scans my recorded tv folder and automatically runs this file then deletes the original so I can then use life extender to remove commercials.
My questions are:
Is this scenario possible?
is it too difficult to bother?
Can anyone offer advice on how to do this?
-
2nd April 2009 08:56 PM #2
Re: Help to write a batch file to convert recorded TV to DVR-MS
Try this
Haven't tested it myself because I don't have WTV Converter on my machine, but it should work (if not it'll create a log file in the directory it's installed in).
Just start it, it'll start minimised in the tray - double click to open, select the recorded tv folder and do a test. It should wait for a recording to finish and then attempt to convert.
I wouldn't use the delete function on anything important just yet."How's the serenity"
-
The following Member(s) said "Thank You!" to dgaust for this information:
-
5th April 2009 11:42 PM #3Newbie
- Join Date
- May 2008
- Posts
- 6
Re: Help to write a batch file to convert recorded TV to DVR-MS
does this work on VMC? Looks just like what I need!
-
6th April 2009 02:51 AM #4
Re: Help to write a batch file to convert recorded TV to DVR-MS
*Found a response helpful? Please use the "thanks" button :)
*Guide: Creating Custom Themes in Media Center
*Guide: VistaMC TV Pack 'Fiji': Useful Info for Oz Users
"To generalise is to be an idiot." -William Blake
*
"Ignorance is the root and stem of all evil." -Plato
-
6th April 2009 10:33 AM #5
Re: Help to write a batch file to convert recorded TV to DVR-MS
No it won't. It is just a small file watcher application that triggers the WTVCovnverter.exe file that's included in the later builds of Win7.
If you don't have that exe, it won't do anything."How's the serenity"
-
25th April 2009 02:56 AM #6Newbie
- Join Date
- Apr 2009
- Posts
- 2
Re: Help to write a batch file to convert recorded TV to DVR-MS
It is quite possible and easy if you have a command line conversion utility. I have seen some reference to todvrms on this website. So, I will use that utility in this example.As Windows 7 build 7048 and above now include a built in convertor to convert .wtv to .dvr-ms I want to run a batch file that scams my recorded tv folder and automatically runs this file then deletes the original so I can then use life extender to remove commercials.
My questions are:
Is this scenario possible?
is it too difficult to bother?
Can anyone offer advice on how to do this?
Here is what you do.
1. Copy and paste the following script to file C:\scripts\Convert.txt .
2. (If you don't already have biterscripting) Install biterscripting free. Follow instructions at http://www.biterscripting.com/install.html .Code:# CONVERSION SCRIPT # Change directory to "recorded tv folder" (ENTER THE CORRECT FOLDER PATH BELOW.) ccd "recorded tv folder" # Collect a list of recorded tv files var str filelist ; lf -rn "*.wtv" > $filelist # Convert one file at a time while ($filelist <> "") do var str file ; lex "1" $filelist > $file var str converted_file ; stex -c -p "]^.wtv^l" $file > $converted_file set $converted_file = $converted_file + ".dvr-ms" # The name of the output file is now in $converted_file. # It is the same name as input file, except .wtv is replaced wtih .dvr-ms. # Convert file system "todvrms.exe" ("\""+$file+"\"") ("\""+$converted_file+"\"") # Delete original file system del ("\""+$file+"\"") done
3. Start biterscripting and enter the following command.
4. That would do it.Code:script "/Scripts/Convert.txt"
RandiLast edited by RandiR; 25th April 2009 at 04:49 AM.
-
-
26th April 2009 01:19 AM #7
Re: Help to write a batch file to convert recorded TV to DVR-MS
It would be nice if MS/Someone could import that inbuilt wtv converter to vista

Astro*Found a response helpful? Please use the "thanks" button :)
*Guide: Creating Custom Themes in Media Center
*Guide: VistaMC TV Pack 'Fiji': Useful Info for Oz Users
"To generalise is to be an idiot." -William Blake
*
"Ignorance is the root and stem of all evil." -Plato
-
4th May 2009 02:26 AM #8Newbie
- Join Date
- Apr 2009
- Posts
- 1
Re: Help to write a batch file to convert recorded TV to DVR-MS
Thanks for that script, RandiR.
I was able to use it to convert my 50+ WTV files because I want to go back to non- TV Pack (stopped using QAM).
Suggestions to others:
1) ccd "recorded tv folder"
If your recorded tv folder is on another hard drive, use this syntax:
ccd "f:/recorded tv"
the ccd function requires a "/" instead of the usual "\".
Also be sure the todvrms.exe is in your recorded tv folder.
2) I would suggest removing the line that deletes the original .WTV file. todvrms is not a 'solid' program and it will fail often on a conversion and then you'll have lost the original WTV file. You're better off manually deleting the .WTV files.
or if you create a while statement that will only delete the WTV file if the file size of the dvr-ms is greater than 1MB, that would work. If the conversion fails, the dvr-ms file has always been under 1 MB for me.
3) To add meta data and make the conversion more stable, change the todvrms syntax line:
system "todvrms.exe" ("\""+$file+"\"") ("\""+$converted_file+"\"") "-m -v"
-
4th May 2009 08:59 AM #9Newbie
- Join Date
- Apr 2009
- Posts
- 2
Suggestions for the todvrms script
jrwalte:
You are welcome. Thanks for the suggestions. All are excellent.
One can use the af command to check the size of the converted file. The delete portion of the script can be changed as follows. Perhaps, instead of a fixed 1MB number, a number based on the size of the original file can be used ?If the conversion fails, the dvr-ms file has always been under 1 MB for me.
Please do post your better script - I think you have made several other changes. I think that a lot of readers can benefit.Code:# Delete original file, but only if the converted file has at least 1MB bytes. # Below 1 MB would indicate that the conversion failed. af $converted_file if ($fsize < 1000000) echo "Conversion failed for file " $file else system del ("\""+$file+"\"") endif
Randi
-
4th May 2009 05:04 PM #10
Re: Suggestions for the todvrms script
Just a FYI. The latest videoredo beta apparent allows you to quickstream fix WTV to dvrms. I havent used it yet, so cant comment on its effectiveness ...
Re- WTV Conversion Conclusions:
After a few days of searching, fiddling and contemplation - I have tried everything, dvrmstb, mce buddy, videoredo beta... sure it can 'sorta work' ....but all CLUNKY and or cumbersome with oft dubious results. I hate that. I hate scripts even more
I have found this the most easy WTV>DVRMS conversion option from within an XP or vista pc >>> Im sure there might be a few who find this useful
1. Run a virtual W7 from your xp/vista whetaver desktop. (Im using MS virtual PC, VMware is nice but too bloated for such a simple use IMO)
2. Make sure the location where WTVs are stored are networked so you can access them from your virtual rig
3. Use W7s inbuilt dvrms converter(accesible from R click menu) >> Thats it!!
Now I have all those accumulating WTVs ready to accumulate as DVRMS until I can be arsed trimming and encoding them
Works as fast as your CPU/Allocated RAM to the virtual rig allows. Ive got 1.5GB to my virtual W7 and converting took same time as it did in a native win7 install environment. Good ole virtualistion eh
I'll be happy to abandon this method once video redo etc are smooth an steady with WTVs 
AstroLast edited by Astrotoy7; 5th May 2009 at 05:18 AM.
*Found a response helpful? Please use the "thanks" button :)
*Guide: Creating Custom Themes in Media Center
*Guide: VistaMC TV Pack 'Fiji': Useful Info for Oz Users
"To generalise is to be an idiot." -William Blake
*
"Ignorance is the root and stem of all evil." -Plato
-
31st July 2009 04:02 PM #11
Re: Help to write a batch file to convert recorded TV to DVR-MS
Excuse my ignorance but I have a growing list of .wtv files from W7 Media Center and I cannot seem to find the built-in dvrms converter to be able to convert them in VideoReDo. When I right-click on the wtv file there is no option to convert to dvr-ms.
Can anyone help?
-
31st July 2009 04:10 PM #12
Re: Help to write a batch file to convert recorded TV to DVR-MS
Right click on the file and there should be the option "Convert to DVR-MS". Apparently it will only appear if the wtv files are associated to open in Windows Media Centre.
"How's the serenity"
-
The following Member(s) said "Thank You!" to dgaust for this information:



Reply With Quote


Bookmarks