Fail captcha

Monday, 30. November 2009 20:40 - daniel - Other - 0 Comments


Type the signs on the image...



video playback with compiz

Sunday, 29. November 2009 10:16 - daniel - Other - 0 Comments


Video playback with compiz running is pretty slow and sometimes there are some nasty glitches, like not being able to go to full screen mode, black video etc. Some of this is because of how compiz handles the video. But the good news is there is a way to get good video playback with compiz running.

There is a patch for mplayer 1.0rc2 that lets mplayer use some compiz functions to draw the video. You need to have the video plugin enabled in compiz for this to work.

First we need to get the mplayer sources.

apt-get build-dep mplayer
apt-get install build-essential
apt-get source mplayer

Navigate to mplayer-1.0~rc2/libvo, download the patch and apply it.

patch -p0 vo_xv.c mplayrepatch.patch

Now you should update debain/changelog to create a new version of the package and build and install the package with

fakeroot dpkg-buildpackage -b -uc -us
dpkg -i mplayer_1.0-rc2-0ubuntu17_i386.deb
I tried this with ubuntu 8.10 intrepid. If newer versions of ubuntu ship with a version of mplayer that is incompatible with the patch you have to get the mplayer1.0rc2 source code from the mplayer site.

Video playback should work now without problems. There are some other goodies apart from decent video playback speed and working full screen mode, but these two were the most important for me.



(Yet another) short URL service

Tuesday, 13. October 2009 17:30 - daniel - Other - 0 Comments


I've set up a short URL service at url.pew.cc. It's basically the same as tinyurl.com, but with a cool ajax UI. Yay ;). And the best? url.pew.cc is one character shorter then tinyurl.com. Now if that ain't a perfect reason to use it.

Anyway, I just wanted to do my own url shortening and don't rely on a third party service for it. url.pew.cc is powered by php and sqlite. It has the same API as tinyurl.com. http://url.pew.cc/files/api-create.php?url=URL will respond with the short url. Adding format xml will respond with an xml file and a bit more verbose error messages, e.g. http://url.pew.cc/files/api-create.php?format=xml&url=URL.

The xml format used is:

<shorturl>
<status>0</status>
<url>ORIGINAL URL</url>
<short>SHORT VERSION</short>
</shorturl>

And for errors:
<shorturl>
<status>1</status>
<error>ERROR MESSAGE</error>
</shorturl>

Sorry, there is no create.php for a fancy html output. If you want to use it as a bookmarklet, this will have to do. Bookmark this link: url.pew.cc

If it works alright I might share the code at some point.



Craft DB WoW Addon

Sunday, 11. October 2009 11:10 - daniel - Other - 0 Comments




Craft DB keeps track of crafter on your server. Whenever you open a profession link, the skills and the name of the crafter will be saved and can be displayed when needed. If you are looking for that Blade Ward enchant and can't remember who has the recipe, you can use CraftDB to look who has it.



Craft DB will display names in different colors if they are online, offline, in your guild, on your friendlist or just some random guy who posted his profession into the trade channel

As soon as you open a profession window (either your own, or from a link), Craft DB will scan all the available recipes and saves them and the name of the person for later use.

Craft DB provides a LibDataBroker launcher to open the windows. If you don't have a LibDataBroker display addon installed, you can use /craftdb or /cdb to open Craft DB.

When you enter something into the search box, Craft DB will perform a search on the currently selected profession and only displays the matching spell names.

Here's the project on wowace.com: Craft DB
Here's the download on curse.com: Craft DB



Video containers are shit

Thursday, 8. October 2009 11:51 - daniel - Other - 2 Comments


This is going to be a rant, so skip it if you don't care.

Video playback is a pain in the ass. It's not just about codecs and players, but the video containers themselves are shit. I only had one container that has not caused problems yet. Everything else bugged sooner or later.

WMV regularly fails to resume video playback after pause in Media Player Classic. No idea why, but pause just doesn't work here.

MP4 caused some weird problems in mplayer, where the video length is all wrong and the audio and video go out of sync. No idea what's wrong with those shitty files, but I pretty much can't watch those files like this. And to make matters worse, mplayer is the only video player that has decent performance on Linux with Compiz running. The only way to fix these files was to remux them to MKV.

AVI files sometimes come without an index, requiring rebuilding of said index. I just don't get how a encoder can fuck up a video so much that it's unplayable on some players. And why doesn't anyone check before redistributing this files?

The only container I'm happy with is Matroska (MKV). The playback works in every player I use and I have yet to encounter shitty behaviour in any player.