Lightspark, an innovative FLOSS Flash player, reaches Beta Status


More than a year has passed since the begin­ning of the Lightspark project. It was a long time indeed, but not wasted. I’m extremely pleased with the cur­rent level of sup­port and the robust­ness of the sys­tem. You may be won­der­ing “What the heck is lightspark?”, so let me intro­duce it.

Lightspark is an open source Adobe Flash imple­men­ta­tion, designed from the ground up to be effi­cient on cur­rent and (hope­fully) future hardware.

The long term objec­tive of this project is not only to deliver a free as in free­dom flash player, but also to give to the Flash tech­nol­ogy the dig­nity of a real open stan­dard. I really believe Flash is a pow­er­ful tech­nol­ogy, it’s main weak­ness being it’s closed­ness. Lightspark has been entirely designed after Adobe released the SWF file for­mat doc­u­men­ta­tion, so no reverse engi­neer­ing has been done.

Fea­tures

I’ll try to review and sum­ma­rize what as been done so far, and what is planned for the future.

Lightspark show­ing video. Pro­fil­ing graphs can be over­layed on the movie.

  • OpenGL based ren­der­ing allows for fast ren­der­ing of geome­tries and video frames. More­over, although those are not yet sup­ported, blur and other effects can be imple­mented using shaders for max­i­mum eff­i­cency. Using OpenGL tex­tures to dis­play video frames is a bit less eff­i­cent than using XVideo, but make it pos­si­ble to sup­port any overlaying/transformation effect that flash provides.
  • Mostly com­plete sup­port for the newer ver­sion of the flash script­ing lan­guage: Action­Script 3.0, intro­duced with Flash 9. Both an inter­preter and a JIT engine based on LLVM are pro­vided. The pre­vi­ous ver­sions of the lan­guage (sup­ported by Gnash, which does not sup­port 3.0) run on a com­pletely dif­fer­ent, and quite weird, vir­tual machine. Cur­rently Ligth­spark does not sup­port the older engine, but most sites (e.g, YouTube) are migrat­ing to the newer engine, so we will be fine just with 3.0
  • Beside the Vir­tual Machine Flash pro­vides a huge run­time libraries that ranges from Video Ren­der­ing ser­vices to XML pars­ing. Imple­men­ta­tion of the run­time is of course far from com­plete, but the archi­tec­ture of the VM makes it pos­si­ble to eas­ily imple­ment the var­i­ous objects in plain C++. More­over, an arbi­trary degree of mix­ing between VM gen­er­ated and C++ code is pos­si­ble. This means that func­tions can be called from what­ever con­text with­out wor­ry­ing about their origin.
  • A mozilla com­pat­i­ble plu­gin is pro­vided, I’ve spent a lot of time try­ing to make the code robust to unex­pected con­di­tions and it should fail grace­fully and dis­play a gen­tle mes­sage. But, as plu­g­ins runs inside the browser process, there a not-so-slight pos­si­bil­ity of crashes. Please report any crashes using the bug report­ing sys­tem of launchpad
  • As an added bonus, dur­ing devel­op­ment I’ve also added a cou­ple of inter­est­ing per­for­mance profiling/debugging fea­tures which are not pro­vided by the orig­i­nal Adobe player. Key­board short­cut can be used to enable a pro­fil­ing over­lay, and a prim­i­tive inspec­tor of the objects on screen
There­fore I declare lightspark to be in beta sta­tus! Now the most impor­tant thing that is still miss­ing is a nice Logo for the project. I’m very bad at art, so any con­tri­bu­tion is very wel­come. And of course the whole project, in a pure open phy­los­o­phy, is open to con­tri­bu­tion! To have a quick glance at the cur­rent sta­tus it is pos­si­ble to get lightspark pack­aged from our PPA on launch­pad.
Lightspark should fail in a clean way on unsupported Flash movies

Lightspark should fail in a clean way on unsup­ported Flash movies

, , ,

  • Philipp Kern

    Urgh, of course they can sell it, even if it’s GPLv3. They have to ship the code with their sales of course, and the seller can give it away. But don’t say it’s not possible!

  • http://spitch.fr spitch

    Here’s my logo con­tri­bu­tion, hope you’ll like it.

    Full logo ver­sion : http://spitch.fr/tests/lightspark.png
    Icon ver­sion : http://spitch.fr/tests/lightspark-ico.png

  • apig­notti

    Nice work! would you mind adding them to the launch­pad bug ded­i­cated to the logo?

  • Milan

    I just tried to com­pile it, llvm-2.7 doesn’t have llvm/ModuleProvider.h , also I couldn’t find mozilla plu­gin tar­ball or source, where is it? Thx, I hope this open source flash project will be suc­ces­full ;)

  • apig­notti

    It looks like you’re using an older ver­sion, please down­load the cur­rent mas­ter branch from github. Plu­gin source is included in the repository.

  • http://www.virtualcreations.de Jurek

    Wow, these are really nice news. Is there any change you will open­source it and pub­lish it also on OSX? Mac com­mu­nity highly needs a good per­form­ing flash player. Adobe was not able to pub­lish one until now.

  • MLx

    Any chance of a build for *buntu Karmic?

  • dave

    nei­ther could this project until just recently. Apple didn’t open the per­for­mance hooks needed to make video work effeciently

  • apig­notti

    karmic misses an updated ver­sion of llvm, sorry :-(

  • Flow
  • Pingback: 一天的阅读(2010-05-20) | 还有什么

  • jurek

    Ok but opengl accel­er­ated graph­ics would bring lot of per­for­mance improve­ments too on Mac... Or not?

  • Milan

    Every­thing is ok now, but where can I down­load watch_as3-vfl155676.swf ? Link in readme returns 404 .

  • Pingback: Lightspark, un inovador reproductor Flash FLOSS, alcanza estado beta

  • http://pedrodh.info Pedro

    This is the first time I’m hear­ing about this project, and I’m happy that some­one it’s com­ing for­ward with try­ing to make a decent solu­tion for linux. Keep up the good job ;)

  • Jez

    GPL makes it a lot more dif­fi­cult to inte­grate with exist­ing projects, and most com­pa­nies (such as Apple) will avoid funding/contributing to it under that license.

    LLVM and Webkit both use more per­mis­sive licenses. The looser license allows for far more adop­tion — and it’s dif­fi­cult to argue that either LLVM or Webkit have lost any­thing from peo­ple keep­ing changes proprietary.

    This is the kind of deci­sion that becomes extremely dif­fi­cult to change once there are sev­eral con­trib­u­tors to the project.

  • http://twitter.com/bmastenbrook Brian Mas­ten­brook

    I’d love to know what the FSF has to say about that. After all, the FSF claims that a pro­gram which dynam­i­cally links to a GPL’d library is a deriv­a­tive work of the library, even if the user can swap in an alter­na­tive imple­men­ta­tion of the same inter­face at their own choice. So, would dis­trib­ut­ing a browser with a GPLv3 plu­gin cause the browser to be treated as a derived work? If not, why is dynamic link­ing to a GPLv3 library different?

  • Jeff Moe

    I tried build­ing from git on Fedora 12 x86_64. I was able to find all the build depen­den­cies except “mozilla-plugin”. What is this creature?

  • http://profiles.yahoo.com/u/EFNOAHQ5RGDFTBP3CFVXK32N3U Péter Györök

    Will Lightspark have tool-assisted speedrun­ning (TAS) fea­tures? Basi­cally that means the player should be able to process an input stream on a SWF file and always pro­duce the same out­put, and it should include tools for mak­ing these input files, such as record­ing, save states, slow motion, frame advance etc. You can find more about TAS at http://tasvideos.org/ . I have been work­ing on a Flash imple­men­ta­tion as well with these fea­tures in mind, but if another player gets the same fea­tures then I might as well aban­don my project.

  • jonask­ivi

    The deci­sion about the licence is yours. You’re free to choose any licence that you wish to use. (Obvi­ously...)
    If you truly feel that GPL3 is the one you want, for what­ever rea­son, then you should go for it. But, it would be good, that you know all the con­ce­quences that the licence deci­sion will have for the adop­tion and dis­tri­b­u­tion of your code. As oth­ers have stated, there are a quite a lot of good rea­sons for using some­thing more per­mis­sive (MIT/X11, BSD). On the other hand, the GPL3 will guar­an­tee a cer­tain amount of con­trol for the free­dom aspects of code. At the same time it will of course restrict the dis­tri­b­u­tion of it more. It’s all politics.

    If free­dom in the sense that the GPL3 states it, is very impor­tant to you per­son­ally, then you should go with the GPL3. And if you want as many peo­ple as pos­si­ble to reuse, redis­trib­ute and bun­dle your code with exist­ing browsers on all oper­at­ing sys­tems, then you should choose a dif­fer­ent licence. The prac­ti­cal con­ce­quence of GPL3 is that peo­ple adopt­ing your project, will have to down­load it sep­a­rately and install it by them­selves. Or then some peo­ple can make pre­bun­dled pack­ages, that will include both the browser and the plu­gin, but these pack­ages (propably) won’t be made by Mozilla or Google, but by indi­vid­u­als or e.g. oper­at­ing sys­tem dis­tri­b­u­tions like Fedora/Ubuntu/Suse/*BSDs/Haiku/(insert your favorite here). It might be pos­si­ble for the browsers to ask the user in a pop up win­dow, if they’d like to install Adobe flash or Lightspark when the browser encoun­ters flash con­tent for the first time. This wouldn’t be restricted by the GPL3.

    If all the browsers would be using GPL3, then you wouldn’t have to think about it, but as both of the main­stream open source browsers have com­mer­cial his­tory and com­mer­cial back­ing they have solid rea­sons to pre­fer more com­mer­cial friendly open source licences. With these licences it is pos­si­ble that some­one can take your code, and make some major changes to it, and not give the changes back to you. But atleast most com­pa­nies will hon­our the spirit of open source, and give back all of their changes, even if they are not legally bound to do so under the MIT/X11 and BSD licences. And atleast with these two licences they are bound to tell it in their doc­u­men­ta­tion that they are using your code. So you’ll get the credit for it anyway.

    I encour­age you to read the wikipedia arti­cles for the licences men­tioned here, and then give it some thought, as it is not a light deci­sion, whichever licence you might choose.

  • Davide

    It is pos­si­ble to con­tact the author?

    Thank you very much.

  • Y.

    I strongly sug­gest you use a more appro­pri­ate license like the LGPL. This will not risk the open­ness of the plu­gin, but clar­ify link­ing and dis­tri­b­u­tion issues and allow code shar­ing with other open plu­g­ins (most of whom use LGPL AFAICT). See GStreamer docs (based on offi­cial FSF opin­ion) for the kind of legal mess a com­bi­na­tion of GPL/LGPL/propriety can be:

    http://www.gstreamer.net/data/doc/gstreamer/hea...

  • http://www.lucainvernizzi.net Luca Inv­ernizzi

    ? This is the cor­rect blog. You can send him an email via https://edge.launchpad.net/~a-pignotti

  • http://www.lucainvernizzi.net Luca Inv­ernizzi

    That’s not planned.

  • apig­notti

    Here I am :-)

  • http://smartqmid.ru Ginko

    +1 to ARM sup­port. Now flash is a big pain for ARM-based devices (except Nokia N8xx series). I’m using a chienese MID SmartQ V7 with ubuntu on board and lack of flash is the only prob­lem.
    Maybe I can try to cross com­pile it...

  • http://jado92mx.wordpress.com jado92mx

    My con­grat­u­la­tions from Mex­ico to Italia! :D I’m just dicov­er­ing a post about Lightspak, and I’m hav­ing a lot of hope in your –our– com­mu­nity project. Maybe, in a near future, your pro­gram comes by default in a dis­tro like Fedora, Ubuntu, OpenSuSE...

    Greet­ings!
    JaD!

  • Pingback: Lightspark, an innovative FLOSS Flash player, reaches Beta Status « Descent Into Darkness

  • http://mac.linux.be Lin­ux­op­jemac

    Will it be pos­si­ble to port Lightspark to PPC ?

  • Pingback: Biweekly Links – 06-14-2010 « God, Your Book Is Great !!

  • Pingback: Lightspark, an Open Source Flash Alternative gets more Browser Friendly | Open Source Flash Alternative

  • Pingback: Is Gnash Useless?

  • http://profiles.google.com/scientificprogressgoesboink Andy Ross

    That quote ain’t anony­mous, it’s from Richard Needham.