11

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?

15

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
    
  • 1
    @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... ;-) – Fabby Jan 3 '16 at 2:26
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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