Log in

View Full Version : Vapoursynth


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 [87] 88 89 90 91 92 93 94 95 96 97 98 99 100

Myrsloik
21st July 2021, 20:11
R54 released. Same list of changes as RC1 but it's been recompiled with a newer visual studio.

Dann0245
23rd July 2021, 10:15
On Ubuntu, how can I get vapoursynth plugins?

Or I have to compile all plugins one by one, compiling stuff is difficult for me.

quietvoid
23rd July 2021, 13:19
On Ubuntu, how can I get vapoursynth plugins?

Or I have to compile all plugins one by one, compiling stuff is difficult for me.

Maybe this could work? https://github.com/makedeb/makedeb
The AUR has a lot of plugin packages: https://aur.archlinux.org/packages/?O=0&K=vapoursynth-plugin

Selur
26th July 2021, 04:45
Using:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'G:\TestClips&Co\files\ProRes\Test Patterns Resolve 4444 12-bit.mov'
# current color space: YUV444P16, bit depth: 12, resolution: 720x576, fps: 25, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading G:\TestClips&Co\files\ProRes\Test Patterns Resolve 4444 12-bit.mov using LibavSMASHSource
clip = core.lsmas.LibavSMASHSource(source="G:/TestClips&Co/files/ProRes/Test Patterns Resolve 4444 12-bit.mov")
# making sure input color matrix is set as 709
clip = core.resize.Point(clip, matrix_in_s="709",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# adjusting color space from YUV444P16 to RGB48 for vsLevels
clip = core.resize.Bicubic(clip=clip, format=vs.RGB48, matrix_in_s="709", range_s="limited")
# Color Adjustment
clip = core.std.Levels(clip=clip, min_in=256, max_in=3760, min_out=256, max_out=3760)

# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
I get a black output.
without the:
# Color Adjustment
clip = core.std.Levels(clip=clip, min_in=256, max_in=3760, min_out=256, max_out=3760)

Same when using:
# Color Adjustment
clip = core.std.Limiter(clip=clip, min=0, max=4080)

Is this a bug/limitation or am I missing something?


Shared the input in my GoogleDrive (https://drive.google.com/file/d/1CW5xA2_Y6y8IUlwCRrfJTkWC3L_x2IaO/view?usp=sharing).
Happens with both Vapoursynth R53 and R54.

Cu Selur

poisondeathray
26th July 2021, 04:58
# adjusting color space from YUV444P16 to RGB48 for vsLevels
clip = core.resize.Bicubic(clip=clip, format=vs.RGB48, matrix_in_s="709", range_s="limited")
# Color Adjustment
clip = core.std.Levels(clip=clip, min_in=256, max_in=3760, min_out=256, max_out=3760)


Is this a bug/limitation or am I missing something?




It's the expected result for RGB48 (16bit goes from 0 to 65535)

StainlessS
26th July 2021, 05:07
Selur, I think your numbers are for 12 bit.

shph
26th July 2021, 08:39
Few more interesting test results:

If i render with Hybrid to ProRes 444 MKV (instead of original MOV container) and put that rendered MKV file back to Hybrid - i got black screen preview when apply Levels even if UseRGB is unchecked.

If i use ProRes444 file, apply Levels with any settings and render to ProRes 444 - i got MOV file that is simply black.

Selur
26th July 2021, 10:06
It's the expected result for RGB48 (16bit goes from 0 to 65535)
+
Selur, I think your numbers are for 12 bit.
DOH,... since the input was 12bit I forgot to properly scale!

Thanks totally overlooked that.

Cu Selur

ChaosKing
1st August 2021, 11:03
In VS get_plugins() can show some basic information about plugins like name, functions, identifier etc. But it only works for loaded dlls.
Is it somehow possible to get the same (or almost same) information without (successfully) loading a plugin first?
I want to automate things for vsdb.top + more show some infos in vsrepogui.


Most important would be identifier + all function names

Myrsloik
1st August 2021, 11:20
In VS get_plugins() can show some basic information about plugins like name, functions, identifier etc. But it only works for loaded dlls.
Is it somehow possible to get the same (or almost same) information without (successfully) loading a plugin first?
I want to automate things for vsdb.top + more show some infos in vsrepogui.


Most important would be identifier + all function names

Sure, just look at the plugin loading code. See https://github.com/vapoursynth/vapoursynth/blob/master/src/core/vscore.cpp#L1517 (https://github.com/vapoursynth/vapoursynth/blob/master/src/core/vscore.cpp#L1517)for how it's done. You can more or less copy the code and simply supply your own configplugin and registerfunction callbacks.

ChaosKing
1st August 2021, 17:45
Thx. Will try to make a small cli app.

If I understand it correctly trying to read a plugin which uses cuda for example would still fail with LoadLibraryEx , wouldn't it? ( I don't have a cuda card in this case)

Myrsloik
1st August 2021, 17:53
Thx. Will try to make a small cli app.

If I understand it correctly trying to read a plugin which uses cuda for example would still fail with LoadLibraryEx , wouldn't it? ( I don't have a cuda card in this case)

Depends on how it was written. If the cuda libraries are either dynamically loaded (LoadLibrary) or delay loaded it'd work. If it's a static import it wouldn't. Note that in this case I think the check could mostly be considered to be whether or not the cuda libraries exist so you could borrow them from somewhere even if you, correctly, avoided nvidia.

poisondeathray
5th August 2021, 17:09
# GLSL filter: adaptive-sharpen.glsl
# clip = core.placebo.Shader

Okay, that got solved, only master contained the shader_s-path not the current (1.1.0) release,..



Selur, were you able to get adaptive-sharpen.glsl working with placebo.Shader ? Just specifying shader=r'PATH\adaptive-sharpen.glsl' ?

It returns image for me, but no difference in image

I'm using this version of adaptive-sharpen.glsl
https://gist.github.com/igv/8a77e4eb8276753b54bb94c1c50c317e

I tried linearizing input first, then linearize=True, no difference

(I'm trying to compare CPU version in avisynth port that Dogway put up - that version works)

BabaG
8th August 2021, 23:55
installation question. trying to install on kubuntu 20.04 and getting an error that:
No package 'python-3.8' found
yet, when i query for a python version, i get this:
Python 3.8.10

i know almost nothing about installing from source or github or any of it so i'm not surprized at the problems. got past a missing 'zimg' and managed to get that to be found during ./configure but don't know what to do about this now.

thanks for any help,
babag

Myrsloik
9th August 2021, 00:00
installation question. trying to install on kubuntu 20.04 and getting an error that:
No package 'python-3.8' found
yet, when i query for a python version, i get this:
Python 3.8.10

i know almost nothing about installing from source or github or any of it so i'm not surprized at the problems. got past a missing 'zimg' and managed to get that to be found during ./configure but don't know what to do about this now.

thanks for any help,
babag

Usually it means you need something like the python-3.8-dev package or similar.

BabaG
9th August 2021, 01:11
edit:
ok. got past that one. continuing to look for things it's not finding.
end edit

thanks! i'll look into that. just figured out i should probably post more info on the error so here it is:
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.8/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.8/site-packages
checking for PYTHON3... no
checking for PYTHON3... no
configure: error: Package requirements (python-3.8) were not met:

No package 'python-3.8' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PYTHON3_CFLAGS
and PYTHON3_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

l33tmeatwad
9th August 2021, 01:17
This should do it: sudo apt install python3-dev python3-pip cython3

BabaG
9th August 2021, 02:29
i'm getting two errors as described here:
http://www.vapoursynth.com/doc/installation.html

first is:
vspipe: error while loading shared libraries: libvapoursynth-script.so.0: cannot open shared object file: No such file or directory

in response to the above error, i see this in the documentation but am not sure what to do with it (type it into my cli? put it in a config file someplace?LD_LIBRARY_PATH=/usr/local/lib vspipe --version

when i just put it in the cli, i get this:
Failed to initialize VapourSynth environment

i also see this in the docs but, again, don't know what to do with it:
PYTHONPATH=/usr/local/lib/python3.8/site-packages vspipe --version

again, when i put it into my cli, i get:
vspipe: error while loading shared libraries: libvapoursynth-script.so.0: cannot open shared object file: No such file or directory

i do feel like i'm getting close. this is just the kind of thing i never do.

thanks,
babag

l33tmeatwad
9th August 2021, 03:00
Debian based platforms have a few quirks that are easily avoided with a few tricks that can be found in this walkthrough (https://www.l33tmeatwad.com/vapoursynth101/software-setup).

BabaG
9th August 2021, 03:06
thanks! i'll look at that.

babag

Yomiko
9th August 2021, 06:54
I had the following issue when I was trying to build a plugin in Linux.

My plugin relied on an external library, libcolord, to search for a certain variable. Connection to libcolord was made by creating a reference to a singleton maintained by libcolord. In VS Editor where plugins are unloaded between preview attempts, the second time of creating the reference could always trigger an error "GLib-GObject-WARNING **: cannot register existing type ". I ended up moving the reference outside the plugin and built it as a standalone shared library, loaded with dlopen in my plugin without ever calling dlclose, and the problem seems to be solved.

May I know if it's a feature of VS? From what I understand, when the plugin is unloaded, nothing from the scope could survive.

BabaG
10th August 2021, 04:26
so, i followed the posted link by l33tmeatwad. thanks so much for that! i'd been looking for detailed instructions for quite some time and those were very thorough. very helpful!

there were quite a few warnings that came up when i was copy/pasting commands but i figured they were, hopefully, non-critical. other than that there were only a couple of issues.

first, this is the series of commands i followed for vapoursynth itself:
cd $HOME/.installs
git clone https://github.com/vapoursynth/vapoursynth.git
cd $HOME/.installs/vapoursynth
git checkout R54
./autogen.sh
./configure
make
make install
sudo make install
sudo ldconfig

in the above, i changed the site's reference to r50 to the current r54. hopefully that was cool. the site also says in this list of commands to issue a 'make install' command. that didn't work so i tried 'sudo make install' command and it went through.

the only other thing was this:
sudo cp hasvsfunc/havsfunc.py /usr/local/lib/python3.*/dist-packages/

there appears to be a typo in that. i changed it to:
sudo cp havsfunc/havsfunc.py /usr/local/lib/python3.*/dist-packages/
making that change allowed the cp to go through.

i am having one issue, i think. i haven't gotten far enough to know anything about what i'm doing but i get this error at the bottom of VSEdit:
Failed to initialize VapourSynth environment!

it sounds bad but i don't know if it really means anything. i'll be looking for a way to test a file to see if vs is actually there and capable of doing anything.

thanks again for that guide. it was really helpful!
babag

l33tmeatwad
10th August 2021, 04:35
Did you remove the site-packages folder before trying to make a symbolic link? Debian based Linux python installs use dist-packages and not site-packages, so if the directory was created before and not deleted stuff like VapourSynth will install there and thus not be loaded. If the actual directory exists simply copy all those files over and delete the site-packages folder then use the instructions to create a symbolic link to redirect anything trying to look or copy to that folder.

BabaG
10th August 2021, 05:09
thanks for the quick reply, l33tmeatwad! i confess, though, that i don't know what any of the response means. i'd need more detail to be able to follow. i can sort of get the gist but not enough to be able to act on it. fwiw, i followed the instructions in your link very literally.

thanks again,
babag

l33tmeatwad
10th August 2021, 13:29
So basically where you installed it before the VapourSynth install created /usr/local/lib/python3.*/site-packages, one of the errors you probably got was trying to create the symbolic link in step two because the folder exists already. A symbolic link is a kind of shortcut that points to something else. What you need to do is move everything inside of site-packages into dist-packages, delete the site-packages folder, then use these commands to point site-packages to dist-packages:
cd /usr/local/lib/python3.*
sudo ln -s dist-packages site-packages

BabaG
10th August 2021, 19:09
hey! that's awesome! thanks. the error is gone. now on to being confused by other things.

i copied something from someplace, possibly your site, and am getting a new error in vsedit. here's the code i have:from vapoursynth import core

video = core.lsmas.LWLibavSource(r'/home/babag/Documents/Projects/Buddies_97/2377.mov').text.ClipInfo()

video.set_output()

i found that i can check the script in vsedit with menu--->script--->check script. this is what it returns:
Failed to evaluate the script:
Python exception: No attribute with the name lsmas exists. Did you mistype a plugin namespace?

Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 2242, in vapoursynth.vpy_evaluateScript
File "src/cython/vapoursynth.pyx", line 2243, in vapoursynth.vpy_evaluateScript
File "/home/babag/Documents/Projects/Buddies_97/VS_Test-01.vpy", line 3, in
video = core.lsmas.LWLibavSource(r'/home/babag/Documents/Projects/Buddies_97/2377.mov').text.ClipInfo()
File "src/cython/vapoursynth.pyx", line 1891, in vapoursynth._CoreProxy.__getattr__
File "src/cython/vapoursynth.pyx", line 1754, in vapoursynth.Core.__getattr__
AttributeError: No attribute with the name lsmas exists. Did you mistype a plugin namespace?


thanks again, so much! (i promise to figure this out eventually.)
babag

l33tmeatwad
11th August 2021, 00:33
Assuming you compiled the plugin, did you move it to the /usr/local/lib folder to /usr/local/lib/vapoursynth? Almost all plugins will install to the regular lib directory. If any don't work after moving you can always move it back and create a symbolic link instead.

BabaG
11th August 2021, 04:48
i think this is the relevant set of commands that i followed:
cd $HOME/.installs

git clone https://github.com/l-smash/l-smash.git

cd l-smash

./configure --enable-shared

make lib

sudo make install-lib

i'm seeing these:
/usr/local/lib/liblsmash.a
/usr/local/lib/liblsmash.so
/usr/local/lib/liblsmash.so.2

nothing that looks like lsmash in the /usr/local/lib/vapoursynth directory.

thinking i should link the above three files into the /usr/local/lib/vapoursynth directory but will wait confirmation of that before i do something stoopid.

thanks,
babag

l33tmeatwad
11th August 2021, 05:28
No, that's just l-smash, the dependency for L-SMASH-Works (https://github.com/HolyWu/L-SMASH-Works) so it's in the correct directory.

kedautinh12
11th August 2021, 07:48
L-SMASH Works had new ver
https://github.com/AkarinVS/L-SMASH-Works

l33tmeatwad
11th August 2021, 15:08
L-SMASH Works had new ver
https://github.com/AkarinVS/L-SMASH-WorksThanks for the updated link, it's been forked so many times it's hard to keep up with, lol.

vcmohan
12th August 2021, 08:47
I am trying to install vapoursynth in my new hp laptop. R 51 download of .exe gives virus detected error. What should I do?

ChaosKing
12th August 2021, 08:51
Most likely a false positive. You can upload and check the file on virustotal.com
Btw R54 is the latest stable version.

vcmohan
12th August 2021, 12:25
r 54 64bit .exe also gives same problem

Myrsloik
12th August 2021, 12:36
r 54 64bit .exe also gives same problem

False positives all the way. All shitty antivirus software detects standard installers as viruses. Uninstall whatever shitty antivirus trial your new laptop came with and use the built in microsoft defender which doesn't make this kind of mistake.

l33tmeatwad
12th August 2021, 12:41
It appears there are some false positives on Virus Total, someone should probably follow-up with whatever's detecting it to have it removed. Weirdly, the second result only shows up for the 64-bit installer.

SecureAge APEX - Malicious
Qihoo-360 - Win32/Heur.Generic.HyoDv9kA

vcmohan
12th August 2021, 12:44
While in microsoft edge I did not have an option except to report it is safe, in Chrome it downloaded. On execution microsoft defender gave a no go banner but a path to bypass it was there. So I could execute it. I am having MCaffe anti virus also pre loaded. I think it may be superfluous.

Boulder
12th August 2021, 15:40
While in microsoft edge I did not have an option except to report it is safe, in Chrome it downloaded. On execution microsoft defender gave a no go banner but a path to bypass it was there. So I could execute it. I am having MCaffe anti virus also pre loaded. I think it may be superfluous.

You definitely don't want to have MS Defender and any other AV program in use simultaneously, it's just asking for trouble. MS Defender is good enough these days in my opinion.

BabaG
12th August 2021, 18:55
Assuming you compiled the plugin, did you move it to the /usr/local/lib folder to /usr/local/lib/vapoursynth? Almost all plugins will install to the regular lib directory. If any don't work after moving you can always move it back and create a symbolic link instead.
so, what is the filename for the file i should copy to vapoursynth directory? i didn't see a copy instruction in the guide.

thanks,
babag

l33tmeatwad
12th August 2021, 18:59
so, what is the filename for the file i should copy to vapoursynth directory? i didn't see a copy instruction in the guide.

thanks,
babag
In the guide I gave examples of how to compile and copy the plugin for each different method, refer to the instructions for the ffms2 plugin as an example.

BabaG
12th August 2021, 20:46
thanks again.

the example for ffms2 suggests using autogen.sh, which i did use in setting up ffms2. however, lsmash does not seem to have that. i do see that there is an example for ffms2 in which meson is used. i find a file, meson.build, in the L-SMASH-Works/VapourSynth directory so i cd'ed into that and tried following the steps in the guide under 'meson method.'

the first step there is:

meson build/

which returned this:
The Meson build system
Version: 0.53.2
Source dir: /home/babag/.installs/plugins/L-SMASH-Works/VapourSynth
Build dir: /home/babag/.installs/plugins/L-SMASH-Works/VapourSynth/build
Build type: native build
Project name: L-SMASH-Works
Project version: undefined
C compiler for the host machine: cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C linker for the host machine: cc ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency vapoursynth found: YES 54
Run-time dependency liblsmash found: YES 2.16.1 rev.1477
Dependency libavcodec found: NO found 58.54.100 but need: '>=58.91.0'
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libavcodec found: NO

meson.build:41:0: ERROR: Invalid version of dependency, need 'libavcodec' ['>=58.91.0'] found '58.54.100'.

A full log can be found at /home/babag/.installs/plugins/L-SMASH-Works/VapourSynth/build/meson-logs/meson-log.txt

sounds like i have to figure out updating libavcodec? cmake?

thanks,
babag

l33tmeatwad
12th August 2021, 20:55
Seems like the latest LSMASHSource is looking for a newer version of LibAV than what your OS has in packages. You have two options, either compile FFmpeg yourself, or just use the version of LSMASHSource that I linked before instead of the updated one.

BabaG
12th August 2021, 21:06
You have two options, either compile FFmpeg yourself, or just use the version of LSMASHSource that I linked before instead of the updated one.

second option sounds more my speed. you mean the link from post #4334 to L-SMASH-Works?

edit:
just tried that and got the same error so i guess i'm unsure of what 'linked before' refers to.

thanks,
babag

l33tmeatwad
13th August 2021, 00:27
second option sounds more my speed. you mean the link from post #4334 to L-SMASH-Works?

edit:
just tried that and got the same error so i guess i'm unsure of what 'linked before' refers to.

thanks,
babagJust compile FFmpeg then, it's pretty simple.

BabaG
13th August 2021, 00:47
i really don't want to get into that. i have too much else that's dependent on it and all working fine. i really don't want to change it. getting the idea that vapoursynth is software better suited for rolling release distribution rather than lts one like i use. very disappointing. i really used to like avisynth and was hoping to get back into it in a modern context. i'm no admin or programmer, though. and haven't used windows for a few years either.

l33tmeatwad
13th August 2021, 00:54
You could just use ffms2.

BabaG
13th August 2021, 01:50
same error in vsedit:Failed to evaluate the script:
Python exception: No attribute with the name ffms2 exists. Did you mistype a plugin namespace?

plugin does seem to be in the right place:
file:///usr/local/lib/vapoursynth/libffms2.so

babag

Yomiko
13th August 2021, 05:14
In some systems /usr/local/lib is not a part of LD paths by default. Is it your case?

BabaG
13th August 2021, 06:32
sorry, LD?

LigH
13th August 2021, 08:58
Library directories for the compiler/linker workflow (see e.g. $LD_LIBRARY_PATH).