Thursday, January 25, 2007

converting 3gp movies to flv

In todays mobile phones the 3GPP standard is widely in use for videos on the phone.
we use two tools mencoder (from mplayer) and ffmpeg (from mplayer too)

we extract the movie without sound
/opt/mplayer/bin/mencoder movie.3g2 -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o movie.avi
then we extract the audio file into audiodump.wav
/opt/mplayer/bin/mplayer -vo null -ao pcm -af resample=8000,volume=+4db:sc movie.3g2
we combine the two stream into an flv moovie
/opt/ffmpeg/bin/ffmpeg -i movie.avi -i audiodump.wav movie.flv

then you can put the movie on your server
http://jan.kneschke.de/projects/flv-streaming/

Here is how i compiled the ffmpeg
follow the steps from this tutorial
http://howto-pages.org/ffmpeg/#build
here is my final configure command
./configure --prefix=/opt/ffmpeg --enable-amr_nb --enable-amr_wb --enable-libogg --enable-vorbis --enable-libgsm --enable-xvid --enable-a52 --enable-mp3lame --enable-gpl
make && make install
for mplayer here is how i did it
wget http://www2.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2
wget http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
tar -jxvf ../essential-20061022.tar.bz2
tar -jxvf ../MPlayer-1.0rc1.tar.bz2
mkdir /usr/lib/codecs/
cd essential-20061022
mv * /usr/lib/codecs/
./configure --prefix=/opt/mplayer

some debian packages are needed before all of these
apt-get install libgsm1-dev toolame libtwolame-dev libgsm1-dev libvorbis-dev libfaad-dev libogg libogg-dev


lame and xvid were installed from source
http://www.xvid.org/Downloads.15.0.html
http://lame.sourceforge.net/download.php

niemueller.de - wiki

technorati tags:, , , , , , ,

Blogged with Flock

No comments: