Well as the saga continues on our latest project, today we finally got FFMPEG functioning correctly. We can now convert 3GP files to FLV files on the fly using FFMPEG and PHP.
No matter what we did, it just wouldn’t convert the sound, it would only convert the video. Although it seemed that the command is simple, e.g.
exec("ffmpeg -i yourvideo.avi -ar 22050 -ab 32 -f flv -s 320x240 yourvideo.flv")
But that didn’t work.
So for the last couple of weeks we focused our attention on ensuring FFMPEG was installed PROPERLY on our server.
After a lot of great work by Paul and Niall from Blacknight (thanks guys!) we finally got it working.
For those of you just embarking on this new challenge, I suggest you focus your attention on installing FFMPEG correctly first. The guts of what you need to do is to install and enable the libamr codecs.
I spent days trawling forums and mail lists looking for the solution and a lot of them pointed me towards the command I was using to execute FFMPEG. This was not what I needed.
In one way they helped, because it helped me understand how FFMPEG worked, on the other, it made me expect FFMPEG to work without having to look further into the configuration of FFMPEG.
So to help you out, this is how our FFMPEG installation configuration now looks:
./configure –enable-gpl –enable-pp –enable-libmp3lame –enable-libfaac –enable-libamr –enable-libamr-nb –enable-libamr_wb –enable-shared
On my searches to find the solution, I found ome great sources of information on FFMPEG, here are some links:
http://www.luar.com.hk/blog/?cat=32
http://www.db75.com/blog/archives/000177.html
http://julian.coccia.com/blog/index.php?p=66&more=1

Dear sir,
Currently I am facing the problem which is related your title: FFMPEG - Convert 3GP files to FLV. I am working on windowsXP and could convert AVI format to flv using the command:ffmpeg -i yourvideo.avi -ar 22050 -ab 32 -f flv -s 320×240 yourvideo.flv. However, when trying the mobile .mp4 video file, FFMPEG command always say unsupport codec for input stream. I would appreciate you a lot if you could help me with this issue.
PS: how can configure FFMpeg in windows XP with the following configuration :
./configure –enable-gpl –enable-pp –enable-libmp3lame –enable-libfaac –enable-libamr –enable-libamr-nb –enable-libamr_wb –enable-shared
Hi Peng,
I don’t have it set up on windows, only linux. It sounds like you don’t have the correct codecs installed.
If you are using it on windows - you should download the k-lite codec package - that should have everything you need.
Tom