I'm having problems regarding conversion of video to flv format. Below is my command for conversion, but it seems to convert the video to flv but the file size remains 0 KB, what could be the problem, please suggest. My command:

exec("/usr/bin/ffmpeg -i $inputFile -ar 22050 -b 300000 -ab 128 -f flv -r 25 -s 320x240 - | /usr/bin/flvtool2 -U stdin $outputFile", $output);

I tried to do:

exec("which ffmpeg");

And it showed me /usr/bin/ffmpeg, So what could be the problem. Is is that the flvtool2 is not working properly, or the path the flvtool2 is wrong (if yes then how can i check the path) Help needed


WinFF is a GUI for the command line video converter, FFMPEG.

It will convert most any video file that FFmpeg will convert. WinFF does multiple files in multiple formats at one time. You can for example convert mpeg’s, flv’s, and mov’s, all into avi’s all at once.

WinFF is available for Debian, Ubuntu, Redhat based GNU/Linux distributions. WinFF is available in Brazilian Portuguese, Bulgarian, Chinese Traditional, Danish, English, French, German, Greek, Hebrew, Italian, Norwegian, Polish, Portuguese, Russian, Serbian, Slovenian, Spanish and Turkish.

This may provide an easier solution instead of CLI.

To install sudo apt-get install winff


enter image description here


You can run "which flvtool2" and it'll show you the path. Have you tried running the command directly on a commandline, not from within PHP, and seeing if you get errors or output?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.