This tutorial guides through the steps needed for installing the newest version of ffmpeg with h264 support, aac, mp3.
This tutorial guides through the steps needed for installing the newest version of ffmpeg with h264 support, aac, mp3.
Now we are going to install the newest version of ffmpeg
> cd /opt/etc/
> svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
> cd /opt/etc/ffmpeg/
> ./configure --arch=i686 --target-os=linux --enable-cross-compile --enable-optimizations --enable-pic --prefix=/opt --enable-gpl --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-nonfree --enable-shared --enable-avfilter --enable-filter=movie
> make
> make install
// to reset the installation settings
> make uninstall
> make clean
NAS> ipkg list_installed
apr - 1.4.6-1 - Apache Portable Runtime library
apr-util - 1.4.1-1 - Apache Portable Runtime utilities library
autoconf - 2.69-1 - Creating scripts to configure source code packages using templates
automake - 1.12-1 - Creates GNU standards-compliant Makefiles from template files
bash - 3.2.49-1 - A bourne style shell
binutils - 2.19.1-1 - The GNU assembler and linker and related tools
bzip2 - 1.0.6-1 - Very high-quality data compression program
coreutils - 8.4-1 - Bunch of heavyweight *nix core utilities
cyrus-sasl-libs - 2.1.23-2 - Provides client or server side authentication (see RFC 2222).
diffutils - 3.1-1 - contains gnu diff, cmp, sdiff and diff3 to display differences between and among text files
e2fslibs - 1.40.3-5 - Ext2 Filesystem Libraries
expat - 2.0.1-1 - XML Parser library
faad2 - 2.6-3 - Freeware Advanced Audio Coder
file - 5.09-1 - Ubiquitous file identification utility.
gcc - 4.2.1-5 - The GNU Compiler Collection.
gdbm - 1.8.3-4 - GNU dbm is a set of database routines that use extensible hashing. It works similar to the standard UNIX dbm routines.
git - 1.7.12.1-1 - GIT is a directory tree content manager that can be used for distributed revision control.
glib - 2.20.4-1 - The GLib library of C routines.
grep - 2.12-1 - Global regular expression parser
lame - 3.99.5-1 - LAME is an LGPL MP3 encoder.
libc-dev - 2.3.6-5 - libc development files.
libcurl - 7.24.0-1 - Curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FI
libdb - 4.2.52-3 - Berkeley DB Libraries
libebml - 1.0.0-1 - Extensible Binary Meta Language access library
libmatroska - 1.0.0-1 - lib to access Matroska (an extensible open standard Audio/Video container format)
libmpeg2 - 0.4.1-2 - A free library for decoding MPEG-2 and MPEG-1 video streams.
libnsl - 2.3.6-4 - Network Services Library
libogg - 1.2.1-1 - Ogg is a multimedia container format.
libstdc++ - 6.0.9-6 - Standard C++ library, needed for dynamically linked C++ programs
libtheora - 1.1.0-1 - A free and open video compression format from the Xiph.org Foundation.
libtool - 1.5.26-1 - Library tools.
libvorbis - 1.3.2-1 - Ogg Vorbis compressed audio format.
libxml2 - 2.7.8-1 - Libxml2 is the XML C parser and toolkit developed for the Gnome project.
m4 - 1.4.16-1 - gnu macro processor and compiler front end
make - 3.82-1 - examines files and runs commands necessary for compilation
mktemp - 1.7-1 - Mktemp is a small program to allow safe temporary file creation from shell scripts.
nano - 2.2.6-1 - A pico like editor
ncurses - 5.7-1 - NCurses libraries
neon - 0.29.3-1 - an HTTP and WebDAV client library, with a C interface
openldap-libs - 2.3.43-2 - Open Lightweight Directory Access Protocol
openssl - 0.9.8v-2 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
pcre - 8.31-1 - Perl-compatible regular expression library
procmail - 3.22-4 - Versatile email processor.
psmisc - 22.17-1 - A set of some small useful utilities that use the proc filesystem.
rcs - 5.7-2 - The Revision Control System (RCS) manages multiple revisions of files.
readline - 6.1-2 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are
sqlite - 3.7.14.1-1 - SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.
svn - 1.7.7-1 - a compelling replacement for CVS
wget - 1.12-2 - A network utility to retrieve files from the Web
yasm - 1.1.0-1 - Yasm Modular Assembler, currently for x86 or x86_64.
zlib - 1.2.5-1 - zlib is a library implementing the 'deflate' compression system.
Successfully terminated.
http://longtermcache.blogspot.ch/2013/04/ffmpeg-with-libfaac-support-on-qnap-ts.html
Install some codec libraries for ffmpeg via ipkg:
NAS> ipkg update
NAS> ipkg install gcc make pkgconfig libstdc++ git coreutils
NAS> ipkg install lame faad2 libogg libtheora libvorbis libmatroska libmpeg2
Next, create a directory in which you can download and compile some required packages:
NAS> mkdir /opt/build
Build and install faac:
NAS> cd /opt/build/
NAS> wget http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
NAS> tar -xzvf faac-1.28.tar.gz
NAS> cd faac-1.28/
NAS> CFLAGS="-march=armv5te -mtune=marvell-f -Wall -O2 -fstrength-reduce -finline-functions -ffast-math -fomit-frame-pointer" ./configure --prefix=/opt --enable-static=no
NAS> make
NAS> make install
Build & install x264 (the version shipped by ipkg is too old for ffmpeg):
NAS> cd /opt/build/
NAS> git clone git://git.videolan.org/x264.git
NAS> cd x264/
NAS> CFLAGS="-march=armv5te -Wall -O2 -fstrength-reduce -finline-functions -ffast-math -fomit-frame-pointer" ./configure --prefix=/opt --enable-shared --system-libx264 --disable-asm
NAS> make
NAS> make install
Build & install xvidcore:
NAS> cd /opt/build/
NAS> wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
NAS> tar -xzvf xvidcore-1.3.2.tar.gz
NAS> cd xvidcore/build/generic/
NAS> wget http://downloads.xvid.org/downloads/xvidcore-1.3.0.tar.gz
NAS> tar -xzvf vidcore-1.3.0.tar.gz
NAS> cp -v xvidcore/build/generic/configure .
NAS> CFLAGS="-march=armv5te -mtune=marvell-f -Wall -O2 -fstrength-reduce -finline-functions -ffast-math -fomit-frame-pointer" ./configure --prefix=/opt
NAS> make
NAS> make install
Finally, build & install ffmpeg:
NAS> cd /opt/build/
NAS> wget http://ffmpeg.org/releases/ffmpeg-1.2.tar.gz
NAS> tar -xzvf ffmpeg-1.2.tar.gz
NAS> cd ffmpeg-1.2/
NAS> CFLAGS="-march=armv5te -Wall -O2 -fstrength-reduce -finline-functions -ffast-math -fomit-frame-pointer" ./configure --prefix=/opt --enable-gpl --enable-nonfree --enable-bzlib --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-asm --disable-debug
NAS> make
NAS> make install
Run ldconfig to make sure all shared library additions are picked up:
NAS> ldconfig