Niek / superview

A small program that takes a 4:3 aspect ratio video file, and transforms it to a 16:9 video using the GoPro SuperView method
GNU General Public License v3.0
213 stars 21 forks source link

Superview GUI can't find ffmpeg on MacOS #26

Open AndreaCCIE opened 3 years ago

AndreaCCIE commented 3 years ago

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

Niek commented 3 years ago

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.

AndreaCCIE commented 3 years ago

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

sceadu50ys commented 3 years ago

I get the same error in my environment😭

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

AndreaCCIE commented 3 years ago

At least the CLI version does work ok

AndreaCCIE commented 3 years ago

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

Screenshot 2021-03-22 at 07 42 43

Niek commented 3 years ago

@AndreaCCIE the workaround is:

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

AlfredJKwack commented 2 years ago

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:

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 commented 2 years ago

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.

Niek commented 2 years ago

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.

AndreaCCIE commented 2 years ago

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

Niek commented 2 years ago

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.