PDA

View Full Version : VapourSynth Histogram


WorBry
1st February 2016, 20:32
I've been running Kubuntu 15.10 (AMD 64) for a couple of weeks now. I'd like to be able to examine the YUV Histograms of video files as per the "Levels" and "Classic" (luma WFM) modes in AVISynth's Histogram filter. In theory I could do that with AVISynth/VirtualDub in Wine, but I just can't get it to work properly. The problem seems to be with VirtualDub. Files and scripts open to the first frame but then freeze or corrupt on seeking.

I've never used VapourSynth before but seeing that it has its own port of Histogram, I wondering if it might offer an alternative.

My question is (don't slap me if it's silly)- how does one preview VapourSynth outputs in Linux? If via VirtualDub in Wine, I'm back to square one.

Or is there another tool in Linux that can provide equivalent information? My main interest is in determining the effective luma ranges of the video files and distinguishing clamped from compressed luma values when the ranges are restricted.

Tormaid
1st February 2016, 20:35
Check out the Vapoursynth Editor: https://bitbucket.org/mystery_keeper/vapoursynth-editor

WorBry
1st February 2016, 20:49
Great, thanks. I'll have a look at that.

jackoneill
1st February 2016, 21:03
You can also pipe vspipe to mpv:

$ cat script.py
import vapoursynth as vs
c = vs.get_core()
clip = c.ffms2.Source("video.mov")
c.hist.Classic(clip).set_output()

$ vspipe script.py - --y4m | mpv --cache=no -

Or, if your copy of mpv has vf_vapoursynth, you can play the video directly with mpv and make it put your video through a VapourSynth script:

$ cat otherscript.py
import vapoursynth as vs
c = vs.get_core()
c.hist.Classic(video_in).set_output()

$ mpv video.mov --vf=vapoursynth=otherscript.py

WorBry
1st February 2016, 21:55
Thanks also. All new to me but I'll give it a go.

WorBry
2nd February 2016, 07:10
Hi again,

I've been trying to install Vapoursynth on Kubuntu 15.10 (AMD 64) following the instructions on the VapourSynth webpage:

http://www.vapoursynth.com/doc/installation.html

The first set of required packages installed OK:

apt-get install build-essential yasm git libass-dev python3-pip python3-dev cython3 autoconf libtool libmagick++-dev

but I've hit a problem installing zimg. Followed the link to download the source code from here:

https://github.com/sekrit-twc/zimg/releases/tag/release-2.0.2

Extracted the zimg-release-2.0.2.zip file and ran the command:

./autogen.sh
./configure --enable-x86simd
make
make install

But received error at the Install step. Tried changing the name of the folder from zimg-release-2.0.2 to just zimg (purely out of desperation) and tried again, with the same error:

bryan@bryans-kubuntu:~$ cd /home/bryan/zimg
bryan@bryans-kubuntu:~/zimg$ ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: subdirectory test/extra/googletest/googletest not present
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
bryan@bryans-kubuntu:~/zimg$ ./configure --enable-x86simd
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if compiler needs -Werror to reject unknown flags... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating zimg.pc
config.status: executing depfiles commands
config.status: executing libtool commands
bryan@bryans-kubuntu:~/zimg$ make
make[1]: Entering directory '/home/bryan/zimg'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/bryan/zimg'
bryan@bryans-kubuntu:~/zimg$ make install
make[1]: Entering directory '/home/bryan/zimg'
make[2]: Entering directory '/home/bryan/zimg'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libzimg.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libzimg.so.2.0.0 /usr/local/lib/libzimg.so.2.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libzimg.so.2.0.0': Permission denied
Makefile:1074: recipe for target 'install-libLTLIBRARIES' failed
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory '/home/bryan/zimg'
Makefile:2990: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/bryan/zimg'
Makefile:2525: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
bryan@bryans-kubuntu:~/zimg$




What to do ?

sl1pkn07
2nd February 2016, 10:23
sudo make install

this install in /usr/local. if you want install in /usr, then add --prefix='/usr' in the configure step

WorBry
2nd February 2016, 14:52
Thanks, but I still get exactly the same series of errors as before .

sl1pkn07
2nd February 2016, 14:58
with sudo make install?

WorBry
2nd February 2016, 15:36
Yes with Sudo, but......I tried again taking the source code from here:

https://github.com/sekrit-twc/zimg/releases

instead of here:

https://github.com/sekrit-twc/zimg/releases/tag/release-2.0.2

and this time the zimg install completed. Went on to install Vapoursynth, which completed, but now when I run the test command:

import vapoursynth as vs
c = vs.get_core()
print(c.version())

it just freezes on the first line and if I try to 'nudge' it along, I get this:

bryan@bryans-kubuntu:~$ import vapoursynth as vs
bryan@bryans-kubuntu:~$ c = vs.get_core()
bash: syntax error near unexpected token `('
bryan@bryans-kubuntu:~$ print(c.version())
bash: syntax error near unexpected token `c.version'
bryan@bryans-kubuntu:~$

sl1pkn07
2nd February 2016, 15:39
you need use python instead bash

first run python, then type the code in the python shell


└───╼ python
Python 3.5.1 (default, Dec 7 2015, 12:58:09)
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vapoursynth as vs
>>> c = vs.get_core()
>>> print(c.version())
VapourSynth Video Processing Library
Copyright (c) 2012-2016 Fredrik Mellbin
Core R31
API R3.4
Options: Extra Assertions

>>>

WorBry
2nd February 2016, 16:07
Tried that, but now I get this:

bryan@bryans-kubuntu:~$ python
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import vapoursynth as vs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named vapoursynth
>>> c = vs.get_core()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'vs' is not defined
>>> print(c.version())

Aurelio
2nd February 2016, 16:12
I think you need Python 3.5.x and you have Python 2.7.10.

TheFluff
2nd February 2016, 16:18
You probably already have python3. Try python3
at the console instead of just "python". If that doesn't work,
apt-get install python3

WorBry
2nd February 2016, 16:43
Thanks. Before you posted, I went ahead and installed Python 3.5 from Synaptic. Ran the test code again, and am now getting:

bryan@bryans-kubuntu:~$ python3.5
Python 3.5.0+ (default, Oct 11 2015, 09:05:38)
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vapoursynth as vs
>>> c = vs.get_core()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'vapoursynth' has no attribute 'get_core'
>>> print(c.version())


Does this mean I need to start over with the VapourSynth, and possibly Zimg, build and installation ?

Sorry to be so tedious about this. I've never done any Python stuff before and, for now at least, I just want to get a Histogram script working.

jackoneill
2nd February 2016, 16:53
You don't need Python 3.5 specifically. Remove that and run python3. If you compiled VapourSynth, that means you already had a Python 3 installed. If it still says "module 'vapoursynth' has no attribute 'get_core'" then rename that folder called "vapoursynth" in the current directory, or change to some other directory before running python3.

WorBry
2nd February 2016, 17:28
Thanks. Running python3, yes, I still get that "module 'vapoursynth' has no attribute 'get_core'" . So which "vapoursynth " folder should I try changing the name of - the one in the Home directory where the git was extracted to built/installed from, or one of the various vapoursynth folders in root?
Again, sorry to be so tedious.

jackoneill
2nd February 2016, 17:38
Probably the one in your home.

WorBry
2nd February 2016, 19:01
Tying myself in knots here (is that why it's called Python ?).

Tried just renaming the vapoursynth folder (in Home) to vapoursynth1.

Running the test code (with vapoursynth changed to vapoursynth1), I'm getting the same message:

bryan@bryans-kubuntu:~$ python3
Python 3.4.3+ (default, Oct 14 2015, 16:03:50)
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import vapoursynth1 as vs
>>> c = vs.get_core()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'get_core'


and if I use the "original" test code:

bryan@bryans-kubuntu:~$ python3
Python 3.4.3+ (default, Oct 14 2015, 16:03:50)
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vapoursynth as vs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'vapoursynth'
>>> c = vs.get_core()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'vs' is not defined
>>> print(c.version())


Feeling really dumb. :(

jackoneill
2nd February 2016, 19:27
By default VapourSynth gets installed to /usr/local, so it's a bit more work:

PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib python3

Do the same when you want to run vspipe.

WorBry
2nd February 2016, 20:03
Yep, that sorted it - I'm in. :)

Thanks everyone above, for all of your assistance.

WorBry
3rd February 2016, 16:00
Didn't really want to bug you guys with more newbie 'lead me by the hand' questions and to try and figure out the rest myself. Whilst searching for information on how to install needed plugins (ffms2, Histogram) and also the mpv version with vapoursynth support, I came across this ppa:

https://launchpad.net/~djcj/+archive/ubuntu/vapoursynth

Wish I'd seen that before. Anyhow I added the ppa to software sources and installed the packages. So I've now got a basic script for the Histogram:

PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib python3
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin("/usr/lib/x86_64-linux-gnu/vapoursynth/libffms2.so")
core.std.LoadPlugin("/usr/lib/x86_64-linux-gnu/vapoursynth/libhistogram.so")
clip = core.ffms2.Source("/home/bryan/Videos/Test.mov")
core.hist.Classic(clip).set_output()

I know it's possible to set-up up the plugins to autoload, but this will do for now.

What I can't quite figure out though is how to create a script file (say Histogram.py), saved to /home/bryan/Videos or whatever, that I can load with any video file, to open in mpv.

And then, I'm not sure if the feed to mpv would be:

mpv /home/bryan/Videos/Test.mov --vf=vapoursynth=/home/bryan/Videos/Histogram.py

or
mpv --vf=vapoursynth=/home/bryan/Videos/Histogram.py /home/bryan/Videos/Test.mov

Or are they just the same thing. Basic stuff, I know - just cant figure it.

Thanks.

jackoneill
3rd February 2016, 18:09
I refer you to post #4 in this thread: http://forum.doom9.org/showthread.php?p=1755670#post1755670
You need only add the LoadPlugin lines to otherscript.py. Although I wonder why those plugins weren't autoloaded, given their location.

I think in this case mpv will not care if the file name comes before or after --vf. Read the manual to see if it ever cares.

Are_
3rd February 2016, 18:14
If your want to use vapoursynth as a post-processor for your videos while you watch them, some reading:
https://mpv.io/manual/master/#video-filters-vapoursynth
Some example:
https://gist.github.com/ChrisK2/10606922#example
And some more of them:
https://github.com/mpv-player/mpv/wiki/Fixing-Simulcasts

If you just want to preview a script in mpv:
You can also pipe vspipe to mpv:
$ vspipe script.py - --y4m | mpv --cache=no -

But this is basically what jackoneill told you in http://forum.doom9.org/showthread.php?p=1755670#post1755670
Please, don't blindly discard the advice people gives you.

WorBry
3rd February 2016, 19:05
Well thank you very much for the information, but there's really no call for that sort of remark:


Please, don't blindly discard the advice people gives you.

I have not at all discarded jackoneill's advice. I'd been struggling for a good while to get those two examples he gave to work - where to put that Python3 path, the syntax hiccups etc. Clearly I'm having difficulty with the basics.

Taking those two examples at face value (I'm running it on Mint 17.3 just now, because of some Dolphin freeze-ups I was getting on Kubuntu):

bryan@bryans-mint:~ > PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> $ cat otherscript.py
File "<stdin>", line 1
$ cat otherscript.py
^
SyntaxError: invalid syntax
>>> import vapoursynth as vs
>>> c = vs.get_core()
>>> c.hist.Classic(video_in).set_output()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "vapoursynth.pyx", line 1103, in vapoursynth.Core.__getattr__ (src/cython/vapoursynth.c:18288)
AttributeError: No attribute with the name hist exists. Did you mistype a plugin namespace?
>>>
>>> $ mpv /home/bryan/Videos/DSCN0968.MOV --vf=vapoursynth=otherscript.py


and

bryan@bryans-mint:~ > PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> $ cat script.py
File "<stdin>", line 1
$ cat script.py
^
SyntaxError: invalid syntax
>>> import vapoursynth as vs
>>> c = vs.get_core()
>>> clip = c.ffms2.Source("/home/bryan/Videos/DSCN0968.MOV")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "vapoursynth.pyx", line 1103, in vapoursynth.Core.__getattr__ (src/cython/vapoursynth.c:18288)
AttributeError: No attribute with the name ffms2 exists. Did you mistype a plugin namespace?
>>> c.hist.Classic(clip).set_output()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "vapoursynth.pyx", line 1103, in vapoursynth.Core.__getattr__ (src/cython/vapoursynth.c:18288)
AttributeError: No attribute with the name hist exists. Did you mistype a plugin namespace?
>>>
>>> $ vspipe script.py - --y4m | mpv --cache=no -


And many more permutations of the same, trying to figure out what does what. "Well of course it doesn't work - doesnt he even know that" etc. No I don't. I'm new to Linux and have never used VapourSynth before.
And I made that quite clear from the outset. That's why I ended up trying to muddle through with this other approach taking what bits of information I could find.

All of this stuff may be easy-peasy for those who have been doing it for a while and programmers to whom all of this coding language comes easily.
But for someone just starting out it's very daunting. Even the basic Python tutorial there on the VapourSynth webpage is difficult for someone without basic
experience in computing language.

I'm just trying to get this particular script to work and then I'll come back and try and educate myself more fully. Again, thank you for the links, but please, spare the aloof patronizing. Not appreciated.

sl1pkn07
3rd February 2016, 19:08
python =/= bash

probably you install ffms2 in other path

i'm not sure how is build vapoursynth/plugins in that ubuntu ppa, but problably is installed on /usr instead of /usr/local

jackoneill
3rd February 2016, 20:35
Oh, you don't know cat. cat is a program that will output the contents of a file. Also, $ signifies a shell (bash/zsh) prompt where you're logged in as a regular user (as opposed to # which signifies you're logged in as root).

WorBry
3rd February 2016, 20:41
Quite possibly ?? And that's something that I intend to go back and look at. In fact, for various reasons, I'm thinking to do a clean install of Kubuntu and start over. I suspect that freeze-ups that started yesterday were as a result of my messing around with Python, and again I don't have the experience to get the root of that.

But for now, does it matter that I'm pulling the plugins from another directory? The basic script works, it's just how to apply it that I'm having difficulty with. Once that's sorted I can go back and set things up properly, with hindsight.

WorBry
3rd February 2016, 20:55
Oh, you don't know cat. cat is a program that will output the contents of a file. Also, $ signifies a shell (bash/zsh) prompt where you're logged in as a regular user (as opposed to # which signifies you're logged in as root).

No, I'm afraid I don't. But I will endeavour to educate myself on these things.

But for now could you possibly advise me how I could craft that "pulled together" script I posted above to work in the way the those two examples you gave before are intended to. Like I said, I'd really like to be able to create a script file in the Home directory that I can pull up. If that's what the examples you gave do, I don't get it and I'm clearly doing something wrong.

PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib python3
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin("/usr/lib/x86_64-linux-gnu/vapoursynth/libffms2.so")
core.std.LoadPlugin("/usr/lib/x86_64-linux-gnu/vapoursynth/libhistogram.so")
clip = core.ffms2.Source("/home/bryan/Videos/Test.mov")
core.hist.Classic(clip).set_output()

I'd stand a better chance of understanding these things having seen how it works.

Thanks.

YamashitaRen
3rd February 2016, 23:04
To be honest, I don't think that you want to use python3 interpreter.

Usually :
1) You create a script in a text editor (using vsedit is a must)
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin("/usr/lib/x86_64-linux-gnu/vapoursynth/libffms2.so")
core.std.LoadPlugin("/usr/lib/x86_64-linux-gnu/vapoursynth/libhistogram.so")
clip = core.ffms2.Source("/home/bryan/Videos/Test.mov")
core.hist.Classic(clip).set_output()

2) You use the script with vspipe ;
$ vspipe script.py - --y4m | mpv --cache=no -

Don't forget that you may have to add "PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib" before every varpousynth-related command :
$ PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib vsedit
$ PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib vspipe blablablablabla

Or even better, you can export the environment variables and forget about them:
$ export PYTHONPATH=/usr/local/lib/python3.4/site-packages
$ export LD_LIBRARY_PATH=/usr/local/lib
$ vsedit

sl1pkn07
3rd February 2016, 23:55
this happen because install the plugins in /usr/local instead of /usr (?)

WorBry
4th February 2016, 01:10
To be honest, I don't think that you want to use python3 interpreter.

Usually :
1) You create a script in a text editor (using vsedit is a must)
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin("/usr/lib/x86_64-linux-gnu/vapoursynth/libffms2.so")
core.std.LoadPlugin("/usr/lib/x86_64-linux-gnu/vapoursynth/libhistogram.so")
clip = core.ffms2.Source("/home/bryan/Videos/Test.mov")
core.hist.Classic(clip).set_output()

2) You use the script with vspipe ;
$ vspipe script.py - --y4m | mpv --cache=no -

Don't forget that you may have to add "PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib" before every varpousynth-related command :
$ PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib vsedit
$ PYTHONPATH=/usr/local/lib/python3.4/site-packages LD_LIBRARY_PATH=/usr/local/lib vspipe blablablablabla

Or even better, you can export the environment variables and forget about them:
$ export PYTHONPATH=/usr/local/lib/python3.4/site-packages
$ export LD_LIBRARY_PATH=/usr/local/lib
$ vsedit

Thank-you so much for that. Was up and running within 5 minutes. And thanks jackoneill for your advices; sorry I didn't quite grasp the coding side of things but it's a lot clearer now.

WorBry
4th February 2016, 01:14
this happen because install the plugins in /usr/local instead of /usr (?)

Thanks, I'll bear that in mind when I do a fresh install and hopefully get it right next time.

Edit: Just did a clean install of Kubuntu and installed VapourSynth plus packages from:

https://launchpad.net/~djcj/+archive/ubuntu/vapoursynth

The plugins now autoload. Only thing I had to do again was export the environment variables for the PYTHONPATH.