Create a DVD from MTS files

I had the problem that I received a bunch of MTS files and needed to create a DVD from them. I didn’t know the MTS format and even though VLC handled them well I needed a method to convert it into something more useful.

It turns out that MTS is a video format developed by Sony and Panasonic and is also known as the AVCHD format. AVCHD is HD video format based on the MPEG4 video codec. So I needed to convert and downscale this HD video and make it playable on a DVD.

Converting the MTS to mpeg2
By toying around for a while I found the following mencoder command did what I wanted as to convert the MTS to DVD mpeg2:

home/tjansson/mplayer/mencoder -oac copy -demuxer lavf -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9:threads=4
00020.MTS -ofps 50 -fps 50 -o 00020.mpg

Once I had created all the mpg files I pasted them together to one mpg file.

mencoder -oac copy -ovc copy 00017.mpg 00018.mpg 00019.mpg 00020.mpg -o 08-nov-2009.mpg

Creating a DVD with devede
The only thing missing to create a complete DVD was some kind of DVD menu and as I found out this could be done using devede, which is in the Ubuntu repositories.

Finally I extracted a sound bit from the video using ffmpeg. This sound bit I wanted to use when the DVD menu was playing.

ffmpeg -i 00024.mpg -f mp3 00024.mp3

I also graped a screenshot from the video to use as the DVD menu background. Finally I loaded up devede and put it all together to a iso file which afterwards could burn out. I won’t go in to details with devede but this snapshot should show how easy it is.

This entry was posted in Articles, Computer. Bookmark the permalink.

One Response to Create a DVD from MTS files

  1. Awesome post! I hate proprietary formats, thanks for doing the research for the mencoder string to get it to work in DeVeDe and saving me the time.

Leave a Reply