Chad Perrin: SOB

14 January 2009

Flash Workarounds for FreeBSD — especially YouTube

Filed under: Geek — apotheon @ 04:33

Getting Flash working on FreeBSD can be kind of a challenge, sometimes. This is because Adobe only offers narrowly targeted platform support for its Flash player plugins. There are up-to-date players for MS Windows and Apple MacOS X, of course, but the Linux player tends to lag a bit, tends to be more buggy, and is really Linux-only. This leaves many uses of Flash on the Web poorly, or un-, supported on Linux — and leaves other OSes such as the various BSD Unix systems entirely on their own.

There are a number of options that people have employed for working around the problem on FreeBSD. One is to install the MS Windows version of Firefox using Wine, and use the MS Windows Flash plugin with that.

Another is to install the linux-firefox port, which uses FreeBSD’s Linux compatibility libraries, along with the linux-flashplugin port. It’s sorta like the Wine solution, really, using a Linux version of Firefox with a Linux version of the Flash player plugin.

A third is to use the FreeBSD-native port for Firefox, and use the nspluginwrapper port with the linux-flashplugin port.

There are also some other options for getting a Flash plugin working with a FreeBSD-native port of Firefox, or other browsers, but they tend to be buggier than using nspluginwrapper.

Then, of course, there are open source Flash players, like swfdec and Gnash. The downside here is that they aren’t really up to the widespread Flash support level of the Adobe Flash player. It’s typical for swfdec and Gnash to fail to properly support Flash video, such as YouTube.

Personally, I have exactly two cases of needing Flash, generally speaking. One is the traffic graph in WordPress (it doesn’t need to be written in Flash, but some idiot in the WordPress development team apparently thought it should be — much the same way some idiot thought it should be written in PHP as a heap of spaghetti code in the first place). The other is YouTube.

I’ve discovered that swfdec supports the WordPress traffic graph just fine. It’s also open source, which is a plus. While it (like Gnash) is GPLed, it at least isn’t a GNU project the way Gnash is, so I feel like it might just marginally be a better choice for purposes of ethical boycott. Marginally. At best.

That leaves me unsatisfied with regard to YouTube, though. Thank goodness I’m not the only person in the world with Flash plugin support for YouTube problems. Someone — some several someones, actually — out there has (have) solved my problem. The solution looks like this:

  1. Install MPlayer.
  2. Install the win32-codecs port (to get Flash video support in MPlayer).
  3. Install the youtube_dl port.
  4. Enter youtube-dl 'url-for-YouTube-video'.
  5. Enter mplayer video-filename.flv.
  6. Watch the video.

I’ve run across probably half a dozen FreeBSD users who are, in many ways, quite more knowledgeable than me about the OS and its common tools, who are entirely unaware of the youtube-dl + MPlayer option. I figured I should just post the specifics here so maybe a Google search for freebsd flash youtube will help someone figure out how to solve this problem in the future.


  1. […] a week and a half ago, I talked about Flash Workarounds for FreeBSD — especially YouTube. I mentioned that my current approach to dealing with Flash on my FreeBSD laptop is to use the open […]

    Pingback by Chad Perrin: SOB » framerate adjustment for crappy Flash video — 23 January 2009 @ 11:58

  2. […] in fact, the top Google result when searching for “youtube-dl” mplayer freebsd happens to be Flash Workarounds for FreeBSD — especially YouTube, a description of exactly the setup I use for dealing with Flash on the […]

    Pingback by How to deal with Adobe Flash and Reader vulnerability | IT Security | — 27 July 2009 @ 08:44

  3. […] YouTube workarounds for FreeBSD (and other Unix-like systems) […]

    Pingback by Chad Perrin: SOB » Little pig, little pig, let me in. — 3 August 2009 @ 01:44

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License