Avidemux Forum

Avidemux => MacOSX => Topic started by: mondego on January 14, 2021, 02:44:42 PM

Title: Apple Silicon (ARM) support
Post by: mondego on January 14, 2021, 02:44:42 PM
Any plans to support ARM for the next release?
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on January 14, 2021, 03:48:19 PM
Avidemux runs natively on ARM/Linux, albeit with limitations due to assembly in Avidemux itself (not in bundled libraries) being x86-only. There are no official builds, that's all. However, it is very uncertain whether any development will happen targeting ARM/macOS.
Title: Re: Apple Silicon (ARM) support
Post by: Barbarossa on February 23, 2021, 02:11:53 PM
Would love to see ARM support on the Mac.
I tried to compile it but failed, I've replaced the built in ffmpeg with the one bundled with Homebrew, and then figured out how to use Homebrew's libav, but then had some more issues with the build using x86 instead of ARM (seems to be hardcoded somewhere) - and gave up on it, was too time consuming.
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on February 23, 2021, 04:11:55 PM
Quote from: Barbarossa on February 23, 2021, 02:11:53 PMI tried to compile it but failed

What was the exact error message? Did you change MACOSX_DEPLOYMENT_TARGET, currently hardcoded in bootStrapOsx_Catalina.bash to Catalina (10.15) to the default value as reported by

xcrun --sdk macosx --show-sdk-version?

Quote from: Barbarossa on February 23, 2021, 02:11:53 PMI've replaced the built in ffmpeg with the one bundled with Homebrew

I really wonder how you accomplished that as Avidemux relies on a patched version to access some useful private functions.
Title: Re: Apple Silicon (ARM) support
Post by: Who on June 19, 2021, 07:48:40 PM
Since this topic has not been updated in several months let me ask, has there been any progress on creating an official build for Apple Silicon?  I ask because the Mac I have been using might be starting to have hardware issues (all I know for sure is that it has been freezing up and crashing a lot lately), and I have no idea how to compile Avidemux or anything else on a Mac.  So basically what I am taking away from this thread is that if I were to get a new Mac with Apple Silicon I would no longer be able to use Avidemux, unless something has changed since February.  Is that correct, or am I missing something here? How about running a current Apple version of Avidemux using Rosetta, does that work well or are there issues with that?
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on June 19, 2021, 10:59:10 PM
Quote from: Who on June 19, 2021, 07:48:40 PMhas there been any progress on creating an official build for Apple Silicon?

I would claim with a high degree of certainty that official native builds for Apple Silicon are technically impossible, at least for now.

The only Apple hardware I own is a 2016 MBP which has proven pretty useful during the pandemic for Zoom meetings. It is also my only device to test Avidemux on Windows 10. As long as it works, it works. No strategy exists for the case of a hardware failure yet, I personally don't depend on any software which is macOS-only.

Quote from: Who on June 19, 2021, 07:48:40 PMHow about running a current Apple version of Avidemux using Rosetta

I hope very much that it will work, at least in some basic way (not sure that OpenGL will work, the same for VideoToolbox).

Quote from: Who on June 19, 2021, 07:48:40 PMdoes that work well or are there issues with that?

I'm entirely dependent on feedback from Avidemux users who have Apple Silicon hardware. There hasn't been any so far.
Title: Re: Apple Silicon (ARM) support
Post by: lemongrab on June 27, 2021, 03:44:58 AM
Quote from: eumagga0x2a on June 19, 2021, 10:59:10 PM
Quote from: Who on June 19, 2021, 07:48:40 PMhas there been any progress on creating an official build for Apple Silicon?

I would claim with a high degree of certainty that official native builds for Apple Silicon are technically impossible, at least for now.

The only Apple hardware I own is a 2016 MBP which has proven pretty useful during the pandemic for Zoom meetings. It is also my only device to test Avidemux on Windows 10. As long as it works, it works. No strategy exists for the case of a hardware failure yet, I personally don't depend on any software which is macOS-only.

Quote from: Who on June 19, 2021, 07:48:40 PMHow about running a current Apple version of Avidemux using Rosetta

I hope very much that it will work, at least in some basic way (not sure that OpenGL will work, the same for VideoToolbox).

Quote from: Who on June 19, 2021, 07:48:40 PMdoes that work well or are there issues with that?

I'm entirely dependent on feedback from Avidemux users who have Apple Silicon hardware. There hasn't been any so far.


Silicon user here (cheapest Macbook Air). Found this thread today while searching about compatibility.

Installed it and it seems to be working fine for me. But, I'm a very simplistic user, so YMMV.

Thanks for a great program!
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on June 27, 2021, 07:54:53 AM
Could you please check that OpenGL (video display: "QtGl") and the hardware accelerated video decoding ("VideoToolbox") for H.264 / HEVC video tracks work?
Title: Re: Apple Silicon (ARM) support
Post by: Whiskydrinker on November 17, 2021, 09:19:12 AM
Quote from: eumagga0x2a on June 27, 2021, 07:54:53 AMCould you please check that OpenGL (video display: "QtGl") and the hardware accelerated video decoding ("VideoToolbox") for H.264 / HEVC video tracks work?
I recently also upgraded my Mac to Apple Silicon. Rosetta2 actually works pretty well. So to answer you question, I set:

Display
-> Video display: OpenGL
-> Guid Rendering Options: Checked Enable openGl support

HW Accel:
-> Checked Decode video using VideoToolbox

Everything works fine with a sample MP4 file.
Title: Re: Apple Silicon (ARM) support
Post by: trigger2k23 on March 07, 2023, 09:13:11 AM
Hello,
i like avidemux, is there any updates regarding native apple silicon support?

Thanks
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on March 07, 2023, 11:49:20 AM
I didn't check that it still builds for a while, but in principle, you should be able to compile and run it as long as you don't try to create a self-contained app bundle (pass --nopkg as option to bootStrapMacOS_Monterey.arm64.sh).

No work has been put into solving the issue of inability to run self-contained app bundle due to invalidated signatures of fixed up Homebrew libraries, thus no proper packaging and no distribution possible.

The performance of a native build on a M1 Mac Mini was formidable last time I checked.
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on March 07, 2023, 12:00:49 PM
Just to save you a big head-scratching moment when trying to compile Avidemux on macOS/arm64: Avidemux source and build directories must be located on a case-sensitive filesystem. By default, Apple creates APFS volumes in case-insensitive mode. You will need to create a new, case-sensitive one, e.g. as a subvolume and only then clone the source etc.
Title: Re: Apple Silicon (ARM) support
Post by: trigger2k23 on August 05, 2023, 11:59:41 AM
Hello Folks,
since they have been successfull builds, can we have a compiled version for uns normal mortals ?  ;D

Nice Weekend,
Thanks trigger2k3
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on August 12, 2023, 10:51:26 PM
Quote from: trigger2k23 on August 05, 2023, 11:59:41 AMsince they have been successfull builds

Actually, build has turned out to be broken on Ventura with the current MacOS SDK so that it is necessary to request an older one as far as such a SDK is present on the system. Again, creation of an app bundle is not possible (yet).

Quote from: trigger2k23 on August 05, 2023, 11:59:41 AMcan we have a compiled version for uns normal mortals ?

No app bundles – no compiled distributable versions no matter whether normal or abnormal mortals.
Title: Re: Apple Silicon (ARM) support
Post by: trigger2k23 on October 23, 2023, 02:52:53 PM
Hi eumagga0x2a,
any updates if a build is possible ? BTW, when i choose
HW Accel:
-> Checked Decode video using VideoToolbox
then runs at least the decoding part native ?

Cheers
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on October 23, 2023, 07:08:19 PM
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.
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on November 13, 2023, 12:41:08 AM
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.
Title: Re: Apple Silicon (ARM) support
Post by: darren on December 10, 2023, 02:06:58 AM
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:
Title: Re: Apple Silicon (ARM) support
Post by: darren on December 10, 2023, 02:15:22 AM
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
Title: Re: Apple Silicon (ARM) support
Post by: darren on December 10, 2023, 02:25:21 AM

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.
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on December 10, 2023, 01:13:54 PM
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.
Title: Re: Apple Silicon (ARM) support
Post by: darren on December 11, 2023, 02:35:51 AM
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? 


Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on December 11, 2023, 06:45:56 AM
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?
Title: Re: Apple Silicon (ARM) support
Post by: kadiwa on January 25, 2024, 01:03:27 PM
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.
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on January 26, 2024, 11:50:49 PM
Trust issues notwithstanding, I think that building and distributing anything older than the latest git master is wasted effort.
Title: Re: Apple Silicon (ARM) support
Post by: macvided on February 16, 2024, 12:25:58 PM
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!
Title: Re: Apple Silicon (ARM) support
Post by: eumagga0x2a on February 16, 2024, 09:51:24 PM
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.