=====
I converted the video using ffmpeg command line as below.
----------
ffmpeg -i lions.mpg lions-ffmpeg.flv
----------
PS: input file name : lions.mpg
The video was converted fine.
Then I converted the video using mencoder using the command mentioned below.
-------------
mencoder lions.mpg -o lions-mencoder.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=450:400 -srate 22050
--------------
Then I generated a thumbnail using ffmpeg command mentioned below.
-------------
ffmpeg -i lions-ffmpeg.flv -ss 1 -t 00:00:01 -s 120x90 -r 1 -f mjpeg lions.jpg
-------------
Then I added meta data to the video.
-------------
flvtool2 -U -P lions-ffmpeg.flv
hasKeyframes: true
hasMetadata: true
duration: 9.976
cuePoints:
audiosamplerate: 44000
audiodatarate: 63.0167957356935
datasize: 482188
---------------
=====
By : singlehop.com
Labels :
Sever Linux

Previous Article


Responses
0 Respones to "How to convert mpg file to flv file using ffmpeg or mencoder?"
Post a Comment
»Thank you for reading this article
If you have questions or comments, please leave a comment
»You can click on the Subscribe by email to subscribe comments of this post
»You can register directly link pictures, mp3, video on the comment form.
»You may use some HTML tags such
»Please post comments polite and typing accented Vietnamese if possible
»Thank the good faith comment