December 08, 2010

Transcode AVCHD to MPEG using ffmpeg

Open Source | Photo

I recently bought a Panasonic Lumix DMC-LX5 camera, which records video in both MPEG and AVCHD formats. The camera has some nice improvements over the previous LX3 camera. I really like the extended zoom range, 24-90mm versus the 24-60mm in the old camera. Another feature I really love is the ability to zoom while shooting a movie. The sounds quality improved significantly as well, some videos I took with the old camera had some strange sound issues.

One thing that drove me nuts however was the inability of iMovie 7 or Final Cut Express to import the AVCHD movies I made with the camera. They would import only the first few minutes of the movie and invariably stop after that. The MacOS X software that comes with the camera doesn't handle movie files, and the Windows version sucks badly.

So I was stuck with no way of converting the AVCHD movies to an MPEG file format that can be viewed on MacOS X. Adobe Photoshop Lightroom 3, the program I use to catalog the photos and videos I take, does not understand AVCHD either.

You can however convert the .MTS files from the AVCHD directory created by the camera using the open source ffmpeg tool. To do this, make sure you have MacPorts installed on your computer, then install ffmpeg like this:

sudo port install ffmpeg +gpl +lame +x264 +xvid +mp3 +aac

Once you have ffmpeg installed, you can convert the MTS files like this:

ffmpeg -i <file>.MTS -vcodec mpeg4 -f mp4 -sameq <file>.mpg
Posted by ovidiu at December 08, 2010 10:54 AM |
Comments
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?



 
Copyright © 2002-2011 Ovidiu Predescu.