Ffmpeg
From Cheatsheet
ffpmeg is a conversion utility for various flavors of video to various other flavors, you can read about it here conversion_script
ffmpeg
detect
ffmpeg -i filename.avi
convert reference
ffmpeg -i tufftrucks1001.avi -ar 22050 -ab 32 -f flv -s 600x400 tufftruck1001.flv ffmpeg -i 00304_VideoTraxx.mov -ar 22050 -ab 56 -b 200 -r 12 -f flv -s 600x400 -acodec mp3 -ac 1 00304.flv ffmpeg -i 00299_VideoTraxx.mov -ar 43242 -b 200 -r 12 -f flv -s 600x400 -acodec mp3 -ac 1 00304.flv
this one works
ffmpeg -i 00299_VideoTraxx.mov -ar 43242 -f flv -s 600x400 00304.flv
options
-ar audio sampling freq., default = 44100Hz -b bitrate, default = 200kb/s -f force format (output) -r frame rate fps -s size -t time limit, how long of video you want to output -y overwrite the output file, if it exists
thumbnail
fmpeg -i tufftrucks1001.avi -s 174x116 -ss 5 -vframes 1 -f mjpeg -y test1.jpg ffmpeg -i tufftruck3.flv -s 174x116 -an -ss 4 -vframes 1 -f image2 -y test1.jpg ffmpeg -i swing.avi -s 320×240 -ss 5 -vframes 1 -f image2 swing.jpg
install ffmpeg
with latest (or pretty close) libs
apt-get install yasm gcc elinks g++ build-essential subversion automake libtool mkdir /usr/src/ffmpeg cd /usr/src/ffmpeg
download the codecs, start with ogg
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz wget http://downloads.xiph.org/releases/ogg/libogg-1.2.0.tar.gz tar xfvz libogg-1.2.0.tar.gz cd libogg-1.2.0 ./configure make make install svn co http://svn.xiph.org/trunk/theora ./autogen.sh make make install cd ..
x264
elinks ftp://ftp.videolan.org/pub/videolan/x264/snapshots/ tar xjvf x264-snapshotxxxxxxxxxxxxxx.bz2 cd x264-snapshotxxxxxxxxxxxxxx make make install cd ..
liblame
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz?use_mirror=softlayer tar xfvz lame-3.98.4.tar.gz cd lame-3.98.4 ./configure make make install cd ..
libfaac
elinks http://www.audiocoding.com/downloads.html tar xfvz faac-1.28.tar.gz cd libfaac-1.28 ./configure make make install
xvid
wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz tar xfvz xvidcore-1.2.2.tar.gz cd xvidcore/build/generic ./configure make make install cd ../../../
ffmpeg
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg cd ffmpeg ./configure --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-pthreads --enable-gpl --enable-libfaac --enable-nonfree make make install ldconfig ffmpeg
to update ffmpeg later
make distclean svn update
