Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errno::ENOENT (No such file or directory - the ffmpeg binary, '/usr/local/bin/ffmpeg', is not executable) in Heroku #212

Open
AlbertMontolio opened this issue Aug 31, 2020 · 4 comments

Comments

@AlbertMontolio
Copy link

I am trying to make ffmpeg work in heroku but without success.

I think the problem is with the buildpack. I am using this one:

https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git

I add it in the dashboard: https://dashboard.heroku.com/apps/name_ap/settings
Next to the heroku/ruby buildpack

When deploying, I see the builidpack used:

remote: -----> ffmpeg app detected
remote: -----> Install ffmpeg
remote:        DOWNLOAD_URL =  https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
remote:        exporting PATH
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)

But I am not sure if the library ffmpeg is installed or if the path finds it.

I checked the version of ffprobe and it appears to be installed:

heroku run "ffprobe -version"
Running ffprobe -version on ⬢ wikisalsaapi... up, run.6204 (Free)
ffprobe version N-53917-g5ff2ff6bd9-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil      56. 58.100 / 56. 58.100
libavcodec     58.101.100 / 58.101.100
libavformat    58. 51.101 / 58. 51.101
libavdevice    58. 11.101 / 58. 11.101
libavfilter     7. 87.100 /  7. 87.100
libswscale      5.  8.100 /  5.  8.100
libswresample   3.  8.100 /  3.  8.100
libpostproc    55.  8.100 / 55.  8.100

It's a Rails app (5.2.4.3), Ruby 2.5.3

@matthewmoss
Copy link

@AlbertMontolio Hey Albert, did you ever figure this out? I've been stuck on the same issue.

@matthewmoss
Copy link

Think I found a workaround if anyone else is stuck on this! By default, streamio-ffmpeg calls FFMPEG using the path /app/vendor/ffmpeg. For instance, a transcription request might result in the follow command:

/app/vendor/ffmpeg -y -i input.mp4 -r 60 output.mp4

The path /app/vendor/ffmpeg seems to be off-limits on Heroku so it throws a Permission Denied error. Instead, heroku-buildpack-ffmpeg-latest makes FFMPEG available using the plain old ffmpeg command. If streamio-ffmpeg issues the command using the ffmpeg name instead of the path, everything works. The above command would be changed to the following:

ffmpeg -y -i input.mp4 -r 60 output.mp4

Unfortunately, FFMPEG.ffmpeg_binary only allows you to specify a path to a valid binary, so FFMPEG.ffmpeg_binary = "ffmpeg" doesn't work by default. I had to create a fork that removes the valid path restriction so that you can set FFMPEG.ffmpeg_binary to ffmpeg.

@ghost
Copy link

ghost commented Jul 19, 2023

I have kind of issue with [ffmpegthumbnailer]
Instead of the app/vendor/ffmpegthumbnailer I got in vendor/ffmpegthumbnailer

@Riveascore
Copy link

@matthewmoss, thank you infinitely for this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants