Posts Tagged “h264”

Liam (http://goodingsweb.com) has shared his findings on tweaking ffmpeg output with h.264, he has taken a 174MB flv file down to just 24MB (86% reduction in file size).

There is no noticeable difference in quality either, you can follow the forum thread here: http://flowplayer.org/forum/7/12671.

Click the video for a preview of Liam’s settings:

Tags: , , , ,

Comments 3 Comments »

Just try to find documentation on this … absolute nightmare is an understatement, so here are my notes of the steps I took to compile ffmpeg with a selection of codecs:

1
2
3
4
5
6
7
8
9
up2date automake autoconf libtool
wget http://downloads.sourceforge.net/faac/faac-1.26.tar.gz
wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/lame/lame-3.98b6.tar.gz
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/theora/libtheora-1.0beta2.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz
wget http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20080805-2245.tar.bz2

NOTE: The above are current at the time of writing, check for more recent versions at the relevant sites.

Extract:

1
2
 for i in *.tar.gz; do tar -xzvf "$i"; done
 for i in *.tar.bz2; do tar -xjvf "$i"; done

cd to relevant directories and run the following:

faac & faad2: ./bootstrap && ./configure && make && make install
xvidcore: cd build/generic; ./configure && make && make install
libx264: ./configure –enable-shared –disable-asm && make && make install
The rest: ./configure && make && make install

NOTE: You must install libogg prior to libvorbis and libtheora

The following is required otherwise ffmpeg will display errors about being unable to find libraries:

i.e.

1
ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file

FIX:

1
2
echo '/usr/local/lib' > /etc/ld.so.conf.d/buzz-saiweb.conf
ldconfig

You must run “ldconfig” any time you install a new lib you want to use with ffmpeg!

Install FFMPEG

1
2
3
4
5
6
7
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

./configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-shared --enable-libfaac --enable-libfaad --enable-gpl --enable-libtheora --enable-libx264

make

make install

NOTE: If you allready havea checkout of ffmpeg and run an update to get the latest code, make sure you run

1
make distclean

Prior to running the configure line.

et voila job done ….

Tags: , , , , , , , , , ,

Comments No Comments »

The information for this is VERY very sparse, so here is a summary of what I have found.

Install libx264

Get the libx264 package from here: http://www.videolan.org/developers/x264.html

Extracts the bz2 file

1
tar -xjvf /path/to/x264-snapshot-20080805-2245.tar.bz2

And now the useual

1
2
3
4
5
cd /path/to/x264-dir
./configure --enable-shared
make
make install
ldconfig

Get a nice error message:

1
2
3
[root@dev01 x264-snapshot-20080805-2245]# ./configure
No suitable assembler found.  Install 'yasm' to get MMX/SSE optimized code.
If you really want to compile without asm, configure with --disable-asm.

You do want MMX/SSE at somepoint for the time being I am disabling this though (lack of time to find a valid RHEL source). so I added the disable asm line.

Install ffmpeg

For this I use subversion.

1
2
3
4
5
6
cd /path/to/where/I/want/sources
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd /path/to/where/I/want/sources/ffmpeg
./configure --enable-libx264 --enable-gpl --enable-shared
make
make install

et voila ffmpeg is now installed with libx264 (h264).


error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

To fix this:

1
vi /etc/ld.so.conf.d/custom-libs.conf

Add the line : /usr/local/lib

And run ldconfig.

UPDATE: I am writing a full set of notes blog entry for installing ffmpeg with codecs on RHEL4

Tags: , ,

Comments 17 Comments »