-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS build #36
Comments
If you're willing to help with making a macOS build, that'd be great! I haven't been able to do so myself because I don't have any Apple hardware. What kinds of errors are you getting? Have you installed the gstreamer development headers as well or just the binaries? |
I have gstreamer and gstreamer-development installed using brew. Right now, the package There is an issue on the repo asking about Apple Silicon compatibility here: verpeteren/rust-simd-noise/issues/52 where it's mentioned that it should work if support for Apple Silicon is added to the simdeez project. An issue there, arduano/simdeez/issues/61 seems to indicate that support is already included. I'll try to see if I can get these running on Apple Silicon and go from there. If you have any advice or suggestions I'm definitely able to follow them and report back with my results! EDIT: Simdeez seems to compile fine by cloning the repository and building for apple silicon with I was actually able to get |
What about Mac intel? |
That simdnoise issue is annoying. It looks like the last version was published 3 years ago and the port to a version of simdeez which supports arm64 is a WIP still. Even so, there's a scalar fallback that should work in the absense of a specific SIMD version for a given platform. I'm not sure why that's not being used; I'll try to investigate. |
Is there another library that could be used to generate noise, that is as fast as I am not an expert at Rust by any means, and have an extremely limited knowledge on video processing, but I've forked I'd also like to say thanks again for all the hard work, and for your willingness to work towards improving accessibility for the project. I would love to use this either standalone or as an OFX plugin on my MacBook Pro. I think if it was working it would be the best VHS emulation effect available on Apple Silicon. I have tried Maxon's Universe 'VHS' and it is not cheap and also does not look anything like VHS... |
Crazily enough I actually got it running now by using noise-rs in place of Something to note: the current version of gstreamer that is provided by brew at the moment is broken.. so I had to manually install gstreamer and add the following environment variables to
Building the project with Render time was 20 seconds for a 30 second 1920x1080 video with the following settings: |
I tried using FastNoiseLite but it was substantially slower--10.2ms/frame vs 6.8ms/frame on my built-in benchmark. You can see my code on the You can run the benchmark with |
Good to know! I ran the benchmark myself just now and got 20ms~. You are right, it is substantially slower than Relatively speaking, it is still plenty fast enough for my own use cases! For real world practical example, I was able to render out a 3m49s long 1920 x 1080 video @ 23.98 fps in one minute! I had a feeling that this library would be slower, but until Another thing to note is that the OpenFX version does not seem to be working either, which I will try to work on maybe at some point. I think it is because MacOS OFX plugins expect .plist files and some other stuff. I tried putting the bundle in my OFX folder but DaVinci Resolve did not like it and gave the very useful error message in log: Thanks again! |
I'm working on an simdnoise port that uses a different SIMD library that supports arm64 and properly falls back to scalar operations. I'll let you know when that's done. |
Try pulling the latest main branch; I've updated it with my own fork of simdnoise. Let me know if it works, and how well the benchmarks run if so. |
That was fast! It is compiling successfully now! The benchmark is reporting 10ms, twice as fast as my version using the However, there is a bug with the 'edge wave' feature now. When enabled, the preview screen goes black, and I am only able to see part of the screen with very low settings. It looks like it is creating black lines that go through the entire picture from edge to edge. Turning the frequency all the way up makes the black lines thinner, allowing me to see more of the image, but all of the other parameters have to be turned all the way to their lowest setting for me to see anything (besides for speed, which seems to be working correctly). |
I missed some incorrect casts in the original code (they were float-to-int conversions but should've been float-to-int bitcasts) which seem to produce NaNs only on ARM. Try again with the latest main branch, and run the benchmark again--NaNs may have different performance characteristics. |
It's working perfectly now! Thank you so much for the hard work! 😄 I will try to work on something at some point to give back to the project. Really! Please let me know if there is anything else I can do to help. Thanks again! |
Since you have an ARM processor, can you try running the benchmark on the main branch then comparing it to the simd branch? I implemented a SIMD version of the IIR filter and it's faster on x86_64, but I don't have any ARM hardware to test with. |
Great work! On my end the main branch performance: |
hi, is there instruction how to run this on macos? |
I haven't tried it myself, but these instructions should help. Essentially, you'll need to install GStreamer (use the development installer), add some variables to your |
It's also necessary to clone the openfx repo into edit: i've included full and thorough instructions on compiling for apple silicon below |
Apple Silicon InstructionsBefore continuing, I feel it's necessary to mention that I am not using Apple's Clang compiler. If this is your first time compiling Rust or C/C++ projects from source, I would highly recommend installing LLVM to use instead of Apple's native Clang compiler that ships with Xcode. This will save you A LOT of headaches!! If you do not have LLVM or Rust installed yet I have included instructions on how to do this as well in order to be completely comprehensive. Installing LLVM may not be necessary for compiling nstc-rs, but since this is the environment I compiled it in, I wanted to note this in these instructions. LLVM & Rust
which should return something similar to:
If it does not return this, reload your Terminal or in your
then executing the commands should return the proper result.. Ok now onto the real reason you are here :).. Compiling ntsc-rs
Please let me know if there are any issues with these instructions!! I tried to be as thorough as possible, and I will be sure to update them if I missed anything! Another thing that I think is worth noting from these instructions is how difficult / intimidating it could be for a beginner wishing to use ntsc-rs and needing to compile it from source in order to use it. I am not completely familiar with all the solutions that exist for releasing binaries across multiple different architectures but I believe it's possible to utilize Github Actions with something like cross. Here is something I found that may be useful if this is even possible or anything that the developer is interested in. Again big thanks to @valadaptive for all the hard work and willingness to get this working on Apple Silicon! Hope my instructions can be helpful to someone! |
how to compile on intel mac? |
I think the above instructions should work pretty much the same; just replace all instances of
I definitely want to get something like that set up in the future. There are a few hurdles to overcome:
|
I've been able to compile the standalone executable on apple silicon with homebrew's gstreamer using apple clang (not homebrew clang, it might work but I haven't tried it). No extra environment variable tinkering was necessary, all I did was clone the repo, ran cargo version: output of
|
Thanks to everybody for their hard work on this! I had a question for @thomasza92 I also noticed this appears in my Terminal when I open it - /Users/trevva/.zshrc:12: unmatched " |
Yes, there should be an executable named ntsc-rs-standalone there. Are you getting any errors from |
Thanks for your quick response @valadaptive
I've also supplied an image below of my User directory incase the .zshrc, or other hidden files, are not in their correct place? |
You need to be cd'd into the repository directory itself. |
Thanks again @valadaptive and apologies for that basic mistake and I think this should be the command below?
However I am getting some errors in the build and maybe I'm still missing a simple fix?
|
Thanks for those suggestions, but I'm still getting errors.
The other thing that might be causing issues is that when I open Terminal there is already a note for the last line in .zshrc. Not sure if that is causing issues and if it needs to be resolved?
|
@valadaptive I appreciate your time on this and don't want to take up any more of your time until I've had a thorough look over everything. |
So I haven't read through this entire chain as it's rather long but I would like to point people in the direction of the new and improved rust AE bindings, This fork contains build scripts that I have gotten to work on both Windows and MacOs. It uses Lipo to build universal binaries so you only need one MacOs distributable, and it completely handles compiling the PiPl for you. It also contains scripts for writing the plugin bundle and signing it with a development cert! The maintainer has graciously translated tons of examples from adobe, it might be worth a look. |
Sorry for my absence! I hope you were able to get this to work! It looks like according to @theofabilous it should be possible to compile with apple clang and no extra steps to compile so I would definitely go for that route instead 😁 there are some silly mistakes in my instructions that should prolly be updated anyway (like not pointing to a specific version of llvm or any brew installed software in .zshrc since every time you update it will break the links). Let me know if you still need any help.
I have a development cert and wouldn't mind signing for this if there was an efficient way to produce binaries for Apple Silicon + AE + OFX, especially since it sounds like AE might be easier to implement now but that still leaves automated building and OFX up in the air. I was particularly interested in using as an OFX plugin myself but when I looked into it before it seemed like it would be a lot of trouble to get it to work with Apple Silicon. |
Hi! Good to hear from you. In the past couple months, I purchased a Mac Mini and got the standalone application and OpenFX plugin building on macOS--see the All that remains is:
I might look into the Rust bindings for AE a bit more in the future--I checked them out a bit ago but was worried the build process might be too inflexible (e.g. I might run into an obscure error within their build process and have no way to fix it). If you could test out the After Effects plugin for me once I have it building, that would be greatly appreciated! |
Sounds great! Hope you are enjoying the Mac Mini! Once I have a moment I'll be sure to checkout the new branch and give the OFX plugin a test run 😄. I also have no problem testing the AE plugin in the future or any other testing you may need done just let me know! Cheers! |
Hey @thomasza92! I've rewritten the AE plugin in Rust, and I'm hoping you can test it out for me. If you want to test out my other build scripts while you're at it, that would be appreciated (hopefully it should be straightforward). There are some Cargo "scripts" on the cargo xtask macos-bundle --release # for the standalone application
cargo xtask build-ofx-plugin --macos-universal --release # for the OpenFX plugin
cargo xtask macos-ae-plugin --macos-universal --release # for the After Effects plugin. The OpenFX plugin will be under They're not signed yet; you should be able to sign them using something like this snippet (the plugin path should be Thanks so much for helping out with this process! |
Howdy! Been following this. I am a Resolve user, would love to text OpenFX Mac version if you need momre testers. Tried to build using the above instructions but was getting errors. |
I've added updated macOS build instructions in the documentation. Try following those and let me know if it works (and provide the error messages if it doesn't). |
I've produced a build of ntsc-rs for macOS that runs on my computer (standalone, OpenFX, and After Effects/Premiere). However, I'm not sure if it works on anyone else's computer, both because there is no code signing and because I haven't tested it on Apple Silicon. If you'd like to help me test it out, here's the latest build. Let me know:
I'd like to fill out the full matrix of platforms:
|
@larsjaakko The plugin doesn't "run" per se--are you getting this error when you try to open the .plugin file, or when you open After Effects? You need to install it to Does it show up in the Stylize category of the effects pane if you do so? |
@valadaptive Apologies for the vague description — it was installed in the appropriate plugin folder, but the above dialogue pops up immediately on starting After Effects. After clicking it away a few times I was able to open a project and try applying it — so it does indeed appear in the effects pane. Trying to run it does trigger the same dialogue, however, in addition to a few AE specific ones complaining about not being able to run the plugin file. |
Reporting in: The MacOS Standalone seems to be working just fine after some testing. It does prompt an error at first startup due to it not being signed by a developer but that can be bypassed by right clicking on the application and clicking "open". You are then given the opportunity to open regardless of the signature or lackthereof. The OpenFX bundle is not being recognized by Resolve so I am unable to test it. |
@larsjaakko If you go into the Privacy & Security settings (in System Settings), is there an option to allow the plugin to run (via the Open Anyway button)? You may need to get the dialog to appear again--apparently the option only shows up for about an hour afterwards. @winterwarrior3 Ditto with Resolve--do you get a "cannot be opened" dialog when you open Resolve? You may need to re-enable the plugin under the "Video Plug-ins" settings page to get the dialog to appear, and once more after allowing it to run in System Settings. It may also be related to whether you installed the App Store version of Resolve or not. I'm trying to figure out the best way to release this before I can get a developer certificate--for bureaucratic reasons, it may take a while. |
I’ll try that! That may be the issue.
What does it take to get a developers certificate?
… On Thursday, Jul 11, 2024 at 4:45 PM, valadaptive ***@***.*** ***@***.***)> wrote:
@larsjaakko (https://github.com/larsjaakko) If you go into the Privacy & Security settings (in System Settings), is there an option to allow the plugin to run (via the Open Anyway button)? You may need to get the dialog to appear again--apparently the option only shows up for about an hour afterwards.
@winterwarrior3 (https://github.com/winterwarrior3) Ditto with Resolve--do you get a "cannot be opened" dialog when you open Resolve? You may need to re-enable the plugin under the "Video Plug-ins" settings page to get the dialog to appear, and once more after allowing it to run in System Settings. It may also be related to whether you installed the App Store version of Resolve or not.
I'm trying to figure out the best way to release this before I can get a developer certificate--for bureaucratic reasons, it may take a while.
—
Reply to this email directly, view it on GitHub (#36 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/A3EI2NWGHMOML5ZYHVQTEKLZL4KLNAVCNFSM6AAAAABC2GWTYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRUGEZDMNJWHA).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
$99/yr, plus your legal name on all the software you publish under it. |
What’s your best email to contact you? I have an idea.
…--
Sent from Canary (https://canarymail.io)
On Thursday, Jul 11, 2024 at 4:54 PM, valadaptive ***@***.*** ***@***.***)> wrote:
>
> What does it take to get a developers certificate?
>
$99/yr, plus your legal name on all the software you publish under it.
—
Reply to this email directly, view it on GitHub (#36 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/A3EI2NT5BX7TXRK3NAHJ5OLZL4LKHAVCNFSM6AAAAABC2GWTYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRUGEZTENRQHE).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
My username [at] protonmail dot com |
@valadaptive Success! It worked perfectly, and so far works fine in testing with various videos. EDIT: getting some sudden crashes on a somewhat complex composition, no crash logs. Will revert to using the standalone to pre-process the videos for now — let me know if there's anything I can provide in terms of debugging. |
@valadaptive — Emailed you. Also, after removing the bundle and then re-adding it— I was able to get MacOS to prompt me to "Open Anyway" in Privacy & Settings. It works like a charm now after a restart in Resolve. No issues yet! |
@larsjaakko Try installing the debug version of the plugin--let me know if it gives any error messages before crashing: If you could provide a reduced test case .aep for me to reproduce the issue, that'd be great as well. How often does it crash, and is there any discernable pattern to it? |
@larsjaakko Have you had a chance to test out the debug version of the plugin? I want to get the After Effects plugin fixed up before making a new release. |
I think I found the issue with the After Effects plugin. If anyone was having trouble, try installing the latest version and let me know if it improves things. |
@valadaptive Apologies for the radio silence! I've been in the middle of moving countries, so notifications took a back seat. Just installed the new version, and no crashes to report in about 2 hours of work or so. Previous version crashed several times within a few minutes. Looking very good so far! |
Works over here too! 🚢 |
I've released official macOS packages in v0.8.0. Running the installers will require some fiddling with Gatekeeper, but once installed, they should work fine with video editing software. I'm closing this issue since macOS builds have been released now, but let me know if you run into any issues with them. |
go to Settings -> Security & Privacy -> click on the lock -> allow the plugin |
Hi,
Great work. Was just wondering if it's possible to get this working on Apple Silicon? I tried to build from source (cargo build) with gstreamer installed via brew but was met with something like 700+ errors.
I wouldn't mind helping to test or patch either!
Thanks
The text was updated successfully, but these errors were encountered: