lossless-cut icon indicating copy to clipboard operation
lossless-cut copied to clipboard

Support Apple Silicon M1

Open mifi opened this issue 4 years ago • 9 comments

Need support from Electron, m1 ffmpeg static binaries and possibly Github Actions. Maybe the greatest benefit will come from being able to run m1 ffmpeg, because ffmpeg is doing all the hard work.

ffmpeg

  • ffmpeg static build doesn't prebuild for m1 yet: https://ffmpeg.org/download.html
  • homebrew has m1 support https://github.com/Homebrew/homebrew-core/blob/master/Formula/ffmpeg.rb
    • cannot release these builds on the mac app store, need custom build
  • [ ] Could build ffmpeg for M1 with ffmpeg-build-script, but GitHub Actions does not support M1 yet https://github.com/actions/virtual-environments/issues/2187

electron

  • [x] electron-builder https://github.com/electron-userland/electron-builder/issues/5689
  • [x] Electron now supports m1 https://www.electronjs.org/blog/apple-silicon
    • [ ] need to upgrade electron #714
  • [ ] trash needs to be tested https://github.com/mifi/lossless-cut/blob/4fb8f64f31d39683b8a5441c39552310b70f558c/package.json#L145 (or remove it)

mifi avatar Feb 05 '21 10:02 mifi

Apple Silicon support would be AMAZING!!!!

M1 is very power efficient and with GREAT performance especially on all media related tasks!

ffmpeg m1 is possible with homebrew btw ;-)

dia3olik avatar May 01 '21 18:05 dia3olik

+1 for native Apple Silicon support.

JFY ffmpeg is available in arm64 from homebrew install:

file (which ffmpeg)
/opt/homebrew/bin/ffmpeg: Mach-O 64-bit executable arm64

sparanoid avatar Jan 21 '22 05:01 sparanoid

That's cool! Still waiting for github actions to support m1 so i can build ffmpeg for m1 too https://github.com/mifi/ffmpeg-build-script May be possible to build it otherwise but I don't have the apple silicon hardware yet

mifi avatar Jan 21 '22 14:01 mifi

ok, now we got linux arm64/aarch64 build, so what is the state and progress of of this software for M1 Silicon support?

DaveFlashNL avatar Apr 16 '22 13:04 DaveFlashNL

See above list, still waiting for github actions to support m1 to be able to build our custom ffmpeg version: https://github.com/actions/virtual-environments/issues/2187

mifi avatar Apr 16 '22 14:04 mifi

See above list, still waiting for github actions to support m1

wait what? github' builder tool doesn't support it yet? how come?

DaveFlashNL avatar Apr 16 '22 15:04 DaveFlashNL

if we just need ffmpeg for M1, can we use this one? http://www.osxexperts.net or https://ffmpeg.martin-riedl.de

AntiVirtual avatar Jul 02 '22 09:07 AntiVirtual

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

lijutsang avatar Jul 02 '22 09:07 lijutsang

Need to build a custom stripped-down ffmpeg for MacOS because Apple is quite strict with their notarization/validation of apps https://github.com/mifi/ffmpeg-build-script

Looks like github actions might support M1 in september according to some rumors in their issue

mifi avatar Jul 02 '22 19:07 mifi

Great software, thanks for your work! Has there been any update on Silicon support?

mcp73 avatar Nov 05 '22 02:11 mcp73

Github doesnt yet have apple silicon runners, and I’m a bit hesitant to set up my own servers for this, so ffmpeg silicon support will depend on that. However losslesscut itself will support silicon when i upgrade electron, which is the highest priority now.

mifi avatar Nov 05 '22 15:11 mifi

Github doesnt yet have apple silicon runners

Maybe the correct question to ask is if lossless-cut can be compiled to run natively on Silicon?

As an example, there is a project by dbrookman (see link below) that has a simple script to build the video player mpv, which is also based on ffmpeg. Would a similar build method work for lossless-cut?

How to build mpv & mpv.app on an Apple silicon (M1 / M2) Mac: https://gist.github.com/dbrookman/74b8bcfb37a23452f7137b83bca9580f

Edit: I just saw above where you said, "cannot release these builds on the mac app store", so i'm sure a lot more to it than i'm aware of. If you look through the comments of the project by dbrookman, he does show how to do a static build of an .app bundle free of any dynamically-linked dependencies from Homebrew and ffmpeg. If I could build it myself on Silicon via a script, that would suffice.

mcp73 avatar Nov 06 '22 13:11 mcp73

I think currently it cannot be compiled to run natively on Silicon, but after upgrading Electron, losslesscut itself can be compiled natively for silicon.

As for "cannot release these builds on the mac app store", I'm referring to losslesscut's ffmpeg builds. I cannot use other people's silicon ffmpeg builds, I need to compile them myself due to certain flags needed for Mac App Store.

You can see here how I build ffmpeg: https://github.com/mifi/ffmpeg-build-script however as said github doesn't support Silicon yet so i cannot build ffmpeg for silicon yet.

mifi avatar Nov 08 '22 14:11 mifi

I've now got an m2 macbook and have now built a custom ffmpeg using https://github.com/mifi/ffmpeg-build-script, so I'm trying to build for silicon in the next release!

mifi avatar Nov 23 '22 05:11 mifi