Friday, 4 September 2009

HOWTO: Convert and write AVCHD (.mts) to DVD with Linux

Inspired by

Sucessfully converted video from my Panasonic HDC SD20 using these instructions:

Using ubuntu 9.04 jaunty.

Connected camera via usb.

Simply copied the AVCHD folder under the top level PRIVATE folder. You actually just need the MTS files in the AVCHD/BDMV/STREAM folder.

I Installed the WinFF (via ubuntu menu Applications/Add&Remove). WinFF is just a front end to ffmpeg.

In WinFF, I dragged and dropped all the MTS files to WinDD.

In WinFF,Then I selected the “Output Details” and picked “Convert to: DVD”. “Device Preset” PAL DVD HQ (16:9).

VERY IMPORTANT: I had to set “Additional Options/Audio Settings/Audio Channels: 2″. Otherwise I got an error on the console when trying to convert: “Error while opening codec for output stream #0.1 – maybe incorrect parameters such as bit_rate, rate, width or height”.

In WinFF, click Convert. Its very very slow: 8 hours per hour of video!

I ended up with one output mpg file per input MTS file.

Next step, create the DVD structure (see the end for an example dvd.xml file which you need to edit to list which movies to include on the DVD):

dvdauthor -o dvd -x dvd.xml

Check it worked with

mplayer dvd:// -dvd-device ./dvd

Burn the DVD with

growisofs -dvd-compat -Z /dev/dvdrw -dvd-video ./dvd/

Example dvd.xml file used by dvdauthor above:

<vmgm />
<video format="pal" aspect="16:9"/>
<audio format="ac3" lang="en"/>
<vob file="00026.mpg"/>
<vob file="00027.mpg"/>
<vob file="00028.mpg"/>
<vob file="00029.mpg"/>
<vob file="00030.mpg"/>
<vob file="00031.mpg"/>
<vob file="00032.mpg"/>
<vob file="00033.mpg"/>
<vob file="00034.mpg"/>
<vob file="00035.mpg"/>
Post a Comment