VapourSynth installation on Debian or Mint systems

22:12:00 , 0 Comments

Picture from Bart Everson New Orleans, Louisiana, USA

VapurSynth is an application for video manipulation and an excellent alternative to avisynth for many reasons:
  • Works on linux natively, the core is written in C ++ and modules use Python.
  • Multithreaded ,avisynth needs third-party software to run in multithreaded mode.
  • Compatible with a large number of Avisynth plugins
  • Additional metadata can be attached to frames
  • An optional graphical editor in QT5 is avaliable, to create scripts, making crops , etc ...


First time, we are going to install all required dependencies :

apt-get install build-essential yasm git libavcodec-dev libswscale-dev libass-dev python3-pip python3-dev cython dh-autoreconf autotools-dev

Then we are ready to clone into the git with the latest source code:

git clone
A new directory called vapoursynth will be created with a recent copy of the repository inside, enter the directory to prepare the sources and compile:

cd vapoursynth
./configure --disable-ocr
make install
*Note I removed OCR support because is not needed. If you need it, first install this dependencies:

apt-get install libtesseract-dev tesseract-ocr 
Now vapoursynth is installed in our system and ready to use if you changed defaults install path.


Run this command line:

$ vspipe -v

If it doesn't work, sure you need to edit the user path:

If it show: "library missing or not found" put this couple of lines in a terminal like user:

If it show:
Failed to initialize VapourSynth environment

We can fix it adding a couple more of lines:

To avoid writing this, each time we launch vspipe, we need to editing .bashrc .It is located in our user $home

*Note the point before the name, tell us the file is hidding.

As user:

it take us to our $home
then we can use nano as our terminal editor:

nano -w .bashrc
add the following to it:

also we can use "echo" or a graphical editor like gedit.
Once made these changes will see that the output has changed:

$ vspipe -v
VapourSynth Video Processing Library
Copyright (c) 2012-2014 Fredrik Mellbin
Core R26
API R3.1
It works !!!

Making our first script:

We are ready to write our first script and then encode it with x264


vspipe --y4m script.vpy - | x264 --demuxer y4m - --output encoded.mkv
If x264 is not already installed put this in a terminal:

apt-get install x264
Scripts has vpy extension, an example as could be:

import vapoursynth as vs
core = vs.get_core()
ret = core.ffms2.Source(source='/ruta/archivo/prueba.mkv')
ret = core.std.CropRel(clip = ret, left=0, right=0, top=20, bottom=20)
ret = core.std.AssumeFPS(clip=ret, fpsnum=24000, fpsden=1001)

*Line 3 is needed to create a index, we indicate the library path in our system. Rest is very similar to Avisynth, and easy to understand.

0 comentarios: