Activating HW acceleration for embedded YouTube videos

Ever since Google Chrome became terribly slow in gmail, drive, etc regardless of computer or platform, I’ve picked up Mozilla Firefox again. The switch didn’t go painless but I really was tired of typing a whole sentence before Chrome would display it. This problem produces itself not only on google sites but actually in about any text box I would type, be it intermittently.

The main issue with switching to Firefox was stuttering video playback. As you may know, chrome bundles its own flash plugin which is actually the same plugin but tweaked to work optimally with chrome (pepper api). At the same time google controls distribution/patching.Β  So, if google can tweak the plugin for good performance, why can’t we? πŸ˜‰

First thing I discovered, is that somehow flash hardware acceleration was disabled. You can enable this by right-clicking on any flash video and click on “settings”. In the “Display” tab, you can check “Enable Hardware Acceleration”.

flash enable HW acceleration settingSmooth youtube vids FTW! Fullscreen video’s also showed up on the correct monitor now (dual head setup). My joy was only for limited time, as I discovered hardware acceleration dit not work for embedded youtube video’s. I was happy nevertheless as the bulk of video’s I watch are on youtube.

However, today, watching the Jolla Tablet intro movie embedded on the site, I could not help feeling the itch again. Why oh why did this play fluently in chrome but did it suck so hard in firefox? Check out this framerate:

yt_embedded_noHWaccel1I started by creating a virgin system account to avoid having my 7 year old home dir, possibly dragging along some evil deprecated setting, be the culprit. This didn’t change anything but at least I had both a blank Firefox and Chrome profile to test with.

First I was under the impression that there would have to be a global flash settings file since when right-clicking on the embedded video, it showed the “Settings” as disabled. There does indeed exist such file: /etc/adobe/mms.cfg in which you can put “EnableLinuxHWVideoDecode=1”. This only crashed my firefox. I did install an additional vdpau package but it didn’t matter. Also, looking at the “Nerd stats” (right-click on video), I learned even youtube vids didn’t have hardware accelerated decoding, only accelerated rendering. So I didn’t proceed on this path.

Now let’s check out how chrome is doing it. Pulling up the “Nerd stats” did surprise me: chrome does not use flash by default for embedded video’s, it uses WebM/VP9!

This begs the question: how is Firefox’s WebM support? Turns out it’s no problem, just change your youtube html5 setting from “default player” (=flash) to “html5”.

youtube html5 settingsSo theΒ  chrome pepper flash tweak actually came down on not using flash. πŸ™‚ Youtube does this by default on chrome but not on firefox. Naughty Google!

You may notice that Firefox does not support all youtube hmtl5 features yet. In particular, you will be served VP8 video’s instead of VP9 which may make a difference in the available resolutions. However, Media Source Extensions and WebM VP9 can already be activated by setting:

media.mediasource.enabled = true

in about:config. Experimental h264 support can be activated with:

media.mediasource.ignore_codecs = true

You can track the MSE support in firefox in this bug report.

Itch scratched and fixed. Finally πŸ™‚

WordPress upgrade

In the past 6 years, this blog hasn’t changed that much. I added a plugin here and there, integrated google buzz posts, etc., but the core wordpress install remained the same. After procrastinating the upgrade several years, I thought, mmm.., spammers don’t bother anymore to hack an ancient wordpress install! So I left it at that. πŸ™‚

Unfortunately, lately, spammers have become less lazy, so my blog still got targetted again. Today I finally made the switch to WordPress 3.3.1 and although I didn’t expect wordpress to support the giant version leap, it did!

I was tempted to leave the design just the way it was (you know, good old kubrick), and leave it at just a back-end upgrade. But then I thought it would be nice to have a descent display on mobile devices, which comes for free with the newer themes of course. Also my beloved antispam plugin Spam Karma 2 which was abandoned a few years ago (Thanks anyway Dave!), was in for replacement.
So I decided to switch to the fancy twentyeleven theme and tweak the header (about the only thing I care to tweak :)). The tweak consists of making the header smaller and move it up:

#branding img {
height: 180px;
margin-bottom: -7px;
margin-top: -100px;
width: 100%;

The best way to apply this tweak is by creating a child theme.

Btw, the header image is based on a photo of one of the layers present in an LCD display (thanks to sonic840).

Using widgets I was able to recreate the same look as in the old theme (having the categories, archive, etc).
I was hesitating to keep with wordpress, but I’m glad I did (for a blog at least):

  • Upgrade went well from an ancient version
  • Killer feature: install/upgrade new plugins from the web interface, it just works!
  • I love the fullscreen authoring mode

Google to disable site scraping feed service

For ages, I had been requesting a site monitoring feed for sites that don’t have an rss feed. It’s not so difficult, keep track of changes and post the diff in an RSS feed (kind of πŸ˜‰ ). In the beginning of this year, google finally implemented that! I didn’t expect it.

Anyway, short joy: google has announced it will discontinue this service. πŸ™

Here is a tip for people like me having hundreds of feed to find back those special feeds more easily: go to manage subscriptions and filter on “webfeed”. All those site scraping feeds start with “”. Happy page2rss migration. πŸ™‚

Best. Plugin. Ever.

I was trying to watch a vid on a website which was quicktime only. Since I’ve had some trouble a few days ago to play a wmv file on a windows media only site, I decided to give the firefox mplayer plugin a try. I had heard of it before but never found a compelling reason to install it. Until now. It just plays _everything_! I can’t believe how I could live so long without it. πŸ™‚ Or maybe because 99% of the web’s vids are flash? πŸ˜‰ (which works, of course)

Here is the supported formats list:
Window Media: wmv, avi, asf, wav and asx
QuickTime: mov and smil
MPEG Video and Audio: mpeg and mp3
Ogg Vorbis: ogg
AutoDesk FLI: fli and flc
Vivo: vivo
Real Player: ram and rm

Securing mysql

Everyone knows, first thing you have to do after installing mysql, is setting its root password. I used to do this using the mysqladmin tool like this:

/usr/bin/mysqladmin -u root password 'new-password'

For starters, you should not forget to do the same command for your other host names (-h option), but also there are still some other tasks like disabling anonymous access and removing the test databases. Today, having another mysql install, I noticed that the install script mentions this neat tool packaged with mysql to do just all that. πŸ™‚

Just run /usr/bin/mysql_secure_installation and you’re done!

Freenode raising the bar for routers

This week I noticed a strange problem with my irc client.
First day (Tuesday), it would fail to connect. Since my login to the campus network expired, I had to relogon, so I thought the problem was simply related to that and that the irc client wouldn’t recover until an application restart.
Second day, it still didn’t connect, which I thought was strange, but I didn’t have time to chat anyway, so I neglected.
Today, I frowned and decided to take a look πŸ™‚

First of all, I noticed it wasn’t really a connect problem, it couldn’t even resolve the hostname. Heh? When I ran “nslookup” it spit out:

;; Truncated, retrying in TCP mode.
;; Connection to for failed: connection refused.

I went to the freenode site, to see if there were any news items reporting problems or outage. There didn’t seem to be a news section. So I assumed: no news == good news. πŸ™‚

Then, I noticed the actual hostname for irc is really instead of “chat” or “irc” in front works both. Indeed, that did work. So why did suddenly stop working? Was it because of a recent patch (although I couldn’t remember applying any in the last week)? Was it because of my firewall? Both answers are negative.

The friendly chaps at #freenode kindly tipped me off that the dns record had probably become too large to be transmitted through UDP and that TCP dns requests seemed blocked. Servers get added to the network on a regular basis, so that would explain why it suddenly stopped working. It became obvious that my dusty old router would be the culprit (quick tip: never blame your linux kernel first πŸ˜‰ ). After all, according to contemporary standards, one could declare mine “ancient”.

Quite recently I already encountered some problems with it. After an upgrade of the campus network, I kept having strange packet loss when playing multiplayer games for more than 2 minutes. I had never updated my firmware, so I thought I might try that. Although the latest firmware release dated back to 2004, it did help! mattie=1, router=0.

After I pulled the router out of the chain, the dns problem was solved indeed! Unfortunately, updating firmware is no longer an option, so I guess the router and I are even now. πŸ˜‰

On #freenode, I was told I wasn’t the first one to report this problem, so I guess a lot of people will need to update their firmwares, buy new routers, or simply use a more local dns name. πŸ˜‰

New google reader – render problem in opera

Whether you like the new look or not, it seems there is an issue with long feed names being wrapped at the icon position which wastes valuable space (read my problem description and support request here). The day after, I already received a fix from an Opera employee πŸ™‚ very simple, just use the following user css file:

.scroll-tree .name {
padding-left: 0 !important;
position: relative !important;
left: 17px !important;

If you are unfamiliar with user css: right-click on the page and edit the site preferences. In the display tab, point the “my style sheet” to the relevant user css file. Make sure “my style sheet” usage is enabled in Preferences->content->style options->presentation modes->author mode->my style sheet (also more easy accessible through manage modes under the style mode button on the extended view bar if you use that).