User Tools

Site Tools


using:avsproxy

This is an old revision of the document!


Avisynth ?

avisynth is a powerful scripting language with plenty of plugins. The sad thing is that it is only available on windows. Avisynth3 will work on both windows and linux but is still very young. More infos here 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 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.

Only video is processed, there will be no audio whatever you do.

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 containe the following

<code> ADAP lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf lkmlfdkmdlkdmlkdmflfkmkfmfdlkmflkfdmldkf <\/code>

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

<code> 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… <\/code> Now avidemux connects after reading the fake file … <code> Client connected. Received get info… Get frame 0 (old:4294901760) <\/code>

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

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