News:

--

Main Menu

Apple Silicon (ARM) support

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

Previous topic - Next topic

eumagga0x2a

Quote from: trigger2k23 on October 23, 2023, 02:52:53 PMany updates if a build is possible ?

Nope, no solution yet for build with SDK > 12.3. App bundle creation is broken too, at least on Sonoma arm64 (this is new), it fails due to some dependencies not resolved. This is all even before the question of code signing can arise. If I am not mistaken, with all these issues resolved, a user who has downloaded Avidemux for macOS arm64 app (unsure about disk image) would need to sign it ad hoc to be able to run it:

codesign --force --deep -s - ThePathToAvidemuxAppBundle.app
AFAIK this would be the best possible scenario.

Quote from: trigger2k23 on October 23, 2023, 02:52:53 PMwhen i choose
HW Accel:
-> Checked Decode video using VideoToolbox
then runs at least the decoding part native ?

Whatever happens inside the graphics driver and the intermediate layer, that exposes the VideoToolbox interface to applications, runs natively, of course.

eumagga0x2a

Build with SDK >= 13 has been fixed while app bundle creation turns out to be working now (currently on Sonoma with MacOS SDK 14). Manually ad hoc signing bundled frameworks post-installation results in a working Avidemux build.

darren

On Sonoma 14.1.1 on an M1 Max Macbook I made a APFS (case-sensitive) volume via Disk Utility then built avidemux as follows:

darren

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

git rev-parse HEAD
88e745f0af2457a007c805fa8dfd55cf12cb9109

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

CPack: - package: /Volumes/sourcecode/avidemux2/installer/Avidemux 2.8.2 Qt6 231209-19h08m_88e745f0af2.dmg generated.
  ** ALL DONE **

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

darren


I am getting this error when signing:

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

/Applications/Avidemux_2.8.2.app/Contents/MacOS/Avidemux2.8: bundle format unrecognized, invalid, or unsuitable
In subcomponent: /Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtDBus.framework

Or if I try this:
codesign --force --deep -s - /Applications/Avidemux_2.8.2.app

I get either:
/Applications/Avidemux_2.8.2.app: replacing existing signature
/Applications/Avidemux_2.8.2.app: bundle format unrecognized, invalid, or unsuitable
In subcomponent: /Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtGui.framework
or

/Applications/Avidemux_2.8.2.app: replacing existing signature
/Applications/Avidemux_2.8.2.app: bundle format unrecognized, invalid, or unsuitable
In subcomponent: /Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtDBus.framework
The spam filter blocked me from saying all of this in a single message.

eumagga0x2a

Quote from: darren on December 10, 2023, 02:15:22 AMCPack: - package: /Volumes/sourcecode/avidemux2/installer/Avidemux 2.8.2 Qt6 231209-19h08m_88e745f0af2.dmg generated.
  ** ALL DONE **

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

Just to be sure, did you install the generated app bundle prior to running the code signing script? I cannot reproduce your results, the application can be subsequently launched and operated normally. The output of the code signing script begins with

% sh avidemux/osxInstaller/macos-adhoc-sign-installed-app.sh
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtCore.framework/Versions/A/QtCore: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtDBus.framework/Versions/A/QtDBus: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtGui.framework/Versions/A/QtGui: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtNetwork.framework/Versions/A/QtNetwork: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtOpenGL.framework/Versions/A/QtOpenGL: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtOpenGLWidgets.framework/Versions/A/QtOpenGLWidgets: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/QtWidgets.framework/Versions/A/QtWidgets: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/PlugIns/platforms/libqcocoa.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/PlugIns/platforms/libqminimal.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/PlugIns/platforms/libqoffscreen.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/PlugIns/styles/libqmacstyle.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM6avcodec.60.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM6avformat.60.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM6avutil.58.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM6postproc.57.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM6swscale.7.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_UIQT66.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_UI_Cli6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_audioParser6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_core6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreAudio6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreAudioDevice6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreAudioEncoder6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreAudioFilterAPI6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreDemuxer6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreDemuxerMpeg6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreImage6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreImageLoader6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreJobs.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreMuxer6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreScript.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreSocket6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreSqlLight3.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreSubtitles6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreUI6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreUtils6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreVideoCodec6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreVideoEncoder6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_coreVideoFilter6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_openGLQT66.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_render6_QT6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libADM_render6_cli.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libX11.6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libXau.6.0.0.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libXau.6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libXdmcp.6.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/liba52.0.dylib: replacing existing signature
/Applications/Avidemux_2.8.2.app/Contents/Frameworks/libaom.3.7.0.dylib: replacing existing signature

(The complete output is too long to be posted inline).

Quote from: darren on December 10, 2023, 02:25:21 AMOr if I try this:
codesign --force --deep -s - /Applications/Avidemux_2.8.2.app

This is not going to work and is precisely the reason the signing script has been created.

darren

Thanks! So that fixed the code-signing issue for me.

But unfortunately, now something else is wrong.
It breaks with Abort trap 6.
When you run it from the command line you get a bit more information:

/Applications/Avidemux_2.8.2.app/Contents/MacOS/Avidemux2.8
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""

I look around and see some strange symlinks:

ls -l /Applications/Avidemux_2.8.2.app/Contents/PlugIns/platforms
lrwxr-xr-x  /Applications/Avidemux_2.8.2.app/Contents/PlugIns/platforms -> ../../../Cellar/qt/6.6.0/share/qt/plugins/platforms

Those symlinks don't point to an extant directory.  I do have similar stuff in homebrew's directories:
ls /opt/homebrew/opt/qt@6/share/qt/plugins/platforms
libqcocoa.dylib     libqminimal.dylib   libqoffscreen.dylib
How best to build for Apple Silicon MacOS Sonoma? 



eumagga0x2a

On my M1 Mac mini / Sonoma:

% ls -l /Applications/Avidemux_2.8.2.app/Contents/PlugIns/platforms
total 2680
-rwxr-xr-x  1 username  admin  1082832 10 Dez 13:46 libqcocoa.dylib
-rwxr-xr-x  1 username  admin   107680 10 Dez 13:46 libqminimal.dylib
-rwxr-xr-x  1 username  admin   173776 10 Dez 13:46 libqoffscreen.dylib

On your system, the app bundle hasn't been fixed up properly, this is why you have symlinks pointing to the original location of the library. Have you installed Xcode or are trying to build Avidemux with CLT only?

kadiwa

In case someone wants to just download a build and they trust random people on the internet, here's my unofficial build of Avidemux 2.8.1 for AArch64: https://drive.google.com/file/d/1zj6buE9ls13nJUz08jZ2iJZQrImsCCl3

I hope it's fine to post this, I couldn't find any forum rules anywhere.
Note that you can of course use the official x86-64 build instead.

eumagga0x2a

Trust issues notwithstanding, I think that building and distributing anything older than the latest git master is wasted effort.

macvided

Just 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

Quote from: macvided on February 16, 2024, 12:25:58 PMI 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.

The confirmation that the build is currently not broken is much appreciated, thank you.

John Hagan

I have an M2 Mac Studio running Sonoma 14.5 (23F79), and when I try to use the VideoToolbox encoders now with the official version 2.8.1, I always get the error "Cannot set up encoder. The configuration supplied to the encoder may be incompatible or the encoder may depend on features unavailable on this system" whenever I attempt to Save Video.

I tried the unofficial build of Avidemux 2.8.1 for AArch64 posted by kadiwa, and that version did allow me to use VideoToolbox encoders on my M2 Mac Studio.

I think I recall using VideoToolbox encoders successfully on my M2 Mac Studio either with a previous version of Avidemux, or when I was running Ventura on the Mac. Either way, it was some time ago, so I'm not sure what changed between when it worked and now, but it would be great to get the VideoToolbox encoders working again. In particular, saves with the VideoToolbox HECV encoder are dramatically faster than the HEVC (x265) encoder.

bubbaprog

No longer building, with this happening

--  COMMAND ln -sf Resources/lib . COMMENT mklink Resources/lib -> ., pwd=/Volumes/SABRENT/avidemux2/installer/Avidemux-2.8.2.app/Contents/
-- * Copying plugins *
CMake Error at CMakeLists.txt:64 (FILE):
  FILE COPY cannot find "/opt/homebrew/share/qt/plugins

  platforms": No such file or directory.


eumagga0x2a

#29
Must have been fallout from https://github.com/mean00/avidemux2/commit/7df63b563ae89984169effca1c68964e574adee1, now fixed.

Thank you very much for your report.