View Full Version : List of command-line and batch utilities for AVISynth (and a few discussions)
mg262
26th June 2005, 22:21
I collated this for my own purposes but it might prove useful to someone else...
http://forum.doom9.org/showthread.php?t=50060
http://forum.doom9.org/showthread.php?t=70882 (AVS2WAV)
http://forum.doom9.org/showthread.php?t=71493 (AVS2AVI)
http://forum.doom9.org/showthread.php?t=73709
http://forum.doom9.org/showthread.php?t=74899 (avsutil - commandline player w/o video output - link broken?)
http://forum.doom9.org/showthread.php?t=75610 (Adding lines to many .AVSs)
http://forum.doom9.org/showthread.php?t=79259 (notes on command prompt)
http://jonny.leffe.dnsalias.com/ (Enc - encoder with commandline mode)
http://sourceforge.net/projects/avsbatches (Project: AVISynth BatchScripting)
http://tangentsoft.net/video/asynther/ (AVISynthesizer - build Avisynth scripts based on predefined templates)
http://www.avisynth.org/BatchScripting (Web-based batch .AVS generation)
http://www.blainehelmick.com/AVS2DVD/ (A batch file; references other useful commandline tools)
http://forum.doom9.org/showthread.php?t=98648 (ScriptWriter - batch script creation)
http://forum.doom9.org/showthread.php?t=98469 (xvid_encraw_avs)
http://forum.doom9.org/showthread.php?t=92120 (AVSAmp - calculate audio normalisation factor)
Avisynth Batch Scripter (by Steven van Cauter) (http://www.designfoto.nl/ABatchScript.htm): discussion (http://forum.doom9.org/showthread.php?t=113870).
Pookie
26th June 2005, 22:54
Thanks very much. I much prefer command line apps :)
stickboy
27th June 2005, 02:03
Here is yet another thread about generating multiple AVS files from a directory list:
http://forum.doom9.org/showthread.php?p=520674
Wilbert
27th June 2005, 09:36
Thx for the list! I will clean it up one day, and perhaps merge it into one of the other stickies.
mg262
29th June 2005, 12:37
:eek: I'm flattered but if I had thought it might become a sticky I would have taken a lot more care over it! Please do feel free to change/move it however you like. I don't want to fiddle with it now that it sticky, but there are couple of things worth noting:
- The one I unhhelpfully labelled "(notes on command prompt)" is the one @stickboy refers to, and it's about using the command prompt to generate multiple .AVSs.
- In thread number 73709 someone asks about batch encoding .AVS files to .MP2, but it's really a TMpgEnc answer rather than a AVISynth one, so I'm not sure how relevant it is to this list.
OTOH there are some batch/commandline operations that aren't to do with AVISynth but would be used repeatedly with it. I have just looked up/got to work the command line syntax for getting VirtualDub to run AVS->AVI. (It allows you to run a batch job with each instance loading a new copy of VirtualDub, which is useful for filters which don't like VirtualDub's own batch mode.) So I might dump something on that into a separate thread if it sounds useful...
makoto916
12th October 2005, 17:56
I've updated the batch page at http://www.blainehelmick.com/AVS2DVD/ to include the newst version 0.61 of QuENC and subsequently removed several apps that QuENC now replaces.
Yuri Khan
13th October 2005, 12:04
Why don’t you include the thread on xvid_encraw_avs (http://forum.doom9.org/showthread.php?t=98469)?
Moitah
30th October 2005, 13:17
How about AVSAmp (http://forum.doom9.org/showthread.php?t=92120)?
Fizick
29th November 2005, 22:58
Recently I found (rather old) AVS2AVI Wrapper v0.3, by HMage.
http://hmd.c58.ru/files.html
It creates fake avi like VFAPI, MakeAvis.
The name is the the same as AVS2AVI by Moitah, but it is other program
It is probably off-topic here, but where to i must post it?
mg262
2nd December 2005, 15:08
You could ask Wilbert to assimilate it into the appropriate FAQ?
Wilbert
2nd December 2005, 15:33
I will do that one day :)
tin3tin
8th April 2006, 12:22
Avi2swf.exe from SWFTools will convert avs files into flash swf files. Everything works well as long as the avs files are with out sound, but with sound it generates a working file(with sound), but produces an error in the end of the file and hangs. I dunno what is causing this?
Get avi2swf from here:www.swftools.org (http://www.swftools.org/about.html)
On avi2swf.exe: avi2swf (http://www.swftools.org/avi2swf.html)
AlanHK
18th January 2008, 18:52
WAVI - save WAV from AVI/AVS
http://sourceforge.net/projects/wavi-avi2wav
(Different from AVS2WAV)
I use a batch file with this to make AC3 at 128kb:
@echo avs2ac3 avsfile.avs
@echo audio from avs files and convert to AC3
@echo uses wavi and ffmpeg
@if %1X==X goto ALL
:LOOP
for %%I in (%1) do (
wavi %%I %%~nI.wav
p:\ffmpeggui\ffmpeg -i %%~nI.wav -ab 128 -ar 48000 -ac 2 -acodec ac3 -y %%~nI.ac3
del %%~nI.wav
)
SHIFT
@if %1X==X goto END
@goto LOOP
:ALL
for %%I in (*.avs) do (
wavi %%I %%~nI.wav
p:\ffmpeggui\ffmpeg -i %%~nI.wav -ab 128 -ar 48000 -ac 2 -acodec ac3 -y %%~nI.ac3
del %%~nI.wav
)
:END
Note the options for ffmpeg depend on which version you use.
The version I use came with ffmpeggui.
tebasuna51
19th January 2008, 04:25
WAVI - save WAV from AVI/AVS
...
I use a batch file with this to make AC3 at 128kb:
...
Note the options for ffmpeg depend on which version you use.
The version I use came with ffmpeggui.
You don't need intermediate wav files if you 'pipe' the wavi stdout to stdin aften encoder:
wavi x.avs - | aften - x.ac3
AlanHK
19th January 2008, 06:22
You don't need intermediate wav files if you 'pipe' the wavi stdout to stdin aften encoder:
wavi x.avs - | aften - x.ac3
Thanks, obviously much simpler.
I looked at the docs for ffmpeg and couldn't see if it accepted std input, though there probably is a way.
tebasuna51
19th January 2008, 14:10
Thanks, obviously much simpler.
I looked at the docs for ffmpeg and couldn't see if it accepted std input, though there probably is a way.
And fast, you don't need write to disk the big wav files.
To encode ac3 Aften (http://forum.doom9.org/showthread.php?p=847746#post847746), by Justin Ruggles (Justin also maintain the ac3 part in ffmpeg), is more optimized and versatile (accept many more parameters).
Also ffmpeg problems solved with Aften:
- The multichannel encode (5.1) is wrong mapped with ffmpeg.
- The 32-float samples (a common format after audio process with AviSynth) are not supported by ffmpeg.
There are also many ffmpeg versions with different behaviour about STDIN and input parameters (-ab 192 / -ab 192000).
yup
27th August 2008, 08:44
Hi all!
I have problem with wavi. My avi file is analog capture in VirtualDub 1.8.1 video huffyuv, audio PCM 48 kHz. I get error
F:\Video\Jakob>wavi film.avi film.wav
Found PCM audio: 2 channels, 48000 Hz, 16 bits, 5343.840000 seconds.
Writing WAV file "film.wav"...
Error: Could not read audio data from "film.avi".
In VirtualDub I can save wav file without problem.
Please advice.
yup.
AlanHK
27th August 2008, 09:38
I have problem with wavi. My avi file is analog capture in VirtualDub 1.8.1 video huffyuv, audio PCM 48 kHz. I get error
Wavi only understands simple wave audio.
Most AVIs have some kind of compressed audio.
Normally use WAVI on an AVS script, then Avisynth will convert to wave audio which wavi can output or stream.
Assuming you have Avisynth installed,
Make an AVS, eg film.avs, in the same folder as film.avi, with one line:
AVISource("film.avi")
then run:
wavi film.avs film.wav
yup
29th August 2008, 08:02
AlanHK!
:thanks:
If using avs scrip all work fine.
yup.
nicoDid
16th September 2008, 20:59
Recently I found (rather old) AVS2AVI Wrapper v0.3, by HMage.
http://hmd.c58.ru/files.html
It creates fake avi like VFAPI, MakeAvis.
The name is the the same as AVS2AVI by Moitah, but it is other program
It is probably off-topic here, but where to i must post it?
Hi everybody, I'm new to this board.
I see the avs2avi wrapper has been mentioned in this thread, could anybody here please suggest how to modify the installation procedure (maybe the .inf) in order to have the codec successfully registered in Win x64 (XP or Vista)?
I found on the web quite simple instructions for installing VFAPI in Win x64 and they worked just fine.
I tried doing something similar for the avs2avi wrapper with no success (ok the contextual menu and wrapper avi generation, but apparently the codec doesn't get registered so no decompressor appears to be available).
Thanks a lot for any advice.
nicoDid
26th September 2008, 04:44
No suggestions, ok, staying with VFAPI (also trying makeAvis but it seems as I'm hitting limits - on this installation/OS at least - which VFAPI doesn't have).
I'm making tests (and will search and possibly start a thread) on a workflow like this:
preprocessingFrameserving-NLE/compositing-postprocessingFrameserving-compression and use of NVidia hardware mpeg2 compression.
mk123
10th January 2009, 09:12
Well , I think that Teriffic tool, like Asynther with many more options. Also, it's not just for Avisynth scripts. I use it for batch scripting with FFMpeg and a few other CLI tools. Saves me a lot of cutting and pasteing. A few minor "gotchas" (minimal editing features, besides the intellisence, and a little cumbersome to find the "scan" folders) but overall I find it very useful.;)
Zortag
27th February 2009, 22:21
Is there a command-line tool for getting information from an AVS file. Currently, the only way I know of is to open the AVS file in Virtual Dub, choose "File Information" and write it down. What I am looking for is something like:
avs_info -duration source.avs To get the length in time
avs_info -width -height source.avs To get the width and height of the frame
etc.
AlanHK
28th February 2009, 06:08
Is there a command-line tool for getting information from an AVS file. Currently, the only way I know of is to open the AVS file in Virtual Dub, choose "File Information" and write it down. What I am looking for is something like:
avs_info -duration source.avs To get the length in time
avs_info -width -height source.avs To get the width and height of the frame
etc.
You could write Avisynth functions.
Look at:
http://avisynth.org/mediawiki/Clip_properties
http://avisynth.org/mediawiki/WriteFile
http://avisynth.org/mediawiki/ConditionalFilter
http://avisynth.org/mediawiki/Import
e.g.
Import("MYAVS.avs")
filename = "info.txt"
WriteFile(filename, """ "Width: " """, "width")
WriteFile(filename, """ "Frames: " """, "FrameCount")
You could execute this in a batch file using say Vdub. It would create a textfile with the info.
Gavino
1st March 2009, 13:26
Import("MYAVS.avs")
filename = "info.txt"
WriteFile(filename, """ "Width: " """, "width")
WriteFile(filename, """ "Frames: " """, "FrameCount")
You don't want to use WriteFile here, as it will repeat the information for every frame.
Use WriteFileStart instead, as the data you want are video, not frame, properties.
To get video duration, use
WriteFileStart(filename, """ "Duration (secs): " """, "FrameCount/FrameRate")
AlanHK
1st March 2009, 17:59
You don't want to use WriteFile here, as it will repeat the information for every frame.
I tested it in VDub, which just sits at frame zero if you don't press "play". So it worked in that case. But in general, you're right.
Zortag
3rd March 2009, 20:00
Gavino, AlanHK, thanks. I had known about the "WriteFileStart" command but had not really played around with it, as I had thought that once I had opened VDub, I would then have to manually close it up again. Basically, I've got a bunch of AVS files in a directory and would like to get general video information from them. But I did find that if get_info.avs is ...
Import("source.AVS")
filename = "info.txt"
WriteFileStart(filename, """ "Duration (secs): " """, "FrameCount/FrameRate")
then
VirtualDub /x get_info.avs
will, indeed, open VDub for just a moment before closing down automatically, and the info.txt file is created. Leaving merely the issue of generating a batch procedure "bundle" the various "source.AVS" files.
I thank you for the help, it has gotten me a lot farther down the road toward what I would realy like to see, which would be a command-line utility that writes to STDOUT, so that it's output could be redirected.
yup
2nd December 2009, 07:05
Hi folk!
Who try this:
http://avs2raw.com/
yup.
buzzqw
2nd December 2009, 10:29
Hi folk!
Who try this:
http://avs2raw.com/
yup.
not freeware
and the same result could be get with avisynth_mt + avs2yuv
BHH
AlanHK
11th January 2010, 07:39
Apply Replaygain to AVS
A batch script using Wavi (http://sourceforge.net/projects/wavi-avi2wav/) and a modified version of Wavegain (http://audio.ernstmathys.ch/wordpress/wp-content/uploads/2010/01/wavegain.zip) to apply Replaygain to an AVS file, by adding an AmplifydB line:
@echo off
::AVSGain: apply Replaygain to AVS files
if %1X==X goto ALL
:LOOP
for %%I in (%1) do (
echo Applying replaygain to %%I
echo.>>%%~fsI
wavi %%I - | wavegain2 - -e echo AmplifydB^(%%TRACK_GAIN%%^) ^>^> %%~fsI
)
SHIFT
@if %1X==X goto END
@goto LOOP
:ALL
for /f "delims=" %%I in ('dir *.avs /b') do (
echo Applying replaygain to %%I
echo.>>%%~fsI
wavi %%I - | wavegain2 - -e echo AmplifydB^(%%TRACK_GAIN%%^) ^>^> %%~fsI
)
:END
This pipes the audio output (must be one or two channel) from an AVS file through Wavegain, which calculates the Replaygain, and this adjustment is then pasted onto the end of the AVS file.
The original version of Wavegain doesn't work properly with piped input, the modded version fixes this.
Wavegain and Wavi must be in the search path, or give the full path to each executable.
I don't use spaces in my filenames, you may need to wrap the filenames in quotes if you do.
Instructor
18th April 2013, 17:16
BatchWizardMod - application that generate a special template from a VirtualDub/AviSynth script
file and apply this template for any number of specified files.
For VirtualDub - creates one script that process all specified files.
For AviSynth - creates .avs for each specified file.
BatchWizardMod (http://forum.doom9.org/showthread.php?t=167619)
gmag11
15th December 2014, 09:45
http://www.turtlewar.org/avfs/
Nice tool that allows mount a virtual folder with uncompressed avi and wav files that resul from avs file interpretation.
StainlessS
15th December 2014, 22:03
Avisynthesizer_MOD batch creator: http://forum.doom9.org/showthread.php?t=166820
A SendTo App that allows Windows Explorer selection of video files and fills in a user supplied Template with the filenames.
Can concatenate (join/splice) selected files (default as original non mod version) and create a single output AVS file OR,
batch create multiple AVS files, one for each input source file (MOD version only).
Has a GUI to select required template and sort input files if multiple input files selected.
Dont miss the above previous post "AVFS and Pismo file mount" also posted today.
AVISYNTH-BATCH.zip (required FFmpeg) at https://www.mediafire.com/folder/wrpd1f5ayoavb/SHARED . Edit TEMPLATE-1.txt and TEMPLATE-2.txt, drag and drop mediafile or folder on "generate-avs-encode-drag-and-drop.bat" script and encoding will start.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.