Fixing a hole (where the video doesn’t get in)

[Note: This is only useful for historical reasons now, so I deleted the binaries and left the patch. But the patch doesn’t work for 3.3, even though the problem still exists, and I’m not really wanting to spend the time now integrating it. The patch is public domain, anyone may integrate it with or without my permission or some damn signed contributors document, by the way.]
Don’t you love open source?

I spent some pleasant time tonight adding a new feature to Laszlo, described below. If this is useful to you, please drop a comment here telling me what you like or how it could be better.

The patch, for 3.0b1, is in laszlo-video-patch.zip. (prebuilt binaries were in laszlo-video-patch-bin.zip).
The problem


Laszlo, as of 3.0b1, does not support directly embedding SWFs with Flash 6 video into views, and a client of mine needs the capability.The problem, in more detail


  • You have a video, transcoded to SWF format via Macromedia Flash MX 2004, via the ‘Import->Import to stage’ function.
  • You’re building a standalone, self-contained, single SWF from Laszlo, and you want to embed the above video.
  • You’re using Laszlo 3.0b1 or older (or possibly newer).
  • You get an error from the compiler: “Can’t import something.swf, 1 >= 0” or another similar error.
  • This is because the SWF parser/generator used in Laszlo does not recognize or handle the tag types 60 (DefineVideoStream) or 61 (VideoFrame), from the Flash 6+ specs.
  • Your video does not get embedded and your client is disappointed.

The solution


  • Apply this patch and rebuild, or use the rebuilt .jars provided near this readme.
  • Laszlo can now handle the above tag types.
  • Compile your Laszlo source again.
  • Your video gets embedded and everyone is happy.

(FYI, this patch was developed on my time, not my client’s.)

To apply the patch:
cd <lps-home>
patch -p1 < video.patch

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.