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.

Small tips: Guake, DBAN and X25-V

Since I started my new job I haven’t found much time for my blog, but now I had a some more quite days in the easter to put together tips and experiences I had the last months.

Dropdown console – yakuake, tilda, guake
Up until KDE 4 became the default of Ubuntu I had been vivid KDE user, but now I changed my ways and I am quite happy with Gnome. One of my favorite programs was yakuake – this is a tab-featured implementation of a Quake-like drop down console for Linux. I use this all time but it depends heavily on KDE libraries and is even install is somewhat broken in Ubuntu 10.04 lucid, so I decided to find a Gnome alternative.

tilda was the first yakuake alternative I tried, but tilda isn’t very feature rich or nice, so stumbled upon guake. guake had all the features of yakuake and is highly integrated into to the Gnome project.

Securely wipe a harddrive – DBAN
I was in the situation that I was to get rid of a personal hard drive but didn’t want let the next owner be able to extract my personal private sshkey or any other personal information for that matter.

Deleting or reformatting that hard drive does not securely remove data. Deleting files just free up the space for the OS to use and reformatting also does not overwrite the data but only deletes the address tables for the disk.

So what I did was to use www.dban.org and even though the name “Darik’s Boot And Nuke” sound like a very private/amateurish project it has a good reputation in community. DBAN rewrites every part of the disk with randomly generated data several times to ensure that data cannot be recovered and no data is left behind.

SSD harddrive – definitely worth it

I have a Thinkpad X200 laptop which came a descent 7200RPM 160GB hard drive. However it was noisy at night when laying in bed when the hard disk would spin up every now and then. Even though I would love to have a Intel X25-M or X25-E I don’t need for the performance, at least not the current price.

After having read the article Intel’s X25-V & Kingston’s 30GB SSDNow V Series: Battle of the $125 SSDs [anandtech.com] I decided on the Intel X25-V. This is cheap, have a great read-speed, power-efficient and is completely silent. As my laptop is not use for heavy data processing write-speed is not important to me and is still much faster than my old hard drive. This size is not big but all my files are on a server, so isn’t a issue. For my use the X25-V is great: my computer is completely silent and feels much more snappy. I can go from completely cold to my desktop (auto-login) in 20s including BIOS. 🙂