Automatic script generation

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Automatic script generation

Postby Cannonaire » Fri May 28, 2010 7:25 pm

I was wondering if there is a way to automatically generate AviSynth scripts for a batch of files, and if so if you can specify some lines to be added to all of them. Sorry if this has been asked before, but I did try a few searches and I couldn't find anything.
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.
User avatar
Cannonaire
 
Joined: 05 May 2010
Location: Oregon
Status: OVERLOAD

Re: Automatic script generation

Postby mirkosp » Fri May 28, 2010 7:46 pm

viewtopic.php?f=45&t=88059

That thread holds a few solutions, I think Phantasmagoriat's might be the best one for what you're looking for. Or perhaps something else, I dunno. But yeah, it's kinda hard to find... maybe I should sticky it...
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Automatic script generation

Postby Cannonaire » Fri May 28, 2010 8:40 pm

Thank you.
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.
User avatar
Cannonaire
 
Joined: 05 May 2010
Location: Oregon
Status: OVERLOAD

Re: Automatic script generation

Postby Mister Hatt » Fri May 28, 2010 9:04 pm

There are some online perl scripts for doing this and other things, you'd probably need to ask someone in Darkhold for links though. I know there is one for insertsign() that could be easily modified to load sources. You could probably even make a small batch file for it. I just use shell one liners to do this kind of thing, echo and directed output is good enough.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: Automatic script generation

Postby Phantasmagoriat » Fri May 28, 2010 9:08 pm

oh yeah, I remember writing that :awesome:
although when I think about it now, it might be easier to just learn a few DOS commands.
[assuming you are running windows] you can simply tell your computer:

"for all of the files of the type specified, print *blah* to an avisynth script with the same name"

Code: Select all
SET TYPE=avi
mkdir SCRIPTS
for %%f in (*.%TYPE%) do echo avisource("..\%%f")              >  "SCRIPTS\%%f.avs"
for %%f in (*.%TYPE%) do echo trim(2158,31888)                 >> "SCRIPTS\%%f.avs"
for %%f in (*.%TYPE%) do echo killaudio()                      >> "SCRIPTS\%%f.avs"
for %%f in (*.%TYPE%) do echo changefps(29.97)                 >> "SCRIPTS\%%f.avs"
for %%f in (*.%TYPE%) do echo converttoyv12()                  >> "SCRIPTS\%%f.avs"
for %%f in (*.%TYPE%) do echo crop(8,0,-8,0)                   >> "SCRIPTS\%%f.avs"
for %%f in (*.%TYPE%) do echo spline36resize(848,480)          >> "SCRIPTS\%%f.avs"
for %%f in (*.%TYPE%) do echo gradfun2db()                     >> "SCRIPTS\%%f.avs"
for %%f in (*.%TYPE%) do echo limitedsharpen(strength=50)      >> "SCRIPTS\%%f.avs"


and it's easy to see which part you need to copy/modify if you want to make changes.
-Just paste this into a .txt file, and change it to .bat
-Then run it in the same folder that contains your files

I should note that a single ' > ' overwrites any old scripts whereas ' >> ' adds a new line
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."
User avatar
Phantasmagoriat
 
Joined: 06 Feb 2006
Status: ☁SteamPunked≈☂

Re: Automatic script generation

Postby Cannonaire » Fri May 28, 2010 9:35 pm

That's enormously useful, Phantasmagoriat. It's pathetic how little I know about DOS commands for how long I've been using windows computers. Thanks for your help, everyone.
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.
User avatar
Cannonaire
 
Joined: 05 May 2010
Location: Oregon
Status: OVERLOAD


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 0 guests