Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
6th July 2004, 16:55 | #1 | Link |
Registered User
Join Date: Jun 2004
Posts: 10
|
generate avs-script for similar sourcefiles in directory
Hi,
I backup old tv-episodes (from .rm) and use an avs-script to feed each file to the encoder. Thing is : I have a directory with 356 episodes, they all need the same kind of script. This is an example for 16 may 2003 : --begin---------- filename is 20030516.avs DirectShowSource("c:\RealMedia\20030516.rm",25) BilinearResize(352,288) --end------------ For each realmediafile I need to change the .rm-filename in the above example and save it under its own .avs-filename Is there a way to automate this for an entire directory ? I have been searching for a week but no luck. Anyone ? Daisy
__________________
Daisy D Fetherweight I compressed my programming to code.avi and now it looks real good. |
6th July 2004, 17:51 | #2 | Link |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
From the command prompt, you can do something like:
Code:
for %x in (*.rm) do ( echo.DirectShowSource^("%x",25^) echo.BilinearResize^(352,288^) ) > "%~nx.avs" Code:
function DoIt(string filename) { DirectShowSource(filename, 25) BilinearResize(352, 288) # ... other AviSynth processing commands... return last } Code:
for %x in (*.rm) do ( echo.Import^("common.avs"^) echo.DoIt^("%x"^) ) > "%~nx.avs" Last edited by stickboy; 6th July 2004 at 18:00. |
6th July 2004, 19:59 | #3 | Link |
Registered User
Join Date: Jun 2004
Posts: 10
|
I'm trying this out now and hope I can make it work. Then I will look into the syntaxis some more because this is real interesting stuff.
Thanks and I will post feedback D
__________________
Daisy D Fetherweight I compressed my programming to code.avi and now it looks real good. |
6th July 2004, 22:44 | #4 | Link |
Registered User
Join Date: Jun 2004
Posts: 10
|
When you say :
----------- From the command prompt, you can do something like: code: for %x in (*.rm) do ( echo.DirectShowSource^("%x",25^) echo.BilinearResize^(352,288^) ) > "%~nx.avs" --------------- What kind of prompt do you mean ? Since reading your reply I have looked into .vcf, sylia and also java script, since I assume that is the environment where you use that type of code. I nowhere find the syntax for %x = string being filename; I don't find what % means in this expression *.rm = whatever.rm %~nx.avs = building all the filenames In my day to day life I don't do that much programming (not counting turbo pascal for math). Could you point me to a faq that could cover this ? Or suggest an environment for the command line. I will try to figure this out for myself but the curve right now is too steep. Daisy
__________________
Daisy D Fetherweight I compressed my programming to code.avi and now it looks real good. |
6th July 2004, 22:47 | #5 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
Just select "Run..." in your start menu, enter "cmd" and hit enter. There also should be a "Command Prompt" shortcut somewhere around the "Accessories" folder in your programs folder in the start menu. np: Wagon Christ - The Funnies (Sorry I Make You Lush) |
|
7th July 2004, 09:23 | #6 | Link |
Registered User
Join Date: Jun 2004
Posts: 10
|
That prompt, ah, I use it all the time.
Really I do... I feel manure-like for not having tried that. OK, so I just did it. F*********k, (pardon my french) that is some powerfull instruction. It's making my day as we speak. I'm looking at a whole directory full of .avs Thanks, D
__________________
Daisy D Fetherweight I compressed my programming to code.avi and now it looks real good. Last edited by sh0dan; 8th July 2004 at 09:58. |
8th July 2004, 10:02 | #7 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
Just beeeped out a little. No profanities here!
Anyway - I have made a webpage that allows you to generate a zip-file containing all the scripts you need. I wrote a bit about it here [avisynth.org]. It's quite simple - you insert the script in one box, and the filenames in the second, press "Generate" and download the Zip-file containing your avs files.
__________________
Regards, sh0dan // VoxPod |
8th July 2004, 15:23 | #9 | Link |
Dismembered
Join Date: Nov 2003
Location: Craggy Island
Posts: 873
|
What about avisynthesizer?
Basically you create one template, and then all you have to do is right click the file and send to asynther, and the script is created first link I found on google |
8th July 2004, 16:44 | #10 | Link |
Registered User
Join Date: Jun 2004
Posts: 10
|
Thanks for the help. I haven't tried avisynth yet but I will...
At the moment I wrote two template avs-scripts which I then apply on a directory with doIt. In the time of Dos (386-486) I was into Amiga so I lost out on that. I need to catch up D
__________________
Daisy D Fetherweight I compressed my programming to code.avi and now it looks real good. |
28th May 2006, 17:04 | #11 | Link |
Registered User
Join Date: May 2002
Location: France/Germany
Posts: 119
|
I ve first tried the script described above (for %x in (*.rm ...) in a batch file, but my cmd does not like it.
So I went to http://www.avisynth.org/BatchScripting And then, it works. Thanks sh0dan. Last edited by Eric B; 28th May 2006 at 17:11. |
28th May 2006, 19:44 | #12 | Link | |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Quote:
If you tried it in a .bat/.cmd file, you need to replace %x with %%x . |
|
1st June 2006, 18:55 | #13 | Link |
Registered User
Join Date: May 2002
Location: France/Germany
Posts: 119
|
Oh, you answered. Great!
As I find the batch solution even easier, I ve tried again. First, with %%, it is already much better. But what I ve done is still not correct: my makeAvs.bat (WinXP) is Code:
for %%x in (*.mov) do ( echo.Import^("makeAvs_template.avs"^) echo.DoIt^("%%x"^) ) > "%%~nx.avs" Code:
function DoIt(string filename) { LoadPlugin("UnDot.dll") LoadPlugin("FluxSmooth.dll") DirectShowSource(filename , fps=30) ConvertToYV12() Undot() FluxSmoothST(7,7) return last } Code:
Import("makeAvs_template.avs") DoIt("P1030015.MOV") |
2nd June 2006, 07:34 | #14 | Link | ||
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Quote:
Quote:
|
||
19th July 2010, 21:35 | #15 | Link |
Registered User
Join Date: Nov 2008
Posts: 22
|
Does anyone know how to create .avs files from a directory listing using a template on Linux with or without wine. I've tried wine's cmd.exe with directions in #2 of this thread, but it doesn't like the syntax. I've tried searching for a batch script GUI but the only one that looks suitable needs gawd awful ActiveX to work and fails dismally on Linux.
|
Thread Tools | Search this Thread |
Display Modes | |
|
|