How to convert mpeg to YouTube video

Posted: May 12, 2011 in Ubuntu
Tags: , ,

Hello everybody.

Today we will see the contrary to what was published in How to convert YouTube video to mpeg. Remember you must have mpeg supported in ffmpeg, access this post How to compile and install ffmpeg in Ubuntu 11.04 to know how you can do that.

So, open a terminal and run:

ffmpeg -i [file_name.mpg] -ab 56k -ar 22050 -b 500k -s 352x288 [file_name.flv]

Where:

  • [file_name.mpg]: File name you would like to convert.
  • -ab: Audio bit rate in kbit/s. The default value is 64k.
  • -ar: Audio sample rate in Hz. The default value is 44100 Hz.
  • -b: Video bit rate in kbit/s. The default value is 200 kb/s.
  • -s: Frame size. The format is width x height and the default value is 160×128.
  • [file_name.flv]: File name that will be generated.
  • For example:

    ffmpeg -i video.mpg -ab 64k -ar 22050 -b 733k -s 352x288 video.flv

    Like was posted in How to convert YouTube video to mpeg you can get some information about the file you want to convert. Still in the terminal and using the example above, type:

    ffmpeg -i video.mpg

    That’s it. See you next time.

    Advertisements

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s