2009年12月11日 星期五

mplayer-video-thumb-1.4-1

How to install mplayer-video-thumb-1.4-1 in ArchLinux?

由於Nautilus是用totem來產生影像的縮圖,但是用totem來產生縮圖實在是很慢,所以就有人用mplayer取代totem來產生縮圖,前一版(1.3-3)是用shell script,1.4-1則是用python重寫過。

把檔案抓下來後,發現他附的install.sh和ArchLinux不太對tone,所以沒辦法直接執行安裝,再加上拜估狗拜了了半天還拜不到東西,所以只好自己亂搞........還好最後有成功 XD

1. Download mplayer-video-thumb-1.4-1 from here.

2.Install totem and pil, it can work without gstreamer0.10-{{bad,good,ugly,base}{,-plugins},ffmpeg}
$ sudo pacman -S pil totem
3. Backup totem-video-thumbnailer
$ sudo cp /usr/bin/totem-video-thumbnailer /usr/bain/totem-video-thumbnailer.orig
4. Copy mplayer-video-thumb.py to /usr/bin/
$ sudo cp mplayer-video-thumb.py /usr/bin/
5. Link totem-video-thumbnailer to mplayer-video-thumb.py
$ sudo ln -s /usr/bin/mplayer-video-thumb.py /usr/bin/totem-video-thumbnailer
6. Copy flim-role.png to /usr/share/totem/
$ sudo cp flim-role.png /usr/share/totem/
7. Restart nautilus
$ killall nautilus
以上是大概的步驟,順便把install.sh修改成在我的系統上可以直接安裝。
#!/bin/bash
sudo su
echo "backup totem-video-thumbnailer"
mv /usr/bin/totem-video-thumbnailer /usr/bin/totem-video-thumbnailer
echo "Copy mplayer-video-thum.by to /usr/bin/"
cp mplayer-video-thumb.py /usr/bin/
echo "making link"
ln -s /usr/bin/mplayer-video-thumb.py /usr/bin/totem-video-thumbnailer
echo "Copy film-role.png to /usr/share/totem/"
cp flim-role.png /usr/share/totem/