I try to install ffmpeg in Ubuntu according to https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu I create a shell file with below code

sudo apt-get update
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \
  libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev \
  libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev
mkdir ~/ffmpeg_sources

cd ~/ffmpeg_sources
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xjvf last_x264.tar.bz2
cd x264-snapshot*
PATH="$PATH:$HOME/bin" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static --disable-opencl
PATH="$PATH:$HOME/bin" make
make install
make distclean

sudo apt-get install unzip
cd ~/ffmpeg_sources
wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
unzip fdk-aac.zip
cd mstorsjo-fdk-aac*
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make install
make distclean

cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$PATH:$HOME/bin" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --bindir="$HOME/bin" \
  --enable-libfdk-aac \
  --enable-libx264 \
PATH="$PATH:$HOME/bin" make
make install
make distclean
hash -r

(I add execution permission to this file ) and in command line run ./mybashfile.sh)

it run correctly and start to download but some last line of terminal output is

rm -f libMpegTPEnc/src/.dirstamp
rm -f libPCMutils/src/.deps/.dirstamp
rm -f libPCMutils/src/.dirstamp
rm -f libSBRdec/src/.deps/.dirstamp
rm -f libSBRdec/src/.dirstamp
rm -f libSBRenc/src/.deps/.dirstamp
rm -f libSBRenc/src/.dirstamp
rm -f libSYS/src/.deps/.dirstamp
rm -f libSYS/src/.dirstamp
rm -f libtool config.lt
rm -f cscope.out cscope.in.out cscope.po.out cscope.files
rm -f config.status config.cache config.log configure.lineno config.status.lineno
rm -rf ./.deps libAACdec/src/.deps libAACenc/src/.deps libFDK/src/.deps libMpegTPDec/src/.deps libMpegTPEnc/src/.deps libPCMutils/src/.deps libSBRdec/src/.deps libSBRenc/src/.deps libSYS/src/.deps
rm -f Makefile
--2014-09-07 15:18:35--  http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
Resolving ffmpeg.org (ffmpeg.org)...
Connecting to ffmpeg.org (ffmpeg.org)||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘ffmpeg-snapshot.tar.bz2’

    [ <=>                                   ] 13          --.-K/s   in 0s      

2014-09-07 15:18:45 (1.30 MB/s) - ‘ffmpeg-snapshot.tar.bz2’ saved [13]

bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
./install-ffmpeg.sh: line 31: cd: ffmpeg: No such file or directory
./install-ffmpeg.sh: line 32: ./configure: No such file or directory
make: *** No rule to make target `install'.  Stop.
make: *** No rule to make target `distclean'.  Stop.

where is the Problem? and how Can I install ffmpeg correctly?


The easiest way is to download one of the static builds linked from the FFmpeg download page.

You can then run it with

$ /opt/ffmpeg-2.3.3-64bit-static/ffmpeg

(or wherever you expanded the archive to).


Here is a sample script to Install ( Download/Extract/Put in user bin PATH directory ) latest ffmpeg static version:

wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz
tar -xvJf  ffmpeg-release-64bit-static.tar.xz  --strip-components=1 -C ./usr/bin

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.