Gnash, the free Flash player, makes progress

380

Author: Bruce Byfield

The Gnash project has been developing a free software Flash player since December. Filling one of the last major gaps on the GNU/Linux desktop, it is one of the Free Software Foundation’s high-priority projects. We covered the project several months ago, when compiling the code was problematic. Now that Gnash has reached the 0.7.1 version, the player is still rough, but enough has been done to give us an indication of what the final version might be like.

Rob Savoye, the project administrator, explains that Gnash was originally based on GameSWF, a similar project. However, he stresses that, “in it’s current form, it’s a new project. A lot of portability issues have been solved, so Gnash now builds and runs on many more GNU/Linux distributions and BSD variants, including 64-bit systems. This has brought Flash abilities to platforms that had none.”

Much of the initial work, Savoye says, revolved around dealing with threading issues with Firefox, X11, and OpenGL, which Gnash uses for rendering graphics. The combination, he says, “gets really interesting when you have multiple threads rendering different Flash movies into differ sub-windows at the same time, and then throw OpenGL into the mix.”

In its current form, Gnash consists of a desktop Flash player and separate browser plugins for Firefox and Konqueror. Those interested in trying Gnash can compile from source, or use the .deb packages in Debian experimental or the .rpm packages build for Fedora Core and Red Hat versions 1-4. The desktop player requires GTK, but, otherwise, Gnash depends on just two unique libraries, so dependency issues are unlikely on most modern desktop installations. However, users may need to uninstall a non-free Adobe Flash player in order to test the Firefox browser plugin.

Gnash 0.7.1 is supposed to support small sound clips, but not sound streams — that is, continuously running sound. On my two test machines, no sound worked whatsoever with either the player or the browser plugin. That was true whether Gnash was compiled from source or installed using one of the prepared sets of packages. According to the project mailing list, the developers’ attention is just turning to sound support. They now plan sound support based on gstream — but, meanwhile, it does not seem worth trying to get even small clips to work.

The project documentation is slightly dated, but it gives a generally accurate picture of how Flash animations are supported. Testing with a dozen different clips borrowed from friends or pulled from the Internet suggests that Gnash can reliably render version 6 and earlier of the Flash (.swf) format. Some files in this format run slower in a browser, but are borderline acceptable.

Version 7 Flash files have mixed success. Many do not start. When they run, they are often slow enough that the window seems frozen, and rendering or redrawing leaves black bars across the slide. The documentation explains that while most of the basic version 7 opcodes and libraries for ActionScript, Flash’s programming language, have been reverse-engineered for Gnash, others have been only partly implemented, and many remain to be implemented. Those who are curious about the details can run the desktop version with the -v option to read debugging messages, or with -va to see messages about a movie’s actions, or with -vp to see how Gnash parses files.

Version 8 files, which are just starting to become common on Web sites, do not open at all in the current release of Gnash. The documentation mentions plans to work toward supporting version 8, explaining that “during the first few months of Gnash’s existence as a project, most of the focus has been toward portability issues, and getting the plugin to work. Now that the plugin works, more focus will be spent on catching up to full compliance with version 7 and beyond.”

The player itself is in an equally tentative state. Although some options, such as -s, which scales the size of the window, are enabled, others, such as -l, which is supposed to play a file once then exit, do not.

The same is true of the keyboard shortcuts and the items in the right-click menu. Users can start, replay, or quit a file, but not pause. Jumping forward or backward between frames works, but seems erratic and sometimes does not take effect right away.

This state of affairs is disappointing for those who have been waiting for a free software Flash player, but is only to be expected. Since Gnash is only six months into its existence, its should probably be thought of as a dancing bear — what is noteworthy is not that it dances well, so much as the fact that it dances at all.

All the same, the unfinished state of Gnash does raise some concerns about the state of Flash support on free operating systems. Considering that Gnash is still implementing version 7 as version 8 proliferates, is free Flash support doomed to be forever trailing behind? Or is the lag only temporary? Moreover, even assuming that Gnash keeps reasonable current with proprietary Flash, in order to allow users of free operating systems full access on the Internet, it needs the ability to spoof responses to Web sites that use JavaScript to call a VisualBasic script to check that Flash is installed on a machine before they open.

And even then, free software users will only be able to view Flash files, not edit them with the same ease as Windows users can. While OpenOffice.org can export slides to Flash, the one or two attempts to provide a real editor, such as Flash for Linux, seem to have stalled in the early stages.

But these issues are not meant to cast doubts on Gnash itself. To reverse-engineer basic functionality across multiple platforms in so short a time is an accomplishment that deserves recognition. If it doesn’t give instant relief from the problem that Gnash was founded to solve, at least it creates a legitimate hope that relief is on the way.

Bruce Byfield is a course designer and instructor, and a computer journalist who writes regularly for NewsForge, Linux.com and IT Manager’s Journal.