o from last 2-3 days I spent my so much time on file conversion with ffmpeg and mencoder.
After work done, I got some good links to follow for my future help and for all other readers.
- FFMPEG documentation lies here – http://ffmpeg.org/ffmpeg-doc.html ( This will give you the over all idea, if you want to know each and ever thing use this.
- Video/Audio Encoding Cheat Sheet, This is awesome page this will give the quick idea about ffmpeg and converting methods. from here – http://www.rodrigopolo.com/ffmpeg/cheats.html
- The next document is – http://howto-pages.org/ffmpeg/ – this will give the some more detail about ffmpeg with installation help and usage and more examples.
- Obviously you can not miss what wikipedia says about ffmpeg – http://en.wikipedia.org/wiki/FFmpeg
- Some 19 ffmpeg commands you can not miss from here – http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs
- IF you are using libx264 for high quality video then you have to have a look here – http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/ and here – http://rob.opendot.cl/index.php/2008/09/17/ffmpeg-libx264-presets/
- I used FLVTool2 also for flv manipulation tool for Macromedia Flash Video files (FLV). I used this for meta injection. useful link here- http://osflash.org/flvtool2
The command what I tried for my use is like this
For High Quality and FFMPEG and libx264 vcodec i used this.
/usr/bin/ffmpeg -i /home/ganu/public_html/video/316.mp4 -b 1M -bt 4M -vcodec libx264 -pass 2 -vpre hq -acodec libfaac -ac 2 -ar 44100 -ab 192k -threads 0 -s 552x311 -bufsize 200000000 -f flv -y /home/ganu/public_html/flvideo/316x.flv
Finally I used this this is working fine.
/usr/bin/ffmpeg -i /home/ganu/public_html/video/316.mp4 -r 30000/1001 -b 2M -bt 4M -acodec libfaac -ac 2 -ar 44100 -ab 192k -s 552x311 -f flv -y /home/ganu/public_html/flvideo/316x.flv
/usr/bin/ffmpeg -i /home/ganu/public_html/video/316.mp4 -f image2 -ss 00:00:1 -s 120x90 -vframes 2 -y /home/ganu/public_html/tmp/thumbs/316/%08d.jpg
For metadata injection i used like this.
/usr/bin/flvtool2 -Uv /home/ganu/public_html/flvideo/316x.flv /home/ganu/public_html/flvideo/316.flv
So first say the file 316.mp4 is converted to 316x.flv. And after flvtool2 the meta information is injected and final file will be 316.flv
So this is how, the flv conversion is done.
Happy Programming. 🙂