PDA

View Full Version : How can I run an avs from command line without doing anything?


mitsubishi
29th July 2007, 22:25
Just run from start to finish, selecting frames, but without an output.

Maybe even returning fps as an added bonus.

tebasuna51
29th July 2007, 22:43
I'm not sure if this can help you, but I use this:

avs2avi one.avs -c null -q -e

to execute only the SoundOut plugin without other output.

The line help from avs2avi is:

AVS2AVI v1.39x (c) 2002-2004:
Christophe Paris, David Leatherdale, int21h, Moitah
http://www.avs2avi.org/

Usage: avs2avi avs_filename [destination_filename] [switches]

destination_filename is relative to avs_filename, if omitted it will be
the same as avs_filename but with the proper extension.

Switches:
-w : Overwrite destination file if it already exists
-P <passes> : Enable multi-pass encoding mode
-p [0-2] : Priority (0: Idle, 1: Normal, 2: Above Normal)
-s <file> : Save codec parameters to <file>
-l <file> : Load codec parameters from <file>
-c <4cc> : Use codec <4cc> with default settings ("null" for no
recompression)
-e : Exit after codec selection (for use with -s)
-q : Enable quiet mode for more speed
-o [format] : Output format (a: AVI (default), l: Log, n: Null)
-x [a,l] : Wait until XviD status window is closed (a: for all passes,
l: only for the last pass)

mitsubishi
29th July 2007, 22:57
Thanks for the answer, I'll see if that's any better, I do need to run through the video though.

I realised I can do this:

script.vcf:
VirtualDub.Open("Z:\\New Folder (2)\\no.avs","",0);
VirtualDub.RunNullVideoPass();

Then "Vdub /s script.vcf /x"

Although that doesn't output fps, but that not too important.


Edit: Yeah using the avs2avi method doesn't run through the video. Right now I'm just wanting to use the avisynth SSIM filter.

squid_80
30th July 2007, 06:59
Search for avsutil. The latest version spits out the total time in ms to play the script and the number of frames - easy enough to use some shell commands to calculate fps.

mitsubishi
30th July 2007, 19:54
Found avsutil in the avs2qxvid pack, but no documentation.

Both
avsutil no.avs
and
avsutil no.avs -play
return number of frames, but don't step through video or return time.

squid_80
31st July 2007, 00:05
avsutil no.avs -playavsutil no.avs play

No hyphen needed.

mitsubishi
31st July 2007, 01:03
Thanks, that's done it. And I found a newer version that does output time.

smok3
22nd July 2008, 12:55
squid_80: is your compile still available someplace?

edit: nm, found it.

squid_80
22nd July 2008, 18:25
http://members.optusnet.com.au/squid_80/avsutil.zip

That's the current build that I use. I think I modified it to report script errors properly.

smok3
22nd July 2008, 18:29
tnx, any clues under what license that is?
( related http://forum.doom9.org/showthread.php?p=1161653#post1161653 )

squid_80
22nd July 2008, 18:57
I just uploaded the latest source code to match (http://members.optusnet.com.au/squid_80/sources/avsutil_src.zip).

I think the code is simple enough to fall under public domain however the avisynth error checking may mean it has to be GPL. It doesn't rely on avisynth to run (it still works with plain avi files, although it doesn't decompress) so it's not a derived work, but it doesn't communicate with avisynth solely with the interfaces defined in avisynth.h and hence doesn't seem to fit the allowed exceptional case.
Either way, personally I don't care how it is used.

smok3
22nd July 2008, 22:40
ok, so if this was part of the avisynth installer (the part that says 'standalone') we are ok with the license? (even if that means it has to turn into GPL?)

squid_80
23rd July 2008, 06:10
Sure.

florinandrei
23rd July 2008, 07:17
avs2avi one.avs -c null -q -e

to execute only the SoundOut plugin without other output.

Very similar solution to the same problem:

avs2yuv -frames 1 sd-audio.avs -o NUL

Whereby sd-audio.avs is:

DirectShowSource("sd.avi")
SoundOut(output="ac3", filename="sd.ac3", cbrrate=192, acmod=2, autoclose=true, wait=0, overwritefile="Yes", silentblock=false)

tacman1123
28th July 2008, 01:57
I usually use HCEncoder for invoking SoundOut (or anything along those lines, something that processes a/v but doesn't create it), but only because that's the one I saw used in a sample script showing how to do it.

Question: If doesn't need the output of a script, what considerations are the for the "best" on to use? Are they all equally as fast? Roughly the same resources?

I'm guessing the biggest consideration would be that the final output could be directed to null (so there's not wasted disk wriging), are there any other considerations?

Tac

Ranguvar
28th July 2008, 02:01
I usually use HCEncoder for invoking SoundOut (or anything along those lines, something that processes a/v but doesn't create it), but only because that's the one I saw used in a sample script showing how to do it.

Question: If doesn't need the output of a script, what considerations are the for the "best" on to use? Are they all equally as fast? Roughly the same resources?

I'm guessing the biggest consideration would be that the final output could be directed to null (so there's not wasted disk wriging), are there any other considerations?

Tac
Whatever uses the least RAM idling. VirtualDub... MPC-HC... AvsP... etc.