Convert MTS (AVCHD) Files to xvid#

I have a Panasonic Lumix camera that generates MTS (AVCHD) movie files. These files are 720p HD files and are really large. I want to store them in a smaller file format without sacrificing quality. Using ffmpeg it is pretty straight forward to convert an MTS (AVCHD) movie file to xvid using ffmpeg. Using the following command will accomplish the goal nicely:

$ ffmpeg -i 00001.MTS -vcodec libxvid -b 2000k -acodec libmp3lame -ac 2 -ab 128k -s 1280x720 movie1.avi
  • i - This tells ffmpeg what file is going to be converted

  • vcodec - This tells ffmpeg to use xvid compression

  • b tells ffmpeg to use a certain bitrate. In this case the bit rate is 2000

  • acodec - Tells ffmpeg to use mp3 to compress the audio stream

  • ac 2 - Use 2 channels

  • ab 128k - Set the audio bit rate

  • s 1280x720 - set the size of the movie

Depending on your camera you will probably have to play with the parameters.