superview icon indicating copy to clipboard operation
superview copied to clipboard

Superview GUI can't find ffmpeg on MacOS

Open AndreaB321 opened this issue 5 years ago • 11 comments

Hi there, any reason why the GUI based software can't find the ffmpeg, while the CMD one does work?

Screenshot 2020-12-22 at 15 10 29

AndreaB321 avatar Dec 22 '20 15:12 AndreaB321

I think this is related to the "Full Disk Access" privacy for macOS applications - it can't start other apps by default. If anybody knows a fix, please let me know.

Niek avatar Dec 22 '20 15:12 Niek

Hi Niek, I have grated the app access to full disk, but still doesn't work. Anything else you want me to try?

Screenshot 2020-12-23 at 09 10 28

AndreaB321 avatar Dec 23 '20 09:12 AndreaB321

I get the same error in my environment😭

スクリーンショット 2020-12-28 7 49 31

sceadu50ys avatar Dec 27 '20 22:12 sceadu50ys

At least the CLI version does work ok

AndreaB321 avatar Dec 28 '20 10:12 AndreaB321

@Niek how did you manage to have the GUI working on MacOS?

Screenshot 2021-03-22 at 07 42 43

AndreaB321 avatar Mar 22 '21 07:03 AndreaB321

@AndreaCCIE the workaround is:

  • Download latest version, e.g. https://github.com/Niek/superview/releases/download/v0.10/superview-gui-darwin-amd64-v0.10.dmg
  • Click the DMG so it mounts
  • Open a iTerm or Terminal session that has full disk access
  • Run: open /Volumes/Superview/*

I still need to figure out how to request full disk access from the app itself.

Niek avatar Mar 22 '21 07:03 Niek

Hi @Niek I did a little searching around and found a decent entry on the Apple Developer Forums that points to the issue.

Assuming most users on MacOS would have ffmpeg installed via homebrew you end up with one of two cases:

  • On Intel silicon you'd have ffmpeg at: /usr/local/bin/ffmpeg and symlinked to something like ffmpeg -> ../Cellar/ffmpeg/5.0/bin/ffmpeg
  • On M1 chips (ie. ARM) you'd have ffmpeg at: /opt/homebrew/bin/ffmpeg and simlinked similarly

Either way it looks like sandboxed apps like superview-gui one are held up because it would require dynamic extention access granted at runtime. That not something an unsigned app would get.

The reason it works from the terminal is likely due to the inheritance model. The terminal already has acces to ffmpeg and from there superview-gui does as well.

There's 2 good articles that also speak to the subject of embedding helper tools on a MacOs app:

I hope this helps.

AlfredJKwack avatar Apr 17 '22 11:04 AlfredJKwack

For anyone else on MacOS best you can do for now is to install the DMG like you would any other app. Once you've done that, create a script with the Script Editor and launch the app from the script instead. A little klunky but it gets the job done.

Here's 2 possible scripts depending on whether you have the standard Terminal.app or prefer the iTerm.app

Terminal.app version

tell application "Terminal"
	activate
	set shell to do script "open /Applications/superview-gui-darwin-amd64-v0.10.app" in window 1
end tell

iTerm.app version

tell application "iTerm"
	set newWindow to (create window with default profile)
	tell current session of newWindow
		write text "open /Applications/superview-gui-darwin-amd64-v0.10.app"
	end tell
end tell

You may have to run this a few time since the first time you'll run into the inevitable security gatekeeper and will have to authorize the app in the System Preferences.

AlfredJKwack avatar Apr 17 '22 14:04 AlfredJKwack

Thanks for the pointers, @AlfredJKwack. It seems like the only proper way to get this fixed would be to bundle ffmpeg with the superview GUI app. That's not ideal because it also creates all kind of licensing issues (non-free video codecs etc). Ideally there should be a way to trigger a "do you want to give this app full disk access" dialog box, but as far as I can see that's not possible.

Niek avatar Apr 20 '22 08:04 Niek

Hi @Niek, are you still working on this project?

AndreaB321 avatar Aug 07 '22 17:08 AndreaB321

Yes @AndreaCCIE - but I haven't found a way to fix this yet without redistributing a full ffmpeg binary with the app. If you have any ideas, let me know.

Niek avatar Aug 09 '22 10:08 Niek