ffmpeg: command not found

62,037

Solution 1

I successfully figured it out by my self, here is how.

  1. remove the current ffmpeg by running:

    sudo apt-get remove --purge ffmpeg
    
  2. Add ppa trusty-media for 14.04:

    sudo apt-add-repository ppa:mc3man/trusty-media
    

    For 16.04, add the following Repo:

    sudo apt-add-repository ppa:jonathonf/ffmpeg-3
    
  3. Update repo:

    sudo apt-get update
    
  4. Finally install it:

    sudo apt-get install ffmpeg
    

Solution 2

Install the dependencies by typing Link:

sudo apt-get update

sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev  libxcb1-dev libxcb-shm0-dev \
libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev

ffmpeg

mkdir /home/user/ffmpeg
cd /home/user/ffmpeg
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"      ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-gpl \
 ......
 .......
PATH="$HOME/bin:$PATH" make
make install
make distclean

Then execute:

home/user/ffmpeg/bin/ffmpeg -i ../input.avs ../videos/output.avi
Share:
62,037

Related videos on Youtube

sugab
Author by

sugab

Ubuntu user, beginner. Equipped with old MBP: Intel® Core™ i7-3520M CPU @ 2.90GHz × 4 and 16 GB ram. Most used apps: Gedit, Firefox, vim, gnome-term, GNU/Octave, minbar, sound, sox, praat, audacity, libsnd, SPTK, nautilus, sunrise, Chromium, Lyx, Latex, Libreoffice, gcc/g++, clang/clang++, Arduino, python3. Save power, more life. Minimal install, maximum speed.

Updated on September 18, 2022

Comments

  • sugab
    sugab almost 2 years

    I have ffmpeg installed in my Ubuntu 14.04 (and also no ffmpeg for 16.04) but when I tried to use it in terminal I got the following error,

    $ ffmpeg -i input.avs -an -vcodec rawvideo -y output.avi
    ffmpeg: command not found
    

    I check it in my /usr/bin and /usr/local/bin but I can't find it. I make sure to have it again by apt-get install, and it say ffmpeg is already the newest version.

    How can I use ffmpeg in command window?

  • Fabby
    Fabby over 8 years
    @andrew-46: Could you please review my edits and also review the editing help to improve the readability of your own edits in the future... ;-)