Sunday, March 28, 2010

MTS AVCHD and nautilus thumbnails

AVCHD, MTS, M2TS or even short MTS is an mpeg transport stream containing h.264 video and ac3 audio. It is the output of many HD capable cameras, including my Panasonic.

To get nautilus support for thumbnailing this in lucid lynx, you need to create a mts.schemas file containing:

<gconfschemafile>
<schemalist>

<schema>

<key>/schemas/desktop/gnome/thumbnailers/video@mp2t/enable</key>

<applyto>/desktop/gnome/thumbnailers/video@mp2t/enable</applyto>

<owner>totem</owner>

<type>bool</type>

<default>true</default>
<gettext_domain>totem</gettext_domain>
<locale name="C">
<short></short>
<long></long>
</locale>
</schema>

<schema>
<key>/schemas/desktop/gnome/thumbnailers/video@mp2t/command</key>
<applyto>/desktop/gnome/thumbnailers/video@mp2t/command</applyto>
<owner>totem</owner>
<type>string</type>
<default>/usr/bin/totem-video-thumbnailer -s %s %u %o</default>
<gettext_domain>totem</gettext_domain>
<locale name="C">
<short></short>
<long></long>
</locale>
</schema>
</schemalist>
</gconfschemafile>



Then use gconftool-2 to actually create the entries in the gconf registry (Oh, right, disclaimer...).
gconftool-2 --install-schema-file=mts.schemas

After restarting I nautilus started showing thumbnails for these video files.

You need Lucid Lynx. If you have Karmic and don't want to upgrade yet (wise, very wise):

http://archive.ubuntu.com/ubuntu/pool/main/s/shared-mime-info/shared-mime-info_0.71-1ubuntu1.dsc
wget http://archive.ubuntu.com/ubuntu/pool/main/s/shared-mime-info/shared-mime-info_0.71.orig.tar.gz
wget http://archive.ubuntu.com/ubuntu/pool/main/s/shared-mime-info/shared-mime-info_0.71-1ubuntu1.diff.gz
sudo apt-get build-dep shared-mime-info
dpkg-source -x shared-mime-info_0.71-1ubuntu1.dsc
dpkg-buildpackage -rfakeroot -b
sudo dpkg -i *.deb


(you need to change dirs a few times...)

No comments: