News:

--

Main Menu

Apple Silicon (ARM) support

Started by mondego, January 14, 2021, 02:44:42 PM

Previous topic - Next topic

Silicon Apple

Installed Command Line tools, Homebrew...
I followed Macvided's example above and was able to compile and run Avidemux on my M1 Mac Studio, but with OpenGL as the setting for Display->Video Display, all I get is a blank screen for the video.  If I set Video Display to QT it displays the video correctly. The audio displays fine with either setting.

What did I miss?

Thanks,

eumagga0x2a

OpenGL display is broken with Qt6 >= 6.4.0, no idea how to fix yet. For macOS where using older Qt, especially Qt5, is impossible, the unaccelerated "Qt" / "RGB" display the only remaining option.

By the way, this is also the reason there is no 2.8.2 release.

Silicon Apple

I had to also install pkgconf with homebrew before compiling.
HOMEBREW PKGCONF

Quote from: macvided on February 16, 2024, 12:25:58 PMJust to say I had success building on an M1 mini running Sonoma 14.3.1 with XCode 15.2 using the instructions above, with git master (2.8.2) and brew as of 16th Feb.

First I created a case-sensitive volume, then using the process in Darren's post 18 above:

cd /Volumes/Developer
git clone https://github.com/mean00/avidemux2.git
cd /Volumes/Developer/avidemux2

git submodule update --init --recursive

brew install cmake nasm yasm qt xvid x264 x265 libvpx aom opus fdk-aac lame libass mp4v2 a52dec

bash bootStrapMacOS_Monterey.arm64.sh

Then open the dmg, and install the app to /Applications, and finally run the signing script.

sh avidemux/osxInstaller/macos-adhoc-sign-installed-app.sh

Thanks everyone that's worked on this!

eumagga0x2a

No need to run signing script manually, it is invoked automatically during packaging now.

Will look into pkg-config not installed automatically and thus missing in the list of dependencies.

eumagga0x2a

Quote from: eumagga0x2a on November 26, 2024, 09:44:04 PMOpenGL display is broken with Qt6 >= 6.4.0, no idea how to fix yet.

Fixed by this commit, haven't noticed any performance degradation on macOS. Please pull the latest changes into your local git clone and redo the build, OpenGL display should be fine now.

Silicon Apple

Quote from: eumagga0x2a on December 08, 2024, 11:31:28 PMFixed by this commit, haven't noticed any performance degradation on macOS. Please pull the latest changes into your local git clone and redo the build, OpenGL display should be fine now.

Yep, works!  Thank you!

rogerawong

Hey! With all the warnings my Mac OS has given me about how my avidemux binary is going to stop running when Apple deprecates x86 support, I figured I better build an ARM native version to head that off. Found and fixed some issues and it now builds.

The current master fails to build natively on Apple Silicon with Homebrew due to two new issues:

Linking:

The SDL3 link sites use the bare library name, and /opt/homebrew/lib  isn't in the default linker search path on Apple Silicon.

ld: library 'SDL3' not found
make[2]: *** [ADM_render_qt/libADM_render6_QT6.dylib] Error 1


Packaging:

fixup_bundle's search dirs hardcode /usr/local/lib, the Intel Homebrew prefix.

CMake Error at BundleUtilities.cmake:725 (message):
  error: otool-classic: can't open file:
  @rpath/QtCore.framework/Versions/A/QtCore (No such file or directory)

Here are the fixes for them

I've submitted both fixes as https://github.com/mean00/avidemux2/pull/555. Until it's merged, you can build today with:

git clone https://github.com/mean00/avidemux2.git
cd avidemux2
git fetch origin pull/555/head:pr555
git checkout pr555
bash bootStrapMacOS_Monterey.arm64.sh


Verified on macOS 26.5 (M-series), Homebrew Qt 6.11.1 / SDL3 3.4.14, CMake 4.4.2: clean bootstrap run through DMG creation and ad-hoc signing, all-arm64 bundle, app launches and a copy/copy cut saves and probes clean. No extra environment variables needed.