Feeds:
Posts
Comments

Archive for the ‘Uncategorized’ Category

Both ffmpeg and vlc are two of the important applications in free software media processing. I wanted to compile both to incorporate latest codecs, x264 and libvpx for video along with aac and libopus for audio. This is what I have done on Debian unstable.

For my purpose, I was compiling these codecs from source. To use the development libraries and headers given by Debian, one has to install the following packages, sudo is used to denote usage of root

sudo apt-get install libfaad-dev libfaac-dev libx264-dev libvpx-dev libopus-dev

Instead of using the development pacakges provides by Debian, I was compiling and installing these libraries to /opt. To use proper package config paths for both ffmpeg and vlc, one has to do export PKG_CONFIG_PATH or alternatively supply then to the configure script.

export PKG_CONFIG_PATH=/opt/lib/pkgconfig

Downloading the corresponding source code


# faac
wget -c http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
# faad
wget -c http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
# x264
git clone git://git.videolan.org/x264.git
# libvpx
git clone https://chromium.googlesource.com/webm/libvpx
# opus
git clone http://git.xiph.org/opus.git
# ffmpeg
git clone git://source.ffmpeg.org/ffmpeg.git
# vlc
git clone git://git.videolan.org/vlc.git

As I mentioned above, I was using /opt as the prefix. These are the compilation commands used. Replace the number of CPU cores with “-jN” option of make.

# faac
./configure --prefix=/opt
# comment out line 126 of faac-1.28/common/mp4v2/mpeg4ip.h
# strcasestr in case of any compilation error
make -jN
sudo make install
# faad
./configure --prefix=/opt
make -jN
sudo make install
# x264
sudo apt-get install yasm # install dependencies
./configure --prefix=/opt --enable-shared
make -jN
sudo make install
# libvpx
sudo apt-get install yasm #install dependencies
./configure --prefix=/opt --enable-vp8 --enable-vp9 --enable-shared
make -jN
sudo make install
# libopus
./autogen.sh
./configure --prefix=/opt
make -jN
sudo make install

ffmpeg


# install these extra package dependencies:
sudo apt-get install libopenjpeg-dev libvorbis-dev libschroedinger-dev libvpx-dev libopus-dev
./configure --prefix=/opt --extra-cflags='-Wall -g -I/opt/include/' --extra-ldflags='-L/opt/lib/' --enable-avfilter --enable-libschroedinger --enable-libvpx --enable-libspeex --enable-libtheora --enable-libopus --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --enable-runtime-cpudetect --enable-libfaac --enable-libx264 --enable-postproc --enable-swscale --enable-x11grab --enable-libopenjpeg --enable-shared --enable-gpl --enable-nonfree --disable-static --disable-stripping --disable-altivec --disable-armv5te --disable-armv6 --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages
make -jN
sudo make install

vlc


# package dependencies:
apt-get install libtool gettext cvs libfaad-dev libfaac-dev libswscale-dev libpostproc-dev libqt4-dev libgcrypt20-dev libdbus-1-dev lua5.2 liblua5.2-dev libproxy-dev libdvbpsi-dev liblivemedia-dev libnotify-dev libshout3-dev libdca-dev libflac-dev libmpeg2-4-dev libmpeg3-dev libsdl2-dev libgnutls28-dev libavc1394-dev libsmbclient-dev libtwolame-dev liba52-0.7.4-dev libfribidi-dev libjack-dev libmad0-dev
# a few more extra dependencies:
apt-get install libcdio-dev libvcdinfo-dev libpulse-dev libxml2-dev libmodplug-dev libnotify-dev libcaca-dev libncursesw5-dev libxpm-dev libxcb-shm0-dev libxcb-xv0-dev libxcb-keysyms1-dev libxcb-randr0-dev libx11-xcb-dev libxcb-composite0-dev
./bootstrap
./configure --prefix=/opt --disable-update-check --disable-gnome --disable-gtk --disable-familiar --disable-fb --enable-sdl --enable-esd --enable-mad --enable-arts --disable-jack --enable-pulse --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --without-dv-raw1394 --disable-dc1394 --disable-kde --enable-mp4 --enable-dvb --disable-satellite --enable-ogg --enable-vorbis --enable-shout --enable-qt4 --disable-slp --enable-flac --disable-skins --disable-basic-skins --enable-skins2 --enable-freetype --enable-mkv --enable-speex --enable-caca --enable-live555 --enable-libmpeg2 --enable-fribidi --enable-cdio --enable-mod --enable-theora --enable-modplug --enable-gnutls --enable-ffmpeg --enable-ncurses --enable-smb --disable-gnomevfs --enable-bonjour --enable-mpc --enable-vcd --enable-vcdx --enable-twolame --enable-x264 --enable-faad -enable-faac --enable-vpx --enable-opus --enable-xcb --disable-zvbi --enable-telx --enable-mediacontrol-bindings --disable-atmo --enable-taglib --enable-libass --enable-libdca --enable-alsa --disable-dv --disable-dvdnav --disable-notify --enable-v4l --enable-v4l2 --enable-pvr --enable-dvd --without-dvdcss CPPFLAGS='-I/opt/include' CFLAGS='-g -O2 -I/opt/include' LDFLAGS='-L/opt/lib -Wl,--as-needed' CXXFLAGS='-g -O2' PKG_CONFIG_PATH='/opt/lib/pkgconfig:/usr/lib/pkgconfig'
make -jN
sudo make install

Advertisements

Read Full Post »

Hello world!

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can alway preview any post or edit you before you share it to the world.

Read Full Post »

%d bloggers like this: