<!– something random just like junk – yard –>

quick ffmpeg audio-video encoding usage help

Posted in LAMP, learning, linux, observation, opensource, tips, ubuntu by ganu on July 18, 2009

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.

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. :)

One Response

Subscribe to comments with RSS.

  1. Rodrigo Polo said, on July 26, 2009 at 12:26 am

    Hi, I use Yamdi for the meta data injection, it is faster, and it can inject huge files. runs in windows, linux, macintosh.

    Also, I made some win, linux, mac compilation for FFmpeg, and yamdi and put it on one Zip installer, check it out:
    http://www.rodrigopolo.com/about/wp-stream-video/ffmpeg-binary-installers-for-win-mac-and-linux


Leave a Reply