+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 15 of 21
  1. #1
    MC Mentor aanda6's Avatar
    Join Date
    Jun 2006
    Location
    Berwick
    Posts
    845
    Status
    Online

    Thanks given
    68
    Thanks received: 99 in 73 posts


    Reputation earned: 288 points

    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?

  2. Google Adsense image



  • #2

    dgaust's Avatar
    Join Date
    May 2006
    Location
    Wollongong, NSW
    Posts
    5,933
    Status
    Online

    Thanks given
    112
    Thanks received: 1,072 in 915 posts


    Reputation earned: 2509 points

    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:


  • #3
    Newbie Biffa001's Avatar
    Join Date
    May 2008
    Posts
    6
    Status
    Offline

    Thanks given
    0
    Thanks received: 0 in 0 posts


    Reputation earned: 10 points

    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!

  • #4
    Astrotoy7's Avatar
    Join Date
    Mar 2006
    Posts
    4,606
    Status
    Offline

    Thanks given
    545
    Thanks received: 588 in 412 posts


    Reputation earned: 1489 points

    Re: Help to write a batch file to convert recorded TV to DVR-MS

    Quote Originally Posted by Biffa001 View Post
    does this work on VMC? Looks just like what I need!
    Try it and find out! I dont have any wtv recordings on my Fiji rig to try it on atm

    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

  • #5

    dgaust's Avatar
    Join Date
    May 2006
    Location
    Wollongong, NSW
    Posts
    5,933
    Status
    Online

    Thanks given
    112
    Thanks received: 1,072 in 915 posts


    Reputation earned: 2509 points

    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"

  • #6
    Newbie RandiR's Avatar
    Join Date
    Apr 2009
    Posts
    2
    Status
    Offline

    Thanks given
    0
    thanked:
    2 times in 1 post


    Reputation earned: 12 points

    Re: 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 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?
    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.

    Here is what you do.

    1. Copy and paste the following script to file C:\scripts\Convert.txt .
    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
    2. (If you don't already have biterscripting) Install biterscripting free. Follow instructions at http://www.biterscripting.com/install.html .

    3. Start biterscripting and enter the following command.

    Code:
    script "/Scripts/Convert.txt"
    4. That would do it.

    Randi
    Last edited by RandiR; 25th April 2009 at 04:49 AM.

  • The Following 2 Users Say Thank You to RandiR For This Useful Post:


  • #7
    Astrotoy7's Avatar
    Join Date
    Mar 2006
    Posts
    4,606
    Status
    Offline

    Thanks given
    545
    Thanks received: 588 in 412 posts


    Reputation earned: 1489 points

    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

  • #8
    Newbie jrwalte's Avatar
    Join Date
    Apr 2009
    Posts
    1
    Status
    Offline

    Thanks given
    1
    Thanks received: 0 in 0 posts


    Reputation earned: 10 points

    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"

  • #9
    Newbie RandiR's Avatar
    Join Date
    Apr 2009
    Posts
    2
    Status
    Offline

    Thanks given
    0
    thanked:
    2 times in 1 post


    Reputation earned: 12 points

    Suggestions for the todvrms script

    jrwalte:

    You are welcome. Thanks for the suggestions. All are excellent.

    If the conversion fails, the dvr-ms file has always been under 1 MB for me.
    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 ?

    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
    Please do post your better script - I think you have made several other changes. I think that a lot of readers can benefit.

    Randi

  • #10
    Astrotoy7's Avatar
    Join Date
    Mar 2006
    Posts
    4,606
    Status
    Offline

    Thanks given
    545
    Thanks received: 588 in 412 posts


    Reputation earned: 1489 points

    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

    Astro
    Last 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

  • #11
    MC Graduate aceman's Avatar
    Join Date
    Nov 2007
    Location
    Adelaide
    Posts
    65
    Status
    Offline

    Thanks given
    3
    Thanks received: 7 in 5 posts


    Reputation earned: 25 points

    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?

  • #12

    dgaust's Avatar
    Join Date
    May 2006
    Location
    Wollongong, NSW
    Posts
    5,933
    Status
    Online

    Thanks given
    112
    Thanks received: 1,072 in 915 posts


    Reputation earned: 2509 points

    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:


  • #13
    MC Graduate aceman's Avatar
    Join Date
    Nov 2007
    Location
    Adelaide
    Posts
    65
    Status
    Offline

    Thanks given
    3
    Thanks received: 7 in 5 posts


    Reputation earned: 25 points

    Re: Help to write a batch file to convert recorded TV to DVR-MS

    Thanks very much, I new it would be something so simple! The files were associated to open with WMP!

    Cheers

  • #14
    Newbie 1percenter's Avatar
    Join Date
    Aug 2009
    Posts
    3
    Status
    Offline

    Thanks given
    0
    thanked 1 time in 1 post


    Reputation earned: 12 points

    Re: Help to write a batch file to convert recorded TV to DVR-MS

    Hello

    refer to my blog post for a batch file to do this. dead simple and works a treat

    http://theonepercenters.net

  • #15
    Newbie 1percenter's Avatar
    Join Date
    Aug 2009
    Posts
    3
    Status
    Offline

    Thanks given
    0
    thanked 1 time in 1 post


    Reputation earned: 12 points

    Re: Help to write a batch file to convert recorded TV to DVR-MS

    [QUOTE=1percenter;263860]

    Sorry i have moved domains - batch file can be found now at the following

    Hey guys, i have created a batch file that will automatically convert .wtv files back to .dvr-ms so ads can be removed. You just need to set it as a scheduled task.
    Post and file at my blog
    http://gtnv.net/2009/08/remove-ads-f...-media-centre/

  • Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts

    Content Relevant URLs by vBSEO 3.5.0 RC3