[FFmpeg-devel] Support for generating avm2 compatible swf files

Paul Egan paulegan
Tue Jan 15 04:03:08 CET 2008


>> When working with Flash 9/Flex the AVM2 runtime sandboxes
>> any swf files of older versions.  
> 
> ?
> 
Later versions of Flash & Flex which are based on ActionScript
3 use the new ActionScript Virtual Machine (AVM2)[1].  The file
format is largely compatible with older versions but there are 
enough differences that the runtime (e.g. Flash player browser 
plugin) treats AVM1 files differently.  In particular, if you 
load an AVM1 file into an AVM2 runtime, you cannot interact 
with that movie clip [2].

>> This means you can't
>> currently control the timeline of any swfs generated by
>> ffmpeg.   Attached is a little patch to extend the ffmpeg
>> swf support with a new file format, "avm2", which can be
>> loaded into a Flash 9/Flex application.
> 
> adding a new dummy format for every little changed parameter is not acceptable
> 
I wasn't sure of the convention for adding a new version of a
file format.  What would be acceptable?

> why is the version not always set to the newest, does it fail with old
> programs?
> 
Users of older versions of the Flash player can happily 
interact with older version swf files - this issue effects
only those developers/users using an AVM2 based application.
If a version 9 swf file was generated by default, it wouldn't
be usable by older players.

> what does the newly added chunk mean and why is it not always added?

When loading a swf, AVM2 looks at both the version number 
and the file attribute tag to determine if the movie clip is
AVM2 [3].  The attribute tag should probably be added to v8 
swf files as well, but I didn't want to change existing 
functionality.


[1] http://www.adobe.com/devnet/actionscript/articles/avm2overview.pdf
[2] http://livedocs.adobe.com/flex/2/langref/flash/display/AVM1Movie.html
[3] http://sswf.sourceforge.net/SWFalexref.html#tag_fileattributes





More information about the ffmpeg-devel mailing list