FFmpeg in Centos 5.2 - simple comply
I've worked hard (6 hours) to get ffmpeg working in CentOs 5. It is difficult because examples around are older for both ffmpeg changed and also the CentOs.
Step by step I'll explain (Got the copy of bash_history file):
lets start with removing some packages
yum remove ffmpeg x264 faad2 faad2-devel
and install required packages for development:
yum install gcc gcc-c++ automake autoconf libtool yasm git subversion strace zlib zlib-devel faac-devel lame-devel libvorbis-devel xvidcore-devel
Starting with faad:
wget http://downloads.sourceforge.net/faac/faad2-2.6.1.tar.gz
tar xzf faad2-2.6.1.tar.gz
cd faad2
autoreconf -vif
./configure
make
make install
cd ..
Now GPAC. If system have no mozilla browser, it cant comply unless you ignore the Mozilla part with editing gpac/applications/osmozilla/Makefile . Comment out (put "#" infront of lines)
INSTDIRS+=osmozilla
APPDIRS+=osmozilla
wget http://downloads.sourceforge.net/gpac/gpac-0.4.4.tar.gz
tar -xzvf gpac-0.4.4.tar.gz
cd gpac
chmod a+x configure
./configure
make
make install
make install-lib
cd ..
GPAC installs its files other than expected we should make our system recognize with
echo '/usr/local/lib/' > /etc/ld.so.conf.d/gapc-1386.conf
ldconfig
X264 codec: (infact we follow these steps because x264 is not complied with mp4 output enabled.)
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-pthread --enable-mp4-output --enable-shared
make
make install
ldconfig
cd ..
The final ffmpeg
svn export svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg/
./configure --prefix=/usr/local --disable-debug --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-x11grab --enable-libx264 --enable-libxvid --enable-libvorbis --enable-libfaac --enable-libfaad --enable-libmp3lame
make
make install
It's all.
ffmpeg -i windows_media_video.wmv -ab 48kb -vcodec libx264 -vpre max -ac 1 -r 20 pretty_flash_video.mp4
Similar
New technique to win olimpics
At the 1968 Olympics, Dick Fosbury took the athletics world by surprise with an unusual high-jump technique.
Printing mysql_error
This is a code snipped to print mysql error.
If there is no error mysql_error returns null, thus if evaluates false and there is no output.
multiple ON DUPLICATE KEY UPDATE
Here is an example of how to update multiple columns using values supplied in the INSERT statement. This assumes that column 'a' is the unique key.
multiple ON DUPLICATE KEY UPDATE
Here is an example of how to update multiple columns using values supplied in the INSERT statement. This assumes that column 'a' is the unique key.
php unlink recursive
The shortest recursive delete possible.
<?php
/**
* Delete a file or recursively delete a directory
*
* @param string $str Path to file or directory
*/

