Page 1 of 1

Generating distinct .ts output names from a .bat file

Posted: 19 Jan 2007 03:05
by poiuytrewq
I am not sure whether the issue here is VLC or bat files, but here goes.

I have set up a .bat file that automatically transcodes my media for viewing on my dreambox using this line:

"%ProgramFiles%\VideoLan\VLC\vlc" -vvv %1 :sout=#transcode{vcodec=mp2v,vb=3072,scale=1,acodec=mp2a,ab=192,channels=2}:duplicate{dst=std{access=file,mux=ts,dst="D:\MyVideos\DreamShare\stream.ts"}}

The one problem with it though, is that it automatically generates the same output name for each file i input: stream.ts

I would like to reconfigure this so that each output is named unquely or (ideally) after the input file.

eg. panda.wmv becomes panda.ts after it is transcoded.

Does anyone know how to do this?

p.

Posted: 19 Jan 2007 06:47
by Tappen
http://labmice.techtarget.com/articles/batchcmds.htm

It will tell you to use "%~p1%~n1.ts" instead of "D:\MyVideos\DreamShare\stream.ts"

Posted: 19 Jan 2007 09:16
by poiuytrewq
http://labmice.techtarget.com/articles/batchcmds.htm

It will tell you to use "%~p1%~n1.ts" instead of "D:\MyVideos\DreamShare\stream.ts"
Thanks! It seems that %~n1 actually did the trick... thanks...

p.