User Tools

Site Tools


using:avsproxy

AvsProxy

Avisynth?

Avisynth is a powerful scripting language with plenty of plugins. The sad thing is that it is only available on Windows. Avisynth(nbsp)3 will work on both Windows and Linux but is still very young. More info at avisynth2.sf.net.

AvsProxy?

AvsProxy is a small executable meant to be run on Windows or under Wine. It is to be compiled with Microsoft Visual C++ tools as Avisynth is C++. GNU(nbsp)C++ does not like VC++ at all. The good news is that Microsoft has a free version of VC++ called Visual Studio Express.

AvsProxy, as the name says, is a proxy between Avisynth and Avidemux. It will ask Avisynth frames and make them available on a socket interface so that Avidemux can read them.

The syntax is simply

avsproxy foo.avs

or

wine avsproxy.exe foo.avs (if you are running Wine)

Note:

  • It works as well under 32 bits or 64 bits Linux, with 32 bits or 64 bits Avidemux, SMP or not.
  • If you have error starting AvsProxy, it means either your Avisynth or Avisynth-under-Wine installation is incomplete.

Avidemux + AvsProxy

Once you have started AvsProxy, it is waiting on its socket to receive commands. Now we have to make Avidemux aware that it must read over that socket. To do so, we will create a fake video file that must contain the following:

ADAP
lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf
lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf
lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf
lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf
lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf
lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf
lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf

Only the ADAP is important. The remaining text is just filler so that the file is not absurdly small. When reading such a file, Avidemux will try to contact AvsProxy over the socket.

Example output

fx@dave64 /tmp $ wine avsproxy.exe 2mn.avs
AvsSocket Proxy, derivated from avs2yuv by  Loren Merritt
Loading Avisynth.dll
Avisynth.dll loaded
Env created
Importing..
23976023 / 1000000
Info
Width   :512
Height  :384
Fps1K   :23977
NbFrame :4592
Initializing WinSock
WinSock ok
Socket bound to port 9999
Waiting for client to connect...

Now avidemux connects after reading the fake file…

Client connected.
Received get info...
Get frame 0 (old:4294901760)

This example is done on a 64 bits SMP system, and it works without problem.

Credits

AvsProxy is a derivative of avs2yuv by Loren Merritt.

See also

Avisynth Proxy GUI for Windows(nbsp)(ndash) a graphical user interface for AvsProxy written by LoRd_MuldeR

using/avsproxy.txt · Last modified: 2012/11/11 08:51 (external edit)