Log in

View Full Version : VapourSynth Installer, Applications, & Plugins for macOS (Intel)


Pages : 1 2 3 4 5 6 7 8 9 [10]

anton_foy
1st August 2023, 15:59
My first day with VapourSynth so apologies for the newbie question.
Im on macos monterey 12.6 (MacBook Air) using the installer of mac and I want to try out waifu2x.

error message:
Warning: Failed to load /Library/Frameworks/VapourSynth.framework/lib/vapoursynth/libwaifu2x-w2xc.dylib. Error given: dlopen(/Library/Frameworks/VapourSynth.framework/lib/vapoursynth/libwaifu2x-w2xc.dylib, 0x0001): Library not loaded: '@loader_path/../libw2xc.dylib'
Referenced from: '/Library/Frameworks/VapourSynth.framework/lib/vapoursynth/libwaifu2x-w2xc.dylib'
Reason: tried: '/Library/Frameworks/VapourSynth.framework/lib/vapoursynth/../libw2xc.dylib' (no such file), '/usr/local/lib/libw2xc.dylib' (no such file), '/usr/lib/libw2xc.dylib' (no such file)

It does not complain about any other plugins like ttempsmooth or removegrain that are in the same folder.

Script .vpy:
import vapoursynth as vs
import havsfunc as haf

core = vs.get_core()
#core.max_cache_size = 2048

video = core.lsmas.LWLibavSource(source=/Users/comp/Movies/1.mp4)

#video = haf.QTGMC(video, Preset="Slower", TFF=True)

video = core.fmtc.matrix (clp, mat="709",col_fam=vs.RGB)
video = core.fmtc.bitdepth (clp,bits=32,dmode=0)

video = w2xc.Waifu2x(video[, int noise=1, int scale=2, int block=512, bint photo=True, int gpu=1, int processor=-1, bint list_proc=False, bint log=False])

video = core.fmtc.resample(video, css="420")
video = core.fmtc.bitdepth(video, bits=8)
video = core.std.Trim(3600, 3700)


In Terminal:
vspipe -c y4m first.vpy - | ffmpeg -f yuv4mpegpipe -colorspace bt709 -i - -vcodec rawvideo -pix_fmt yuv420 -y vp_output.mov

Thanks!

l33tmeatwad
1st August 2023, 16:13
So that plugin requires the Vulkan SDK to be installed. Is your MacBook one of the newer ARM based ones? If so I'm not sure you're going to be able to get that working with the Intel compiles for VapourSynth.

anton_foy
1st August 2023, 16:21
So that plugin requires the Vulkan SDK to be installed. Is your MacBook one of the newer ARM based ones? If so I'm not sure you're going to be able to get that working with the Intel compiles for VapourSynth.

Ah probably missing the Vulkan SDK then I will try, thanks! Edit: Its the M1 2020

anton_foy
19th August 2023, 10:27
I did not get Waifu2x to work but thats ok, I got qtgmc to work properly and very fast aswell. Great so far but none of the others except nnedi3 is working for me, when calling for example video = core.focus.temporalsoften(video) I get an error telling me 'Attribute error: No attribute with the name focus exists.' does not exist even though the plugins along with all of those needed for qtgmc script is in the same folder. I mean qtgmc in Havsfunc depend on those plugins in the plugs folder so I don't understand it.

ChaosKing
19th August 2023, 10:50
Searching for focus or temporalsoften in havsfunc leads to 0 results :-)

anton_foy
19th August 2023, 11:32
Searching for focus or temporalsoften in havsfunc leads to 0 results :-)

Yes I meant any other core filters, temporalsoften for example :)
Just copied the lines from others here who used ts and other core filters. Was thinking this is some kind of macos issue with those but most probably Im the issue (vs n00b) :D

Selur
24th August 2023, 15:20
Searching for focus or temporalsoften in havsfunc leads to 0 results :-)
as aside note: iirc. older havsfunc.QTGMC versions required TemporalSoften :)

l33tmeatwad
29th November 2023, 19:56
I apologize for the delay, but I finally got around to setting up a fresh development environment for everything. Based on various factors the new minimum OS version is 10.15. Additionally, since macOS compilation is known to be broken for R63, I will not be patching that version just to compile it so that will not be made available as an installer. VapourSynth R62 and older plugins will remain available for anyone that needs support on 10.13 or 10.14.

Installers for VapourSynth R64 & 65 are now available, the minimum OS version is now 10.15 and Python has been upgraded to 3.11, so make sure to backup any scripts in site-packages before installing as it will remove the Python 3.10 site-packages folder.

groucho86
30th November 2023, 05:20
Are these new for Intel only still? Meaning any asm code will not work on M1/M2/M3?

kedautinh12
30th November 2023, 10:54
Hi are you have other account Groucho2004?

l33tmeatwad
30th November 2023, 15:07
Are these new for Intel only still? Meaning any asm code will not work on M1/M2/M3?These are still for Intel, I will change the topic once I'm able to get my hands on an ARM Mac and can start compiling for those.

l33tmeatwad
1st December 2023, 18:31
Small update, since I have switched to 10.15 a few plugins that would compile but for some reason wouldn't autoload are now working. I will slowly be updating plugins, however they will only work on macOS 10.15+.

l33tmeatwad
4th December 2023, 18:14
Added VapourSyth Editor r19 mod 6.3 and it will require macOS 10.15 or newer. I have combined Job Server and Job Server watcher into the same app so that it's easier to use and I also included a script to create links to enable vsedit-previewer so that it is accessible from Terminal.

anonymlol
30th December 2023, 18:03
I've compiled a few of the plugins and scxvid-standalone (https://github.com/anonymlol/SCXvid-standalone/releases) (Apple Silicon).

Some of the plugins I couldn't compile (errors here and there...)

I have tested scxvid-standalone and it works fine. I didn't have time to test the plugins yet.

Plugins (https://www.mediafire.com/folder/4qf3uwnw4exw1/Vapoursynth_Plugins_for_macOS_(Apple_Silicon))

l33tmeatwad
3rd January 2024, 17:09
I've compiled a few of the plugins and scxvid-standalone (https://github.com/anonymlol/SCXvid-standalone/releases) (Apple Silicon).

Some of the plugins I couldn't compile (errors here and there...)

I have tested scxvid-standalone and it works fine. I didn't have time to test the plugins yet.

Plugins (https://www.mediafire.com/folder/4qf3uwnw4exw1/Vapoursynth_Plugins_for_macOS_(Apple_Silicon))
Awesome! One thing I would recommend is that you fix your dependancies, for example BestAudioSource is looking for the ffmpeg libs in "/opt/homebrew/opt/ffmpeg/lib/", you should compile the ffmpeg static libs instead so they are built in and BAS don't need them. You can use otool -L to check the libs plugins are using. Anything in /usr/lib is fine as all systems share those. Also, I would recommend compiling the minimum version as 11 for compatibility.

anonymlol
3rd January 2024, 18:53
I really should have read your setup post (https://forum.doom9.org/showthread.php?p=1844300#post1844300) till the end. Thanks for the advice. I'll read up on it and try again.

Can you tell me how you compiled VSEdit? Whenenver I compile it, it's full of bugs and can't find the library/plugins directory.

I'm also getting an error when compiling libass (following your guide). Something about the 'freetype' version being too low.

l33tmeatwad
3rd January 2024, 19:13
Unfortunately I don't get any errors so it may be that some code might need to be changed for ARM. As for finding the plugins directory, did you install VapourSynth via Brew?

anonymlol
3rd January 2024, 19:54
I tried brew, but then it also wouldn't find the plugins even though I followed the instructions in your first post.

Your installer is the only thing that works. Even compiling VapourSynth + VSEdit myself (following your guide), it can't find/load the plugins.

l33tmeatwad
3rd January 2024, 20:21
Did you manually create the default plugins path? Since VapourSynth doesn't come with any plugins anymore it doesn't create it by default.

anonymlol
4th January 2024, 18:14
I see, maybe I made a mistake somewhere with the folders. I'll experiment a bit.

The installer creates the folders in a different location than your instructions on the first post. Maybe I should try the same location as the installer.

Installer folder locations:

VS Plugins
/Library/Frameworks/VapourSynth.framework/lib/vapoursynth

VS Scripts
/Library/Frameworks/VapourSynth.framework/lib/python3.11/site-packages

VS Libraries
/Library/Frameworks/VapourSynth.framework/lib

VS Executables
/Library/Frameworks/VapourSynth.framework/bin


And for brew (according to first post)

ln -s /usr/local/lib/vapoursynth $HOME/Desktop/VapourSynth/Plugins
ln -s /usr/local/lib/python3.9/site-packages $HOME/Desktop/VapourSynth/Scripts

l33tmeatwad
4th January 2024, 18:17
So /usr/local/lib/VapourSynth is the default autoload path. Normally I'll create a symbolic link because I create a framework as opposed to a regular install so updates don't break the install.

EDIT: I just realized you left out the first part for brew users:
mkdir -p /usr/local/lib/vapoursynth
mkdir -p "$HOME/Library/Application Support/VapourSynth"
touch "$HOME/Library/Application Support/VapourSynth/vapoursynth.conf"
echo UserPluginDir=/usr/local/lib/vapoursynth >> "$HOME/Library/Application Support/VapourSynth/vapoursynth.conf"
echo SystemPluginDir=/usr/local/lib/vapoursynth >> "$HOME/Library/Application Support/VapourSynth/vapoursynth.conf"

anonymlol
4th January 2024, 21:45
Yeah I skipped it on purpose because I didn't want to make the post unnecessarily long.

I'll have a closer look at everything when I have more time.

For now I'd like to share my new (quick and dirty) script to automate the first part of your guide (setting up tools). I'll do the rest (setting up the vs framework) later.

edit: updated script is now on github (https://github.com/anonymlol/VapourSynth-build-scripts-macOS/blob/main/vstools.py)
edit2: finally done on the script to build vapoursynth framework, see here (https://github.com/anonymlol/VapourSynth-build-scripts-macOS/blob/main/vsframework.py)
edit3: libass works now, it failed before because it was missing: PKG_CONFIG_PATH=/Library/Frameworks/VapourSynth.framework/lib/

Btw, VSEdit still throws errors. The folders and links are created via the script according to your instruction post.

VapourSynth plugins manager: Failed to load vapoursynth library!
Please set up the library search paths in settings.
Failed to load vapoursynth script library!
Please set up the library search paths in settings.
Failed to load vapoursynth script library!
Please set up the library search paths in settings.

anonymlol
17th January 2024, 22:19
From your post here (https://forum.doom9.org/showthread.php?p=1844300#post1844300)

sudo ln -s /Library/Frameworks/VapourSynth.framework/lib/libvapoursynth.dylib /usr/local/lib/libvapoursynth.dylib
sudo ln -s /Library/Frameworks/VapourSynth.framework/lib/libvapoursynth-script.dylib /usr/local/lib/libvapoursynth-script.dylib
sudo ln -s /Library/Frameworks/VapourSynth.framework/lib/libvapoursynth-script.0.dylib /Library/Frameworks/VapourSynth.framework/lib/libvapoursynth-script.0.dylib
sudo ln -s /Library/Frameworks/VapourSynth.framework/lib/vapoursynth /usr/local/lib/vapoursynth
sudo ln -s /Library/Frameworks/VapourSynth.framework/lib/pkgconfig/vapoursynth.pc /usr/local/lib/pkgconfig/vapoursynth.pc
sudo ln -s /Library/Frameworks/VapourSynth.framework/lib/pkgconfig/vapoursynth-script.pc /usr/local/lib/pkgconfig/vapoursynth-script.pc
sudo ln -s /Library/Frameworks/VapourSynth.framework/bin/vspipe /usr/local/bin/vspipe
sudo ln -s /Library/Frameworks/VapourSynth.framework/include/vapoursynth /usr/local/include/vapoursynth

This is probably a bug (same path). I guess it's supposed to be:
sudo ln -s /Library/Frameworks/VapourSynth.framework/lib/libvapoursynth-script.0.dylib /usr/local/lib/libvapoursynth-script.0.dylib

I still can't get plugin autload to work (in vsedit). Any idea what I'm doing wrong/missing? (My build script (https://github.com/anonymlol/VapourSynth-build-scripts-macOS/blob/main/vsframework.py))
The vapoursynth.conf file doesn't help either. And I noticed your installer doesn't even create it. How did you solve the autload issue? Or did you do something special when compiling vsedit?

l33tmeatwad
22nd January 2024, 15:45
Ah, yeah that is a mistake, I'll get that fixed up. As for you script, I'll try to take a look over it soon, been super busy lately so it might take a minute to look into, nothing is looking super off from the quick glance I took.

l33tmeatwad
13th March 2024, 17:33
The R66 installer is now available.

l33tmeatwad
24th May 2024, 21:59
I forgot to post before, but the installers for R67 & R68 are up.

l33tmeatwad
25th July 2024, 18:14
With recent updates to the code of VapourSynth to update to C++17, it will no longer compile on macOS 10.15. I will look to see if there is any way in which this can be compiled without needing to reverting some of the changes that macOS 10.15 does not support with its built in C++ compilers. Since my personal MacBook does not support past this version of macOS this project has come to a crossroads, especially considering Intel based Apple computers won't have support for much longer anyways. I do plan to create an installer for ARM based Apple computers as soon as I have one to work with, however for now I will focus on updating plugins and encourage anyone with a newer Mac to simply use the Brew method to install further versions of VapourSynth.

ChaosKing
25th July 2024, 19:38
FYI it looks like vsrepo will get linux and macos support with plugin auto builds.

See https://github.com/Stefan-Olt/vs-plugin-build
https://github.com/vapoursynth/vsrepo/pull/224

l33tmeatwad
26th July 2024, 15:02
FYI it looks like vsrepo will get linux and macos support with plugin auto builds.

See https://github.com/Stefan-Olt/vs-plugin-build
https://github.com/vapoursynth/vsrepo/pull/224
Thanks, I'll look into this so I can properly write up a guide.

ChaosKing
10th October 2024, 10:21
You can now vsrepo install ffms2 bs nnedi3 ... on mac and linux.

Selur
11th October 2024, 12:25
Nice. Good to know.
Does it work for Intel&ARM or just Intel?

ChaosKing
11th October 2024, 20:48
Depends on the plugin but yes. If you look at releases there are darwin-x86_64 and darwin-aarch64 builds.

Busty
23rd May 2025, 22:53
I encounter the same problem as Kolak describes at the end of page 1 of this thread. mv.Super apparently requires fftw3, but I can't find it as dylib in the "misc dependencies" folder. The "AVMpack MacOS software list" lists fftw 3.3.10 as an included dependency, but it's not installed in libraries after running the current AMVpack installer.

Am I doing something wrong here? Or can somebody please help me to find and install that library?

Selur
26th May 2025, 14:06
You could probably install it through brew (https://formulae.brew.sh/formula/fftw).

Busty
26th May 2025, 16:17
Thanks Selur, I did that. M_Super still doesn't work. Do I have to point Vapoursynth to that library somehow?

Selur
26th May 2025, 16:51
You could use otool to figure out where the library you used expects to fine fftw and either place it there or modify the library
you did read https://forum.doom9.org/showpost.php?p=1844583&postcount=23 right?

Busty
28th May 2025, 13:55
yes, I've read that post, but couldn't find the "dependencies" folder. There's a "misc dependencies" folder, but it does not include compiled fftw.

I found all the libraries in the Macports install (install through brew didn't work as I noticed later) and copied them over to /Library/Frameworks/VapourSynth.framework/lib.

otool however reports for MVTools two other dependencies (and doesn't seem to miss fftw), namely libSystem.B.dylib and libc++.1.dylib, which are not in usr/lib. The folder is read only, so I can't put any libraries in there.

I then opened libmvtools.dylib with a text editor and changed the directory lines to the Vapoursynth lib folder, where I copied those libraries.

Still the same error.

Is anyone successfully using bm3d on Monterey, Mojave or High Sierra on a non-cuda system, e.g. with bm3dcpu? No matter if in Vapoursynth or Avisynth?

Or maybe someone can provide a small simple script using bm3d that *should* work in Vapoursynth, so I can make sure it's not an issue of grammar or something else?

l33tmeatwad
29th May 2025, 18:14
Just to be sure, when you downloaded the plugin, did you double click to open it so you can tell macOS in Privacy & Security to allow it to run? If you don't do that it will fail to load the plugin.

Busty
2nd June 2025, 16:37
Thanks for getting back at me.

I can't remember if I double clicked it, but I just did that and Privacy & Security does not block it. Terminal tries to execute it and fails, but that's all that happens.

l33tmeatwad
3rd June 2025, 17:58
If terminal comes up like that then they should be good to go, just make sure you are placing them in the correct directory with the rest of the plugins and it should auto-load them, it needs to be in the /Library/Frameworks/VapourSynth.framework/lib/vapoursynth folder, not the lib folder.

Busty
5th June 2025, 11:00
I uninstalled and reinstalled the AMVpack_241220_macOS.pkg.

Then I opened Vapoursynth with feisty's script and got the error "no module named 'mvmulti'. So I copied mvmulti.py to site-packages.

Then I checked the script again and the next error is 'no attribute named bm3d exists', so I copied bm3d.dylib to vapoursynth.framework/lib/vapoursynth.

Next script check gave me 'no attribute named mvsf exists'. I then checked the dependencies of bm3d, which were /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0) and /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)

I found libc++.1.dylib here: https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10.9.sdk/usr/lib/libc++.1.dylib
and libSystem.B.dylib here: https://github.com/JonathanSalwan/binary-samples/blob/master/libSystem.B.dylib

I copied them to /usr/local/lib and changed the path bm3d looks for those libraries with this command:
install_name_tool -change /usr/lib/libc++.1.dylib /usr/local/lib/libc++.1.dylib /Library/Frameworks/VapourSynth.framework/lib/vapoursynth/libbm3d.dylib

Then I checked the script again and the error went back to 'no attribute named bm3d exists'

I double clicked the bm3d.dylib which opened terminal. I also double clicked the dependency libraries which brings terminal to front but nothing else happens. libc++.1.dylib and libSystem.B.dylib list numerous depencies too, which aren't present, do I need to install some c++ package?

This is where I don't know how to proceed. Maybe the downloaded (about 10 year old) dependencies are not the versions needed?

l33tmeatwad
12th June 2025, 18:09
You should not be needing to replace system libs, also those versions are too old, the minimum system version for the majority of the plugins is 10.12.

Busty
12th June 2025, 22:20
replacing the libs was just an attempt to get this working and because bm3d asked for them. I'm trying this on Monterey and the libs are just not where otool reports that bm3d would expect them.

I could also try this on Mojave. At least those libs are present there.
I wanted to install your AMVpack_241220_macOS.pkg on Mojave, but I get the error "Distribution_Title" cannot be installed or something similar.

Is there a way to install that package on Mojave? Can I just install all the contents in there and ignore Distribution Title?

l33tmeatwad
13th June 2025, 19:14
It should run fine on Monterey without anything additional, my only question is if the CPU is Intel or ARM?

Busty
13th June 2025, 21:01
Intel

l33tmeatwad
13th June 2025, 21:56
I'm not sure what the issue is then, I have tested all these on multiple Intel based Macs and macOS up to version 15 (Sequoia).

Busty
15th June 2025, 13:48
ok, thanks. Maybe I'll try again with a future OS install. In the meantime, I got BM3D working with Avisynth+ running on High Sierra, so I'll see how far that gets me with my video processing.
Thanks still for making that possible on a mac. That Avisynth+ is running on my system is only thanks to you, too.