Cannot detect ffmpeg on macOS
ifacodes opened this issue ยท 9 comments
Hey,
I have ffmpeg installed through homebrew, and it should be visible in my path as well, as I was just using it the other night.
any reason this might not be detecting it?
I'm on Ventura beta 7, and using PolyMC as a launcher.
What is the specific error message in your log? There should be something along the lines of Did not detect FFmpeg for reason: ...
If FFmpeg is contained in your PATH, Isometric must find it. For that to work however, that entry in the PATH environment variable must also be present when running the game. This might, depending on how brew installs it, not necessarily be the case. Can you try making sure your PATH is correctly set up when running the game? Alternatively, you can also place the ffmpeg
executable directly in your .minecraft
directory - this should make it get detected under all circumstances
Cheers
Ah, I suppose the ffmpeg location is in my path, but not necessarily the executable itself. I'll test if that fixes it
Yeah, it's in my path, visible to all applications that need to find it, but using ManyMC/PolyMC/PrismLauncher Minecraft can't detect it. I don't particularly want to copy the executable to the directory but I suppose I'll have to do that for now :/
Amending this, the mod cannot find ffmpeg in .minecraft both as a symlink and also just straight up copied into the folder, despite the executable itself working.
same issue, also on macos. My error code is Did not detect FFmpeg for reason: Cannot run program "ffmpeg": error=2, No such file or directory
I also tried putting the executable straight into .minecraft and it didn't work.
Otherwise my actual ffmpeg executable seems to be in a homebrew folder /usr/local/Cellar/ffmpeg/5.1.2/bin
with alias files in /usr/local/bin
.
I'm on macos monterey 12.5.1 using MultiMC and mc 1.18.2
yeah, it's error 2 same as above. From what I can tell, the ProcessBuilder isn't getting access to the correct PATH variable when it is being run from the mod, or doesn't have the correct permissions? but testing with the JDK my launcher uses, it does work, so I'm not sure what's going on here.
I tried to test this myself but was having gradle issues and couldn't get the mod to build.
I found these two stackoverflow questions that may be somewhat relevant? I'm not familiar with process builder though so this may just be obvious stuff, I'm not sure.
https://stackoverflow.com/questions/11787479/java-io-ioexception-cannot-run-program-error-2-no-such-file-or-directory
https://stackoverflow.com/questions/63819828/runtime-getruntime-execcommand-cannot-run-program-error-2-no-such-file-o
A few ideas:
- it seems like having "./ffmpeg" instead of "ffmpeg" here would run an executable that's placed in whatever directory the java runs in, I'd assume
.minecraft
? Maybe the code could try running this way if the first 'ffmpeg' fails ? Not ideal but if it works. - There could maybe be a config file that lets users set the location for it themselves.
- It could try calling it from a common absolute PATH location like
/usr/local/bin/ffmpeg
Or maybe there's just a way to fix it so it gets it directly from path, but again, I'm not very familiar with this stuff so I'm not sure.
It's pretty much the launcher's fault for not putting /usr/local/bin
in PATH
. A workaround for MultiMC-derived launchers is setting your instance's Wrapper Command
to env PATH="/usr/local/bin:$PATH"
. The solution that should probably be implemented in the mod is the same one that ReplayMod uses: Just check the common macOS install locations instead of relying on PATH
.