Thursday, August 5, 2010

How to convert mp4 file to flv file on linux machine using the ffmpeg binary ?

Guys,

I executed the following command to do the same:

====
root@starslite [~]# ffmpeg -i vdosong.mp4 -f flv -vcodec flv -r 30 -b 512000 -s 400x300 -aspect 1.33333333333 -acodec libmp3lame -ab 128000 -ar 22050 -map_meta_data /home/user/public_html/files/videos/testme.flv:/home/user/vdosong.mp4 /home/user/public_html/files/videos/testme.flv
====

PS : /home/user/public_html/files/videos/testme.flv is the path of out put file and
vdosong.mp4 is source file inside the current directory(ie /home/user/).

You can also try to use padding. Here is the exact command :

=====
root@starslite [~]#ffmpeg -i vdosong.mp4 -f flv -vcodec flv -r 30 -b 512000 -s 400x300 -aspect 1.33333333333 -vf 'pad=0:0:0:0:black' -acodec libmp3lame -ab 128000 -ar 22050 -map_meta_data /home/liveghos/public_html/files/videos/testme.flv:/home/liveghos/vdosong.mp4 /home/liveghos/public_html/files/videos/testme.flv
=====

Try :)

No comments:

Post a Comment