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

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th November 2018, 00:00   #1  |  Link
boxxybot
Registered User
 
Join Date: Nov 2018
Posts: 5
Oyster (and other pythonic stuff)

I'm running ubuntu 18.10 with a cinnamon desktop. It took me a few days of research but I finally was able to build all the requisites to Oyster. I ran the autogen scripts and had no errors, but still am unable to get it to work. I suspect this is due to some pythonic path issues, but I'm at a complete loss here. When I go right into the folder containing oyster.py and run from the command line I'm told it still cannot find the other modules I built. Is there a basic howto somewhere explaining how these modules are loaded? Even when I copy the .py files into /usr/lib/python3.6 it still seems unable to locate these modules. I've been using a *nix desktop nearly my entire 56 years and some version of linux since the 90s and am still having troubles with this. I feel I must be missing something very basic.

vspipe test.vpy - | x264 - --output encoded.mkv
raw [error]: raw input requires a resolution.
x264 [error]: could not open input file `-'
Script evaluation failed:
Python exception: cannot import name 'Oyster'

Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 1937, in vapoursynth.vpy_evaluateScript
File "src/cython/vapoursynth.pyx", line 1938, in vapoursynth.vpy_evaluateScript
File "test.vpy", line 1, in <module>
from vapoursynth import core,Oyster
ImportError: cannot import name 'Oyster'


script
============
from vapoursynth import core,Oyster
clip = core.ffms2.Source(source='DIE ANTWOORD - BANANA BRAIN (Official Video).mkv')
sup = Oyster.Super(clip)
ref_f = Oyster.Basic(clip, sup, short_time=False)
ref_s = Oyster.Basic(clip, sup, short_time=True)
clip = Oyster.Deblocking(clip, ref_f, block_step=2)
clip = Oyster.Deringing(clip, ref_s, sigma=24.0, h=10.8, block_step=2)
#video = core.std.Transpose(video)
video.set_output()
boxxybot is offline   Reply With Quote
Old 16th November 2018, 02:30   #2  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
Although I'm not very familiar with Linux, I can see one problem in your script.

Quote:
from vapoursynth import core,Oyster
This cannot be right, the vapoursynth python module certainly doesn't have Oyster in it.
Rather, you should use
Code:
from vapoursynth import core
import Oyster (as ...)
and see if that works for you.
__________________
Monochrome Anomaly

Last edited by Wolfberry; 16th November 2018 at 06:52.
Wolfberry is offline   Reply With Quote
Old 16th November 2018, 03:05   #3  |  Link
boxxybot
Registered User
 
Join Date: Nov 2018
Posts: 5
Thanks. Doh!. Frustration from spending four days waiting for posting auth here and having to build some packages with slightly misleading error messages...

Progress:
from vapoursynth import core
import Oyster, MVTools
clip = core.ffms2.Source(source='DIE ANTWOORD - BANANA BRAIN (Official Video).mkv')
sup = Oyster.Super(clip)
ref_f = Oyster.Basic(clip, sup, short_time=False)
ref_s = Oyster.Basic(clip, sup, short_time=True)
clip = Oyster.Deblocking(clip, ref_f, block_step=2)
clip = Oyster.Deringing(clip, ref_s, sigma=24.0, h=10.8, block_step=2)
#video = core.std.Transpose(video)
video.set_output()

Output:

vspipe test.vpy - | x264 - --output encoded.mkv
raw [error]: raw input requires a resolution.
x264 [error]: could not open input file `-'
Script evaluation failed:
Python exception: No module named 'mvmulti'

Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 1937, in vapoursynth.vpy_evaluateScript
File "src/cython/vapoursynth.pyx", line 1938, in vapoursynth.vpy_evaluateScript
File "test.vpy", line 2, in <module>
import Oyster, MVTools
File "/usr/lib/python3.6/Oyster.py", line 3, in <module>
import mvmulti
ModuleNotFoundError: No module named 'mvmulti'

I get error message whether or not I import "MVTools." Strangely, I get no error when importing MVTools so I must assume not a bad namespace.

$ ls -1 /usr/local/lib
libdfttest.la
libdfttest.so
libfmtconv.la
libfmtconv.so
libmvtoolssf.la
libmvtoolssf.so
libnnedi3.la
libnnedi3.so
python2.7
python3.6
vapoursynth

I feel the need for a linux thread on this. most of the discussion I've found here seems to be people running this, ironically, on windows. Were I using Windows I'd just pull avisynth 2.6 and build it. I contributed a lot of code to that, ages ago. Vapoursynth seems to be what I always wished avisynth would be, but it's taken me nearly a week of free time and still no air... er, vapour.
boxxybot is offline   Reply With Quote
Old 16th November 2018, 12:00   #4  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Mvtools is a plugin and not a script, so you don't need (or can't) import it.
mvmulti: https://github.com/IFeelBloated/vapo...src/mvmulti.py
You also need mvtools-sf (not mvtools) for Oyster https://github.com/IFeelBloated/vapoursynth-mvtools-sf
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 16th November 2018, 17:03   #5  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
Quote:
Originally Posted by boxxybot View Post
vspipe --y4m test.vpy - | x264 --stdin y4m - --output encoded.mkv
Small nit: use y4m so it doesn't complain about the raw input/resolution stuff.

Quote:
I get error message whether or not I import "MVTools." Strangely, I get no error when importing MVTools so I must assume not a bad namespace.

$ ls -1 /usr/local/lib
libdfttest.la
libdfttest.so
libfmtconv.la
libfmtconv.so
libmvtoolssf.la
libmvtoolssf.so
libnnedi3.la
libnnedi3.so
python2.7
python3.6
vapoursynth
Unless something's changed, I'm pretty sure VS doesn't autoload from /usr/local/lib; it autoloads from the vapoursynth subdirectory. Symlink them in there and it should work.
qyot27 is offline   Reply With Quote
Old 17th November 2018, 03:54   #6  |  Link
boxxybot
Registered User
 
Join Date: Nov 2018
Posts: 5
Aha! More clues. I created that vapousynth folder manually in /usr/local/lib. It's this whole "plugins" thing that's screwing with me - it's not pythonic. I get the same error message after putting those modules in the vapoursynth folder. So how, in linux, do I set this vapoursynth "plugin" path?
boxxybot is offline   Reply With Quote
Old 17th November 2018, 04:41   #7  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
VapourSynth itself has $libdir/vapoursynth as a default value for SystemPluginDir, which is the value in vapoursynth.conf (should one exist) that can set the system autoload path for plugins (UserPluginDir can set it for non-system locations). So effectively, there should be no need to set it, unless you want to use a different location.

What's more important, particularly since you mentioned this is Ubuntu, is how did you install the plugins (dfttest, fmtconv, mvtools-sf, and nnedi)? Did you just sudo make install, and leave it at that, or did you also follow it with sudo ldconfig? Because they are regular libraries, they do need ldconfig run on them before the OS can find them.

Last edited by qyot27; 17th November 2018 at 04:44.
qyot27 is offline   Reply With Quote
Old 18th November 2018, 20:46   #8  |  Link
boxxybot
Registered User
 
Join Date: Nov 2018
Posts: 5
After struggling with error messages a day and a half, I installed VS from the apt packages provided in the ppa. It did not create a $LIBDIR/vapoursynth folder or any other. As I said, I created the vapousynth folder in /usr/local/lib. After moving the libraries there and running ldconfig I still get the same error messages.

I built the tools following the directions provided. If those are inaccurate then that explains by questions here.

Can I get a straight answer? How exactly does one install a fully working system (with plugins) in ubuntu? Thanks.
boxxybot is offline   Reply With Quote
Old 19th November 2018, 04:44   #9  |  Link
boxxybot
Registered User
 
Join Date: Nov 2018
Posts: 5
Autoloading can be configured using the file $XDG_CONFIG_HOME/vapoursynth/vapoursynth.conf, or $HOME/.config/vapoursynth/vapoursynth.conf if XDG_CONFIG_HOME is not defined.

After installing the packages, neither /home/user/vapoursynth, /home/user/.config/vapoursynth, nor /home/user/.vapoursynth, was created, I've not tried creating any of these.

Two configuration options may be used: UserPluginDir, empty by default, and SystemPluginDir, whose default value is set at compile time to $libdir/vapoursynth, or to the location passed to the --with-plugindir argument to configure.

When placing Oyster in /usr/lib/python3.6, Oyster is imported but the packages imported by Oyster are not found.

Example vapoursynth.conf:

UserPluginDir=/home/asdf/vapoursynth/plugins
SystemPluginDir=/special/non/default/location


vapoursynth.conf also does not exist in my system...

I located the other plugins in /usr/lib/x86_64-linux-gnu/vapoursynth/
After moving the mods there, mvmulti is still not found for import.

ls -1 /usr/lib/x86_64-linux-gnu/vapoursynth/
addgrain.so
awarpsharp2.so
bifrost.so
bilateral.so
bm3d.so
cnr2.so
combmask.so
convo2d.so
ctmf.so
d2vscan.pl
d2vsource.so
damb.so
dctfilter.so
deblockpp7.so
deblock.so
degrainmedian.so
delogo.so
depan.so
dfttest.so
eedi2.so
eedi3.so
f3kdb.so
ffms2.so
fft3dfilter.so
fieldhint.so
fillborders.so
fluxsmooth.so
fmtconv.so
genericfilters.so
histogram.so
hqdn3d.so
imagereader.so
it.so
knlmeanscl.so
libbm3d.so
libdfttest.la
libdfttest.so
libeedi3.so
libfmtconv.la
libfmtconv.so
libimwri.so
libmiscfilters.so
libmorpho.so
libmvtoolssf.la
libmvtoolssf.so
libnnedi3.la
libnnedi3.so
libocr.so
libremovegrain.so
libsubtext.so
libvinverse.so
libvivtc.so
lsmashsource.so
models
msmoosh.so
mvtools.so
nnedi3.so
rawsource.so
readmpls.so
reduceflicker.so
retinex.so
sangnommod.so
scenechange.so
scrawl.so
scxvid.so
ssiq.so
tc2cfr.so
tcanny.so
tcomb.so
tdeintmod.so
templinearapproximate.so
temporalsoften2.so
temporalsoften.so
tnlmeans.so
ttempsmooth.so
vaguedenoiser.so
vautodeint.so
videoscope.so
w3fdif.so
waifu2x-opt.so
waifu2x-w2xc.so
wwxd.so
yadifmod.so

Last edited by boxxybot; 19th November 2018 at 04:49.
boxxybot is offline   Reply With Quote
Old 19th November 2018, 23:52   #10  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
All these vapoursynth.conf locations are in case you want to overwrite the defaults, you have to create it yourself to a location of your liking, if you want.

There are plugins (binaries) and python modules (scripts). Oyster and mvmulty are modules and they go into /usr/lib64/python3.X/site-packages or something like that.

Plugins can auto-load and are better that way, modules cant.

EDIT: Sorry if I'm stating the obvious but you have a problem most probably with a simple solution and I don't really understand everything you are doing, specifically with the python modules.

Last edited by Are_; 19th November 2018 at 23:57.
Are_ is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 05:19.


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