Batch file experts in here!

Soldato
Joined
14 Apr 2003
Posts
4,950
Location
Deepest Yorkshire
I've got the following batch file which converts .avi files to .wmv for my XBox 360 using VLC. I drag a file onto the .bat file and it outputs a file in the same directory as the input file.


"c:\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}}

I was wondering if it would be possible instead to put the file in D:\My Videos\sourcefilename.wmv instead. I think this is something to do with the
dst=%1.wmv
part of the line except I don't know how to strip the path from the %1 and it outputs to D:\My Videos\C:\sourcelocation\sourcefilename.wmv instead which does not work.

Bonus points: If you can make it so that I can drag a load of files onto the batch file at once and have it encode them one by one... :D

cheers
Hamish
 
bledd. said:
you can get on the fly transcoders for xbox360 i've read..

Yep, you're right. I use a program called TVersity which encodes videos on the fly, assuming you have a network link between the your PC and Xbox. You can view your videos/pics/music through the media player on the xbox.
 

If you drag C:\sourcelocation\sourcefilename.avi onto the unmodified batch file, it creates C:\sourcelocation\sourcefilename.wmv?

Try adding the following lines to the end of the batch file :

copy %1.wmv D:\My Videos
del %1.wmv
 
Back
Top Bottom