Users mail me often with qestions like can you give me the list of packages that are needed to successfully convert video to flash with PHP. Here’s the list of packages you need to install to get it work:
sudo apt-get install php5-ffmpeg ffmpeg flvtool2 mencoder lame