Flash videos and other essentials

Today I mentioned to my girlfriend that one of the reasons I liked NetBSD was that by installing 300MB you can get a fully working system in less than 1GB of hard disk space. She coughed when I said "fully working", reminding me that my sound card isn't working yet, there's no 3D acceleration and my browser can't even play youtube videos. I went on to explain that another great thing about NetBSD is that it supports 57 platforms on 16 CPU architectures and that as a NetBSD user you tend to care more about important UNIX things such as running daemons, rather than dispensable amusements like playing music or watching movies -- but who am I fooling? I've used NetBSD as my daily desktop for many years and I like it when things work.

So I set out to make flash videos play tonight, which I'd tried briefly before without success. The youtube plug-in in totem could search youtube, but as soon as I double-clicked a video it told me that a plug-in was missing, keeping obnoxiously secret about which one. Since I'd already installed the gstreamer0.10-plugins meta-package, which claimed to include all the GStreamer plug-ins, I didn't know where to start looking. Eventually I found out that four current GStreamer plug-ins are actually missing from the meta-package, namely alsa, faac, jpeg and soup. I don't know about the other three, but the soup plug-in was mentioned as a dependency of totem's youtube plug-in. So I installed it and now totem can actually play the videos it finds!

The next thing I tried was the gnash Firefox plug-in, but their wiki page makes it look rather daunting to play even a single video using shell commands like these:

$ url=http://youtube.com/watch?v=9sJUDx7iEJw
$ vars=$(wget --quiet -O - "$url" | grep -F watch_fullscreen | cut -d \? -f 2 | cut -d \" -f1)
$ echo "$vars"
$ gnash -vv -F 2 -P "FlashVars=$vars" http://youtube.com/player2.swf
I might have misunderstood Web 2.0 completely, but surely this is would hardly put an end to my girlfriend's mockery?

Next up was swfdec. I already had the standalone swfdec-gnome player installed, but hadn't taken a look at the swfdec-mozilla plug-in yet. And behold -- after installing it and linking the resulting plug-ins from share/mozilla/plugins to share/firefox/plugins, I now have a youtube player! There are decoding errors and sound sync problems in some of the videos I've tried, but with the quality of most of the videos on youtube nowadays that can only enhance the atmosphere. And the best thing about it: it already has Flashblock built-in, requiring a click before it will start playing -- bonus!

So now I have two ways of watching youtube videos either in a separate UI or in the browser, increasing the chances that one of them can actually play all those indispensable videos out there.

Comments