Jul 112010
AVCHD and YouTube

More a memo for me than anything else:

To convert an MTS file which is what I get from my video camera (Canon HF S10) to something else which is playable on a normal machine or which can be send to someone or uploaded to YouTube, ffpmeg is your friend:

ffmpeg -i MOVIE.MTS -vcodec libxvid -vb 800k -aspect 16:9 -acodec libmp3lame -ab 128k -s 720x540 MOVIE.AVI

This AVI can then be uploaded to YouTube. I could not seem to make sound able to work with AC3 when uploading. All I got was deadly silence. However mplayer had no issues playing a movie encoded via
ffmpeg -i MOVIE.MTS -vcodec mpeg4 -vb 800k -aspect 16:9 -acodec copy -s 720x540 MOVIE.AVI

I will have to see what the PS3 via ps3mediaserver can play.

Update: 2-pass encoding not only adds quality, but keeps the file size better to where it should be:

ffmpeg -i MOVIE.MTS -vcodec libxvid -vb 800k -aspect 16:9 -s 720x540 -pass 1 -an -f rawvideo -y /dev/null
ffmpeg -i MOVIE.MTS -vcodec libxvid -vb 800k -aspect 16:9 -pass 2 -acodec libmp3lame -ab 128k -s 720x540 MOVIE.avi