First attempts to watch YouTube videos on amd64

Recently, Adobe released the Beta of Flash player 9 for linux. It only comes in a 32bit version, as there seem to be…issues to get a native 64bit version developed/built. Whatever. So anyway, I set out to use this new flash player to watch some videos from YouTube on my native Debian Unstable amd64 system.

The first attempt is with the Standalone player. The simple way to find out what the player requires to run is run `ldd` on it, which spits out a list of libraries it’s linked against and whether or not they can be found. With this method, I found out that I had to install the 32bit versions of the following libraries:

  • libgtk2
  • libglib2
  • libpango1
  • libatk1

This of course next to the standard 32bit runtime I already had installed earlier. YMMV. To install these libraries I went to the nearest Debian mirror, and retrieved the “i386″ packages of these libraries. I unpacked them with “dpkg -x” and moved the resulting content to /lib32. After this, `ldd` resolved all dependencies just fine, and I was able to start the player. It would even play a downloaded flash movie (Xiao Xiao #3)…except there were some issues with the fonts, as you can see in the screenshot.

fp screenshot1

The solution was to configure Pango to point to the proper 32bit font modules. Well, this is not so straightforward as it sounds. The only solution I found sofar which doesn’t break things too horribly is to create a seperate “pangorc” file, and then reference it as I run the flash player. So, I created the pangorc file as thus: `vim /lib32/pango/1.5.0/pangorc`, with the following contents:

[Pango]
ModulesPath=/lib32/pango/1.5.0/modules/
ModuleFiles=/lib32/pango/1.5.0/module-files.d/libpango1.0-0.modules

Starting the player with the command: `PANGO_RC_FILE=/lib32/pango/1.5.0/pangorc gflashplayer xxiao03.swf` makes things all normal:

fp screenshot 2

Long command, but nothing which can’t be fixed with an alias, so we’ll do that:
alias flash=”PANGO_RC_FILE=/lib32/pango/1.5.0/pangorc gflashplayer” (add this to your bash profile).

Next step: YouTube.

I downloaded a YouTube flash file, which is basically only a pointer to a flash video file on the internet. For some reason it’s called “p.swf”, so I played it with: `flash p.swf`. This was the result:

fp screenshot 3

Clicking on “Settings” to change the defaults, yields no result as it refers to a webpage with yet another Flash application to change settings. And I still don’t have a working plugin installed. Thus began the hunt for how to modify settings. I found a document detailing that a file called “mms.cfg” holds global settings, and a very obfuscated story about sandboxes and such. But no information otherwise on how to allow a local SWF file to access network resources. A strace on the execution of the player pointed out that “mms.cfg” is really “/etc/adobe/mms.cfg”, and that it’s fairly useless in solving this problem. What *is* useful is good old google, and about an hour’s worth of time and effort to piece information together from various Adobe documents, forum posts, Usenet articles, etc. And not to forget some blind luck and further analysis of the output of strace.

To make a long story short: The player looks for configuration files (most notably, files which indicate where “trusted” flash content is placed) in a directory which doesn’t actually exist by default: $HOME/.macromedia/Flash_Player/#Security/FlashPlayerTrust
In here a text file can be placed with the simple content of e.g. the path to your home directory (i.e. the location of “trusted” flash content).

The role of /etc/adobe/mms.cfg? It allows administrators to enable and disable things globally, like the ability for users to actually set trusted content paths. I haven’t been able to find a definitive list of useable parameters, but through usenet I found there are at least the following:

AutoUpdateDisable=1
AutoUpdateFrequency=-1
AutoUpdateLock=1
LocalStorageLimit=0
FileUploadDisable=1
AVHardwareDiable=1
ThirdPartyStorage=0
AllowUserLocalTrust=0

The last one disables user configurable trust directories, and when set to “0″, it indeed works as expcted: The error message in the previous screenshot keeps appearing.

Anyway, with all things set, it’s now time to play YouTube videos (make sure to use an absolute path to reference the file. Else the “trusted path” doesn’t match.). After a long loading time of the actual data (I think), this is what I’m left with: A standard YouTube player screen, and nothing to play.

fp screenshot 4

Bugger. To be continued…maybe.

PS: Passing the direct URL to the movie to the player doesn’t work either.

Comments are closed.