Step 1: Opening the Terminal
First, cd to the directory, where your video file is (cd means change directory)
If the file is on desktop, the command would be: cd Desktop
if it's in the videos folder, it would be: cd /home/$USER/Videos
Now you're virtually inside that folder.
Step 2: Converting Video
The format of the output video comes from the file extension you specify on outputfile.
It can be any video format: flv, avi, mpg...
example: ffmpeg -i input.avi output.mpg
Now we start adding parameters.
parameters are options for converting video. they are in format: ffmpeg -i myfile.avi -parameter output.mpg
There are a number of parameters:
-ab -audio bitrate
-b -video bitrate
-sameq -produces same quality video, as the input
-target -target can be "vcd", "svcd", "dvd", "dv", "pal-vcd" or "ntsc-svcd".
example: ffmpeg -i myfile.avi -target ntsc-dvd mydvdfile.mpg
This makes a dvd video file
I want to convert an mpg file to flv with 350 video bitrate and 64 audio bitrate:
ffmpeg -i mympgfile.mpg -b 350 -ab 64 myflvfile.flv
I want to convert an avi to mpg with the same quality:
ffmpeg -i avifile.avi -sameq output.mpg
Here is a great tutorial on this: