Monday, March 22, 2010

Download multiple numbered files with wget

wget http://some/numbered/image_00{01..63}.jpg

This will download image_0001.jpg up to image_0063.jpg.

Friday, March 12, 2010

Enabling overlay for Intel graphics on Ubuntu

For Ubuntu Karmic and Lucid one needs to install a new kernel (e.g. 2.6.33) and current xorg packages, see here.

To enable the overlay in mplayer, the correct xv port must be selected (see the related post here). Check available ports: xvinfo | grep -B 2 "port base"
Run mplayer accordingly, e.g. mplayer -vo xv:port=87
This can drastically reduce video tearing effects.

Multi-threaded mplayer for faster 720p (HD) decoding / playback

Unfortunately, the related thread here is outdated. The following should work:

sudo apt-get build-dep mplayer
sudo apt-get install build-essential git-core autoconf libtool
cd
git clone git://repo.or.cz/mplayer-build.git
cd mplayer-build
./enable-mt
./init --shallow
make -j 6

Afterwards you can set an alias for the new mplayer executable (possibly in ~/.bash_aliases):
alias mplayer=~/mplayer-build/mplayer/mplayer

Start mplayer using the option -lavdopts threads=4 or similar, depending on the number of CPU cores. You can also add the following to your ~/.mplayer/config file:
lavdopts=fast=1:threads=4

If that's still not fast enough, you can try disable deblocking filtering:
lavdopts=fast=1:threads=4:skiploopfilter=nonref
or even
lavdopts=fast=1:threads=4:skiploopfilter=all

Also make sure to select a decent vo option, e.g. try -vo xv or -vo gl.