dirkwhoffmann / vAmiga

vAmiga is a user-friendly Amiga 500, 1000, 2000 emulator for macOS
https://dirkwhoffmann.github.io/vAmiga
Other
299 stars 25 forks source link

FFmpeg not working #716

Closed Gianmarco72 closed 2 years ago

Gianmarco72 commented 2 years ago

I can't get ffmpeg to work. Version 5.0.1 is installed on my iMac Retina 4K 2017 (macOS 12.4):

Schermata 2022-07-10 alle 17 54 07

But vAmiga (v 2.01) not see it 🤔

Schermata 2022-07-10 alle 17 54 32

It worked until some versions ago 🫤

dirkwhoffmann commented 2 years ago

Where is ffmpeg located on your machine?

By default, vAmiga searches for ffmpeg in /Applications, /usr/bin, and /opt/bin:

void
FFmpeg::init()
{
    auto add = [&](const string &path) {
        if (util::getSizeOfFile(path) > 0 && !FORCE_NO_FFMPEG) {
            paths.push_back(path);
        }
    };

    if (paths.empty()) {

        add("/Applications/ffmpeg");
        add("/usr/bin/ffmpeg");
        add("/opt/bin/ffmpeg");
        // add("/usr/local/bin/ffmpeg");
        // add("/opt/homebrew/bin/ffmpeg");

        // Use the first entry as the default executable
        if (!paths.empty()) exec = paths[0];
    }
}

For some reason, I commented out /usr/local/bin/ffmpeg and /opt/homebrew/bin/ffmpeg, but I don't remember why (I guess it had to do with sandboxing).

You should always be able to type in a search path directly into the combo box. Could you try if that works?

Gianmarco72 commented 2 years ago

Where is ffmpeg located on your machine?

In /usr/local/bin

Schermata 2022-07-11 alle 23 21 14

For some reason, I commented out /usr/local/bin/ffmpeg and /opt/homebrew/bin/ffmpeg, but I don't remember why (I guess it had to do with sandboxing).

Probably: I tried to copy in /usr/bin but can't write any files on this directory.

By the way, on Virtual C64 it works fine:

Schermata 2022-07-11 alle 23 31 45

You should always be able to type in a search path directly into the combo box. Could you try if that works?

Tried but when I start a screen recording, vAmiga freezes (I think it's because can't access in a folder protected by sandbox).

By the end, it works if I put the FFmpeg files in /Applications.

dirkwhoffmann commented 2 years ago

I think it's because can't access in a folder protected by sandbox

I see. This must have been the reason why I removed this path from the default locations.

I think it's best to simply stop deploying vAmiga as a sandboxed app. I've put vAmiga into a sandbox, because I had the plan to distribute it via the App Store at some point in time. I don't have this plan anymore, so sandboxing is no longer a necessity.

Gianmarco72 commented 2 years ago

🫤

dirkwhoffmann commented 2 years ago

Fixed in v2.1b5