To convert ogv, ogg to avi/mov/mpeg /mp4 or extract the sound of video to mp3, etc. On Ubuntu, we can use ffmpeg to get it done.

On this entry, i'm going to show how to install and use ffmpeg on Ubuntu 12.10 Quantal Quetzal.

1. Intalling the Ubuntu Restricted Extras package.

By installing this package, ffmpeg can effectively move files between formats. Open terminal, and type the following command to install :
      sudo apt-get install ubuntu-restricted-extras
 
After you’ve installed the Ubuntu Restricted Extras, let's install ffmpeg

2. Installing and using ffmpeg

      sudo apt-get install ffmpeg
 

To convert video from ogv to avi

On terminal try :
       ffmpeg -i  input.ogv -vcodec huffyuv -acodec pcm_s16le output.avi
 
It's will convert ogv to avi for a while.

To extract sound of video to mp3.

On terminal use the following command:
      ffmpeg -i input.avi output.mp3
 
It will create an audio file named output.mp3 which is extracted from video file. However, ffmpeg creates audio files with a bit rate of 64kbps by default. It's may be is low-quality audio for some one. To force ffmpeg create mp3 file at the bit rate you want, just add the -ab to the command:
      ffmpeg -i input.avi -ab 256k output.mp3
 
Don't forget man command if you want more:
      man ffmpeg