Binary not used from repo root (FFMPEG, Gatsby)

I’m reopening the issue from @hideodaikoku:

error UNHANDLED REJECTION Cannot find ffprobe
Error: Cannot find ffprobe

I’m using the gatsby-video plugin that requires gatsby-plugin-ffmpeg and gatsby-transformer-ffmpeg, which uses ffmpeg. I’ve downloaded the latest binaries (ffmpeg-git-amd64-static.tar.xz) from John Van Sickle - FFmpeg Static Builds. And put them into my root folder of my repo, like that is the netlify docker container path: /opt/build/repo/ffmpeg, /opt/build/repo/ffprobe, /opt/build/repo/package.json

And my default netlify.toml:

[build]
    base = "./"

    # Directory (relative to root of your repo) that contains the deploy-ready
    # HTML files and assets generated by the build. If a base directory has
    # been specified, include it in the publish directory path.
    publish = "public/"

    # Default build command.
    command = "yarn build"

I tried already to override the PATH env var, also with sed but without success. Ive spent the second day now, finding something working to use ffmpeg in my react app. Would be very nice if somebody is able to give some more tips please what might be wrong - especially @hideodaikoku! :slight_smile:

Thank you very much!

Hey there! Have you done the final step and added the execution of the binary to your build command? To quote the other topic:

so it could be as easy as using ./my-binary as part of your build command.

Hope this helps!

Thank you very much for your support!
What do you mean by “adding the execution of the binary to your build command”?
I just run yarn build as only command and ffmpeg is used in node-fluent-ffmpeg of my app. The binaries are in the root of the repo.

But as i can not add them to PATH, i dont know how they can be used inside my application.

Of course i can run the binary directly in the command but actually the library is using ffmpeg. I’ve also set the libaries env variables ( FFMPEG_PATH… ). It just works on my local machine (windows), but not using netlify.

Hey @NovelNet,

I think, from what I can gather, you may need to change your build command to yarn build && ./my-binary to get this working remotely.