Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th April 2017, 03:04   #1  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
Cannot import plugins on Ubuntu

Hi all,

I am running vapoursynth R36 on Ubuntu 16.04. I am seeing errors in loading non-core plugins:

Code:
vspipe --y4m 1.vpy encode.avi
Script evaluation failed:
Python exception: No module named 'adjust'
Traceback (most recent call last):
  File "src/cython/vapoursynth.pyx", line 1712, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:34991)
  File "1.vpy", line 4, in <module>
    import adjust
ImportError: No module named 'adjust'
Script:
Code:
import vapoursynth as vs
import adjust

core = vs.get_core()

vid = core.ffms2.Source(source='VTS_02_1.VOB')
vid2 = core.yadifmod.Yadifmod(vid, core.nnedi3.nnedi3(vid, field=3), order=1, mode=3)
#vid3 = core.std.Tweak(vid2, sat=1.4)
vid2.set_output()
I believe the plugins are in the correct place:
Code:
ls -al /usr/lib/python3/dist-packages/
total 2012
drwxr-xr-x 11 root root   4096 Apr 21 21:19 .
drwxr-xr-x  4 root root   4096 Apr 21 21:15 ..
drwxr-xr-x  2 root root   4096 Apr 21 21:16 __pycache__
-rw-r--r--  1 root root 165344 Jan 21  2016 _dbus_bindings.cpython-35m-x86_64-linux-gnu.so
-rw-r--r--  1 root root  11200 Jan 21  2016 _dbus_glib_bindings.cpython-35m-x86_64-linux-gnu.so
drwxr-xr-x  4 root root   4096 Apr 21 21:16 apt
-rw-r--r--  1 root root  51920 Jan 19  2016 apt_inst.cpython-35m-x86_64-linux-gnu.so
-rw-r--r--  1 root root 316040 Jan 19  2016 apt_pkg.cpython-35m-x86_64-linux-gnu.so
drwxr-xr-x  3 root root   4096 Apr 21 21:16 aptsources
drwxr-xr-x  3 root root   4096 Apr 21 21:16 curl
drwxr-xr-x  4 root root   4096 Apr 21 21:16 dbus
-rw-r--r--  1 root root   5971 Nov 10  2015 debconf.py
drwxr-xr-x  6 root root   4096 Apr 21 21:16 gi
lrwxrwxrwx  1 root root     38 Jul  6  2016 lsb_release.py -> ../../../share/pyshared/lsb_release.py
-rw-r--r--  1 root root   4537 Mar 10  2016 pycurl-7.43.0.egg-info
-rw-r--r--  1 root root 124184 Mar 10  2016 pycurl.cpython-35m-x86_64-linux-gnu.so
-rw-r--r--  1 root root   1013 Mar 25  2016 pygobject-3.20.0.egg-info
drwxr-xr-x  3 root root   4096 Apr 21 21:16 pygtkcompat
-rw-r--r--  1 root root    229 Jan 19  2016 python_apt-1.1.0.b1.egg-info
drwxr-xr-x  4 root root   4096 Apr 21 21:16 softwareproperties
drwxr-xr-x  2 root root   4096 Apr 21 21:15 unattended_upgrades-0.1.egg-info
-rw-r--r--  1 root root 753512 Feb  3 17:34 vapoursynth.so
-rw-r--r--  1 root root   3581 Nov  6 16:00 vs-MCDenoise.py
-rw-r--r--  1 root root   5080 Nov  6 16:00 vs-MaskDetail.py
-rw-r--r--  1 root root  18889 Nov  6 16:00 vs-VAutoDeint.py
-rw-r--r--  1 root root   2774 Nov  6 16:00 vs-adjust.py
-rw-r--r--  1 root root   4049 Nov  6 16:00 vs-dehalo_alpha.py
-rw-r--r--  1 root root   3441 Nov  6 16:00 vs-edgecleaner.py
-rw-r--r--  1 root root   3281 Nov  6 16:00 vs-fastlinedarken.py
-rw-r--r--  1 root root   6927 Nov  6 16:00 vs-finesharp.py
-rw-r--r--  1 root root 220697 Nov  6 16:00 vs-havsfunc.py
-rw-r--r--  1 root root   2657 Nov  6 16:00 vs-knlm.py
-rw-r--r--  1 root root   3841 Nov  6 16:00 vs-mcdegrainsharp.py
-rw-r--r--  1 root root 151872 Nov  6 16:00 vs-mvsfunc.py
-rw-r--r--  1 root root   3169 Nov  6 16:00 vs-nnedi3_rpow2.py
-rw-r--r--  1 root root   2870 Nov  6 16:00 vs-psharpen.py
-rw-r--r--  1 root root   3569 Nov  6 16:00 vs-rangeutils.py
-rw-r--r--  1 root root   8042 Nov  6 16:00 vs-resamplehq.py
-rw-r--r--  1 root root  29766 Nov  6 16:00 vs-scoll.py
-rw-r--r--  1 root root   5934 Nov  6 16:00 vs-sharpaamcmod.py
-rw-r--r--  1 root root   3014 Nov  6 16:00 vs-supersampledantialiasing.py
-rw-r--r--  1 root root   1536 Nov  6 16:00 vs-temporalsoften2.py
-rw-r--r--  1 root root  34629 Nov  6 16:00 vs-vsTAAmbk.py
-rw-r--r--  1 root root   6164 Nov  6 16:00 vs-vshelpers.py
Am I doing something obviously wrong? Any insight you code provide would be appreciated.

cwk
cwk is offline   Reply With Quote
Old 25th April 2017, 08:16   #2  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
This might help.
http://www.l33tmeatwad.com/vapoursyn...software-setup
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 25th April 2017, 08:32   #3  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Definitively create a bug report at your package maintainer's github repo, this is a long standing bug for your distro. I mean, why the need to rename module's names? He could just move them inside a directory if he is so obsessed with order.
Are_ is offline   Reply With Quote
Old 26th April 2017, 04:09   #4  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
Thank you for the quick responses.

Yes, it was the hyphen in the plugin names that was breaking the import process. I've removed the vs- prefix from the plugins, as that yields a slightly more intuitive script:

vid5 = vs_adjust.Tweak(vid4, sat=1.3, cont=1.15)

vs

vid5 = adjust.Tweak(vid4, sat=1.3, cont=1.15)

I've also filed an issue here:
https://github.com/darealshinji/vapoursynth-plugins

cwk
cwk is offline   Reply With Quote
Old 26th April 2017, 04:35   #5  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
In the meantime I updated my dockerfile to rename the plugins when building:

RUN cd /usr/lib/python3/dist-packages && \
rename 's/vs-//' vs-*.py
cwk is offline   Reply With Quote
Old 26th April 2017, 11:25   #6  |  Link
djcj
Registered User
 
Join Date: Jun 2013
Location: Germany
Posts: 44
@Are_: I'm not "obsessed" with order, I wanted to avoid issues in case other packages would install scripts with the same name. I had already fixed this by moving the stuff into a sub-directory but I forgot to update the PPA.
djcj is offline   Reply With Quote
Old 26th April 2017, 22:16   #7  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
@djcj, thank you for the fast work. Is the ppa updated? If so, I would be happy to test.
cwk is offline   Reply With Quote
Old 28th April 2017, 02:01   #8  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
@djcj, The package now doesn't install the plugins, or if it does, to the wrong directory:

Code:
# apt-get install vapoursynth-extra-plugins
Reading package lists... Done
Building dependency tree       
Reading state information... Done
vapoursynth-extra-plugins is already the newest version (20170110-1~xenial).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
I'm expecting the the plugins to show up here:
Code:
# ls -al /usr/lib/python3/dist-packages/
total 1468
drwxr-xr-x 11 root root   4096 Apr 27 22:57 .
drwxr-xr-x  4 root root   4096 Apr 27 22:53 ..
drwxr-xr-x  2 root root   4096 Apr 27 22:54 __pycache__
-rw-r--r--  1 root root 165344 Jan 21  2016 _dbus_bindings.cpython-35m-x86_64-linux-gnu.so
-rw-r--r--  1 root root  11200 Jan 21  2016 _dbus_glib_bindings.cpython-35m-x86_64-linux-gnu.so
drwxr-xr-x  4 root root   4096 Apr 27 22:54 apt
-rw-r--r--  1 root root  51920 Jan 19  2016 apt_inst.cpython-35m-x86_64-linux-gnu.so
-rw-r--r--  1 root root 316040 Jan 19  2016 apt_pkg.cpython-35m-x86_64-linux-gnu.so
drwxr-xr-x  3 root root   4096 Apr 27 22:54 aptsources
drwxr-xr-x  3 root root   4096 Apr 27 22:54 curl
drwxr-xr-x  4 root root   4096 Apr 27 22:54 dbus
-rw-r--r--  1 root root   5971 Nov 10  2015 debconf.py
drwxr-xr-x  6 root root   4096 Apr 27 22:54 gi
lrwxrwxrwx  1 root root     38 Jul  6  2016 lsb_release.py -> ../../../share/pyshared/lsb_release.py
-rw-r--r--  1 root root   4537 Mar 10  2016 pycurl-7.43.0.egg-info
-rw-r--r--  1 root root 124184 Mar 10  2016 pycurl.cpython-35m-x86_64-linux-gnu.so
-rw-r--r--  1 root root   1013 Mar 25  2016 pygobject-3.20.0.egg-info
drwxr-xr-x  3 root root   4096 Apr 27 22:54 pygtkcompat
-rw-r--r--  1 root root    229 Jan 19  2016 python_apt-1.1.0.b1.egg-info
drwxr-xr-x  4 root root   4096 Apr 27 22:54 softwareproperties
drwxr-xr-x  2 root root   4096 Apr 27 22:53 unattended_upgrades-0.1.egg-info
-rw-r--r--  1 root root 753512 Feb  3 17:34 vapoursynth.so
lrwxrwxrwx  1 root root     24 Apr 26 10:44 vsscripts -> ../../../share/vsscripts
cwk is offline   Reply With Quote
Old 28th April 2017, 20:38   #9  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
False alarm. The plugins are installed by the ppa, but to a different directory:

Code:
# find . -name 'adjust*'
./usr/share/vsscripts/adjust.py
I needed to adjust my PYTHONPATH environmental variable to include this path, and things are working.

Thanks again for the fast turnaround.
cwk is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.