Can any one help me. I looking to convert a video file into flv using php and ffmpeg. I have tried some of the existing solution on stackoverflow but with no luck.
exec('ffmpeg -i Videos/robot.avi -ab 96k -b 700k -ar 44100 -s 640x480 -acodec mp3 Videos/robot.flv');
This is my code nothing happens when I execute this.
Check out this example: https://trac.ffmpeg.org/wiki/PHP
You should get it running in your CLI first before writing a PHP script.
After reading the example it seems like you want to use
Here's an ffmpeg php class that might be helpful:
https://github.com/olaferlandsen/FFmpeg-PHP-Class
I assume your ffmpeg command works from CLI OK. If not, get that working first.
If you are trying to output FLV created on-the-fly with PHP and ffmpeg, try this:
#### EDIT #####
Here is a link to ffmpeg documentation that talks about using STDOUT: http://www.ffmpeg.org/ffmpeg-doc.html#TOC41
I think you should be able to do this:
I needed 'sudo' to run it on my local machine. For video/x-flv you need: "Content-Type: video/x-flv". My code: