2 days ago I got a project in which I have to upload avi, mpeg or 3gp movie clip and convert this clip to flv as well generate thumbnail for this video. I know that this can be done through ffmpeg. But I didn,t know how haha..
Well I searched enough and start making environment for development. I did following mistakes.. I am listing those mistakes. I am 100% sure it will save your day.
I was using Windows environment: FFmpeg is primarily made for Linux environment not for windows. Some experts developed windows version of ffmpeg. Some functions are unavailable in windows version. SO I suggest you to use Linux environment.
I thought that only ffmpeg can do everything: FFmpeg is a command line tool to do video related task (only video) such as clipping, video conversion, frame extraction etc. But for the sound, watermarking you have to use other packages too. I will tell about these details later.
php-ffmpeg and ffmpgeg: I was very much confuse between php-ffmpeg and ffmpeg. I after 30 minutes of googling I came to know that ffmpeg-php is extension for php which provide handy functions to convert videos and if you use ffmpeg then you have to use exec() command to execute ffmpeg commands.
Step by step procedure to convert video:
1. Setup Linux system.. forget that windows can do the job!
2. follow instructions and install all required modules. here is comprehensive step by step procedure available http://vexxhost.com/blog/2007/03/03/installing-ffmpeg-ffmpeg-php-mplayer-mencoder-flv2tool-lame-mp3-encoder-libogg-%E2%80%93-the-easy-way/ . if you face any problem then you can ask me.
Remember: Installation order LAME->FFmpeg->Ruby->FLVTool2
3. Now you have successfully setup environment. Download any example from net and run.
The best thing I got is videotoolkit you can download it from Here . It saved my day. you can also try it. It’s really worth to try this!
Hope this article will helpful. If you still have any problem then ask.. Happy coding….