AfterDawn Forums

WMV Converter 0.33b Tool / How to Batch?

This discussion thread has 14 messages.

#1
I am in the process of converting my wmv-hd wmv/wma pro movies to mkv VC1/AC3. I have finally found the perfect wmv convertor, WMV Converter 0.33b. I have tried many, but they were limited, and at the very least, wouldn't keep 5.1 surround or had very bad quality and took way to long.

This little tool the video stream is copied, left in tact, the audio stream is converted to AC3 640. Conversion is in one step, as fast as copying a WMV file. Perfect, only complaint, only does one movie at a time.

I am trying to figure out if there is a way to batch the workflow for multiple movies. I cannot find the creator, and the webpage link is dead and gone. I was lucky enough to find the converter tool on usenet.

What I do know is the tool is written in Delphi, no source code distribution.
The developer made an updated version with commandline support, but I'm not sure if the version I have has it. If it does I have no idea how to make use of it.

I would be glad to post the file, but don't want to break any rules. I can't remember if posting links are allowed here or not.
▼▼ This topic has 13 answers - they are below this advertisement ▼▼
AfterDawn Advertisement
#2
I'm running Windows 7.
Created the batch file listed below
Placed it in the folder where wmv converter was installed.
Placed three .wmv files in the same folder.
From Start Menu, selected Command Prompt and elected to 'Run as Administrator'.
Browsed to the folder and ran the .bat file.
The .wmv files converted to .mkv ok.



for %%a in ("*.wmv") do call :nameit "%%a"
if %%a not==("*.wmv") then goto end
:nameit
wmvconverter.exe %1
:end

There's no error checking or anything fancy.
Seems to work.


#3
Originally posted by attar:
I'm running Windows 7.
Created the batch file listed below
Placed it in the folder where wmv converter was installed.
Placed three .wmv files in the same folder.
From Start Menu, selected Command Prompt and elected to 'Run as Administrator'.
Browsed to the folder and ran the .bat file.
The .wmv files converted to .mkv ok.



for %%a in ("*.wmv") do call :nameit "%%a"
if %%a not==("*.wmv") then goto end
:nameit
wmvconverter.exe %1
:end

There's no error checking or anything fancy.
Seems to work.



Finally got a chance to try it and I want to thank you. It works for what it is written to do. Though having all my movies in their own individual folders, this still requires a lot of additional work and time. Each file has to be copied to the wmvconverter folder within Program Files(86) and since each is in it's own folder I can't just copy all files. Even if I could seems inefficient with a large movie collection. Plus I don't even have enough disk space on my system drive to move hundreds of movie files to it.

I'm no coder by any means, but it just seems with all the technology and amazing scripts I've seen, that it shouldn't be to hard to have it process a parent folder and all sub folders (actual Movie folders) within it? I mean for someone experienced with scripts and writing code.

My basic movie folder structure:
EX: HDMovies\Movies1\Movies1.wmv
HDMovies\Movies2\Movies2.wmv
HDMovies\Movies3\Movies3.wmv

I know most are wondering, "Why the hell did you use WMV in the first place!" WMV's worked best with the XBOX 360 Extender and kept the 5.1 surround. But I have gone away from the Extender and MediaBrowser, and am using the WDTV Media Hubs now.

Anyhow thanks again, this small batch was definitely appreciated!
#4
Place the bat file in the HDMovies folder.
It puts the new .mkv file in the same folder as the original .wmv file.


for /f "tokens=* delims= " %%a in ('dir/s/b/a-d C:\hdmovies\*.wmv') do call :nameit "%%a"

if %%a not==("*.wmv") then goto end
:nameit

Rem My path to WMV converter folder
cd\
cd C:\Program Files (x86)\WMV Converter

wmvconverter.exe %1

:end

#5
Originally posted by attar:
Place the bat file in the HDMovies folder.
It puts the new .mkv file in the same folder as the original .wmv file.


for /f "tokens=* delims= " %%a in ('dir/s/b/a-d C:\hdmovies\*.wmv') do call :nameit "%%a"

if %%a not==("*.wmv") then goto end
:nameit

Rem My path to WMV converter folder
cd\
cd C:\Program Files (x86)\WMV Converter

wmvconverter.exe %1

:end


Looks promising, thanks a lot, but it's not working entirely. Every thing looks good up to the error.

G:\>call :nameit "G:\HDMovies\National Treasure (2004)\National Treasure (2004).
wmv"

G:\>Rem My path to WMV converter folder

G:\>cd\

G:\>cd C:\Program Files (x86)\WMV Converter

G:\>wmvconverter.exe "G:\HDMovies\National Treasure (2004)\National Treasure (20
04).wmv"
'wmvconverter.exe' is not recognized as an internal or external command,
operable program or batch file.

Of course it does this for every folder (movie), but other than that it is actually finding each .wmv in each individual movie folder, I'm impressed!
#6
The converter is on the C drive, but the movies are on the G drive?
#7
Originally posted by attar:
The converter is on the C drive, but the movies are on the G drive?
Yes that is correct. I keep my system drive separate from my movies and other data files.
#8
Before running the bat file, create an empty folder C:\HDMovies
Place the bat file in that folder

Changes to the bat file are the first three lines
The source for the videos, in my case, is the E drive - replace as required
Run the bat file from the admin prompt
The source folder structure will be copied to C and the files converted.
It's up to you to manually copy the structure back from C to G to replace the original


xcopy "E:\HDMovies" "C:\HDMovies" /s

cd\
cd c:

for /f "tokens=* delims= " %%a in ('dir/s/b/a-d C:\hdmovies\*.wmv') do call :nameit "%%a"

if %%a not==("*.wmv") then goto end

:nameit

Rem My path to WMV converter folder

cd\
cd C:\Program Files (x86)\WMV Converter

wmvconverter.exe %1


:end

#9
Originally posted by attar:
Before running the bat file, create an empty folder C:\HDMovies
Place the bat file in that folder

Changes to the bat file are the first three lines
The source for the videos, in my case, is the E drive - replace as required
Run the bat file from the admin prompt
The source folder structure will be copied to C and the files converted.
It's up to you to manually copy the structure back from C to G to replace the original


xcopy "E:\HDMovies" "C:\HDMovies" /s
cd\
cd c:

for /f "tokens=* delims= " %%a in ('dir/s/b/a-d C:\hdmovies\*.wmv') do call :nameit "%%a"

if %%a not==("*.wmv") then goto end

:nameit

Rem My path to WMV converter folder

cd\
cd C:\Program Files (x86)\WMV Converter

wmvconverter.exe %1


:end


Well thanks for trying to help with your script, I sincerely appreciate it.

Unfortunately I'm pretty much back where I started with having to move files around. Though with your script I only have to be concerned with moving them back to the respected movie folders, so it cuts things in half since I don't have to manually move each one outside it's movie folder.

The biggest issue with copying the files to the system drive, is it is only partitioned to 50GB and Windows 7 and program files are taking up 40GB of that.

Cant believe there is not a way to make the original batch work without doing this.

Thanks for your help.
This message has been edited since its posting. Latest edit was made on 25 Oct 2011 @ 19:02
#10
This works for me.
Put the batch file in the HDMovies folder of the data drive.
It copies a single .wmv file from the data drive to the system drive.
Converts the file to .mkv, deletes the .wmv in the system drive.
Moves the .mkv to the data drive.

The data drive now has both a .wmv and a .mkv



::place batch file in e:\HDMovies folder 

::change path in first line of batch file if different from 'e'

for /f "tokens=* delims= " %%a in ('dir/s/b/a-d e:\hdmovies\*.wmv') do call :nameit "%%a"

if %%a not==("*.wmv") then goto end

:nameit


copy %1 "C:\Program Files (x86)\WMV Converter"


call "c:\program files (x86)\wmv converter\wmvconverter.exe" %1


del "C:\Program Files (x86)\WMV Converter\*.wmv"


:end

#11
Originally posted by attar:
This works for me.
Put the batch file in the HDMovies folder of the data drive.
It copies a single .wmv file from the data drive to the system drive.
Converts the file to .mkv, deletes the .wmv in the system drive.
Moves the .mkv to the data drive.

The data drive now has both a .wmv and a .mkv



::place batch file in e:\HDMovies folder 

::change path in first line of batch file if different from 'e'

for /f "tokens=* delims= " %%a in ('dir/s/b/a-d e:\hdmovies\*.wmv') do call :nameit "%%a"

if %%a not==("*.wmv") then goto end

:nameit


copy %1 "C:\Program Files (x86)\WMV Converter"


call "c:\program files (x86)\wmv converter\wmvconverter.exe" %1


del "C:\Program Files (x86)\WMV Converter\*.wmv"


:end


Sounds promising, I will give it a try tomorrow. Seriously though, thank you!
#12
Originally posted by Modify123:
Originally posted by attar:
This works for me.
Put the batch file in the HDMovies folder of the data drive.
It copies a single .wmv file from the data drive to the system drive.
Converts the file to .mkv, deletes the .wmv in the system drive.
Moves the .mkv to the data drive.
:end[/code]
Sounds promising, I will give it a try tomorrow. Seriously though, thank you!
Thought I would let you know, your batch script works great!!

No biggie here, but is there any chance to add the ability to delete the original WMV file only after it has compared the *.wmv to the new *.mkv and has less than a 2% difference.

That is how I have been determining if they finished successfully.

If its a lot less than the the original WMV, then I know it didn't convert correctly, which has happened only a few times.
#13
I don't know how to do the arithmetic in a bat file - way beyond me.
#14
Why do you want to encode to mkv? try avc part 10, it will be easier to encode to and also give you smaller files. If you want a free encoding tool for avc part 10, download EncodeHD. AVC Part 10 can be played on most devices now such as ps3, xbox 360, computers, ect... and supports 5.1 sound with no problems. If you have nero encode, you can slow down the fps to 15 and make the file size even smaller so it fits on to a dvdr 4.7gb easily (I have done this with my blu rays and still maintain full 1080p resolution)(dvd movies can be put on to 700mb cdrs and still maintain a 480p resolution also).
http://dcunningham.net/media-tools/encodehd
This discussion thread has been automatically closed, as it hasn't received any new posts during the last 180 days. This means that you can't post replies or new questions to this discussion thread.

If you have something to add to this topic, use this page to post your question or comments to a new discussion thread.