Page 1 of 1

Run a command dependant on variables from the user.

Posted: 05 Apr 2008 15:23
by lemook
What I need is -

The user is prompted to enter two variables - moviename and time(in seconds)

The moviename var has to be amended with an x.avi making it movienamex.avi as this is the out put file of mencoder. And the moviename would have ".avi" added to become the input file.

And then these are used to run the following automatically in the command line..

mencoder -ss "time" -oac copy -ovc copy "moviename.avi" i -o "movienameX.avi"

Hope someone can help,

Cheers.

Posted: 07 Apr 2008 12:32
by polarpal
echo off
set /p movie=[Enter movie name, no extension:]
set /p tss=[Enter time:]
echo mencoder -ss "%tss%" -oac copy -ovc copy "%movie%.avi" i -o "%movie%X.avi"