Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hrsmwithoutspook/4e091179512190fa94411817e6df8786 to your computer and use it in GitHub Desktop.
Save hrsmwithoutspook/4e091179512190fa94411817e6df8786 to your computer and use it in GitHub Desktop.
Tutorial for installing Aegisub on Apple Silicon Macs with VapourSynth

The Aegisub macOS (Apple Silicon) Install Tutorial

idea is for this tutorial to be out of date one day

Doesn't Aegisub already work on macOS??

Partially. You can 100% go and download either arch1t3cht's fork or the official 3.4.2 and both will open in macOS out of the box, but you are limited to ffms2 as your video provider and both apps are more designed for the Intel (x86-64) versions of macOS rather than the new Apple Silicon (ARM64) devices, meaning that VapourSynth will not work on these versions as-is. If you are using an x86-64 Mac I'd 100% recommend using these official sources, and you can find good sources for VapourSynth packages here. (These packages will not work on Apple Silicon Macs!)

This tutorial is designed for those that would rather use a more accurate video provider with built-in keyframe & VapourSynth support on Apple Silicon compared to FFmpegSource.

Building Aegisub with VapourSynth on arm64 macOS

To start of with you'll need the Homebrew package manager and you'll want to install some of the packages we'll need to actually build Aegisub in the first place. (if you want to install bestsource now would also be the time to do it)

make sure you do not have WxWidgets installed via Homebrew or compilation will fail at the linking stage; let meson do it for you!
brew install [email protected] zimg luarocks ninja
pip3 install meson
luarocks install luafilesystem 1.8.0
luarocks install moonscript --dev
brew install libass zlib ffms2 fftw hunspell
brew install pulseaudio vapoursynth

then clone arch1t3cht's fork of Aegisub:

git clone https://github.com/arch1t3cht/Aegisub/
cd Aegisub

This version of Aegisub won't work with VapourSynth out of the box on ARM64 Macs. You'll want to edit src/vapoursynth_wrap.cpp to point to your VapourSynth install location (which if done via Homebrew should be at /opt/homebrew/lib/), scroll down until you find an __APPLE__ ifdef command and modify accordingly: (don't remove any lines)

#ifdef __APPLE__
#define VSSCRIPT_SO "/opt/homebrew/lib/libvapoursynth-script.dylib"

Once that is done you can return back to the command line to setup & build Aegisub:

meson setup build_static -Ddefault_library=static -Dbuild_osx_bundle=true -Dlocal_boost=true -Dvapoursynth=enabled --force-fallback-for=ffms2 -Dbuildtype=release
meson compile -C build_static
meson compile osx-bundle -C build_static

you should get the app in the build_static folder, but if you want the DMG installer as well (ignore any errors here)

meson compile osx-build-dmg -C build_static

Once opening Aegisub if you decide to use Vapoursynth as your video provider (recommended) make sure to change your keyframe settings to ALWAYS or just leave it commented out, the app is known to crash if this setting is set to ASK on macOS for some reason. Also make sure that the OS doesn't try and convert quotation marks into their fancy equivalents (shouldn't be an issue anymore)

Adding Video support with L-SMASH Source

This part of the tutorial is mostly based off my old ramblings I made a while back if you want more infomation.

On ARM64 Macs we are basically limited to l-smash or ffms2 as video libraries at the moment (I do know BestSource is possible but nobody has gotten it to work with Aegisub on macOS as of now). I much prefer lsmas but it is a pain to install on the OS (especially now Homebrew no longer has the l-smash package)

So to start with we'll just need to build l-smash ourselves (+obuparse cause AV1 support)

git clone https://github.com/l-smash/l-smash.git
cd l-smash
./configure
make lib
sudo make install-lib
cd ..

git clone https://github.com/dwbuiten/obuparse.git
cd obuparse
make libobuparse.a
sudo make install-static
cd ..

now I'd recommend using this modified L-SMASH Source ready to go but if you want a full explanation my original google doc is still up-to-date on all the changes made to the HomeOfAviSynthPlusEvolution fork that will allow a successful build on ARM64 macOS. Once you've gotten a L-SMASH Source that will build on macOS you'll want to do the following to install it to a place where Aegisub will find it (after cd'ing into the folder):

cmake .
make C_INCLUDES="-Iinclude -I/usr/local/include -I/opt/homebrew/include"
sudo make install
cd ..

This will install the package and should open files as-is in Aegisub (you may want to disable loading audio through VapourSynth if you run into issues with bas and use FFmpegSource instead on the audio side).

If you run into any issues feel free to DM me on Discord (username: hrsm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment