NinjaCipher:-*-:ro60

Archive for April, 2008

Batch converting avi files for xbox

Sunday, April 27th, 2008

So awhile back (when I switched to Vista which had built in windows media center) I started getting into streaming videos from my pc to my xbox over the network so I could watch them on my tv. I did some searching and found that you have to convert everything to wmv first. So since all the files I have were avi files I found this tutorial to help me convert the files without having to pay for some shady converter software. Following that tutorial I got up and running fairly quickly and everything was peachy. Well sorta. My only issue was with this method you can only do one video at a time. So since I have a huge library of episodic anime this quickly became a prob. So I wrote a little add on to the instructions above that allows you to batch convert your avi files to wmv file using vlc player.

First the convert.bat file. Copy this code to a file and name it convert.bat. Put it in the directory where all your avi files are.

"C:\Program Files\VideoLAN\VLC\vlc" -vvv %1 --sout-ffmpeg-qscale 1 :sout=#transcode{vcodec=WMV2,scale=1,acodec=wma,ab=96,channels=2}:duplicate{dst=std{access=file,mux=asf,dst=%1.wmv}} vlc:quit

note
You may have to change this part C:\Program Files\VideoLAN\VLC\vlc to point at the path you installed your alc player if you didn’t go with the default install location.

Next the the bulk-convert script. Save the following code into a file and name it bulk-convert.bat. Put this script in the same directory as you convert.bat and all your avi files.

lfnfor off
for %%x in (*.avi) do call convert.bat %%x

From there all you have to do is click on the bulk-convert.bat file and it will cycle through all the avi files in the directory and feed them into your convert.bat file.

Enjoy :)