2

I use multiple tools that rely on ffmpeg, a couple of which have downloaded different versions of ffmpeg from the one provided in the package repositories (e.g., mpv and moviepy via imageio). The separate ffmpeg binaries for these programs have not interfered with each other, but I am having difficulties related to some inconsistencies between the different versions.

My question is: how do I locate the different versions of ffmpeg (other than the ubuntu package) that exist on my system so that I can point everything toward the binary of the most current version (in my case, the ffmpeg running with mpv)?

Thanks!

  • What's wrong with find / -name ffmpeg? – Pedro Lobito Dec 30 '18 at 5:33
2

Experimenting a bit more, I was able to locate the alternate ffmpeg binaries installed by other programs using locate and egrep:

locate mpv | egrep 'ffmpeg$'
locate imageio | egrep 'ffmpeg$'

And then use alias to redirect the ffmpeg command to the most up-to-date binary without breaking other dependencies.

  • @mchid yeah, I did build mpv from source, but it left binaries in ~/mpv-build/build_libs/bin/ and ~/mpv-build/ffmpeg_build/, and not in /usr/local/bin/ for whatever reason – hb_ Dec 30 '18 at 2:34
  • @hb Okay, /usr/local/bin is not used because this is a local install. – mchid Dec 30 '18 at 9:08
1

There are two commands you can use to determine which binary is in use and also if there is more than one ffmpeg installed.

First, to determine which binary is currently in use, run the following command:

which ffmpeg

Next, you can show where ffmpeg files and binaries are by running the following command:

whereis ffmpeg

The whereis command should show where the different binaries are if there is more than one and the binaries are usually under a bin directory.

  • hm, it seems whereis only gives me the current binary in use, but doesn't give me the locations of the ffmpeg binaries installed by mpv and imageio, whereas locate does (though along with a lot of other locations I don't need) – hb_ Dec 30 '18 at 2:42
  • @hb_ It looks like whereis does not work when trying to find something installed locally. – mchid Dec 30 '18 at 9:12
  • @hb_ This is maybe because the directory is not in your $PATH. I have stuff installed in /home/$USER/.local/bin that shows up but /home/$USER/.local/bin is in my $PATH. – mchid Dec 31 '18 at 22:04
  • thanks for clarifying this! /home/$USER/.local/bin was indeed not in my path – hb_ Jan 2 at 4:30
  • @hb_ I wouldn't mess with it if you found a way to make it work so I wouldn't add that to my path unless needed. Besides, it didn't look like ffmpeg was installed in /home/$USER/.local/bin. I was just using /home/$USER/.local/bin as an example because that is where some python stuff shows up if installed locally and whereis does show the python apps installed because this is in my $PATH. – mchid Jan 2 at 16:45

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.