FLV Metadata

FLV metadata is information that is placed in the header of the FLV file. In the original implementation of the FLV format, metadata was omitted—including the video duration. It has since been added in the newest version of the Flash Video Encoder.

In order to use metadata within an FLV file we must do two things. First we must modify the NetStream intrinsic interface to allow a public onMetaData method. Second we need to make sure the FLV file has metadata included within the file. If it does not then we need to run the FLV Metadata Injector. (You can view the metadata by opening the FLV file in a text editor like WordPad.)

1) Modifying the NetStream Interface Add the following line of code to the following file:
[local settings]\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\Classes\NetStream.as
function onMetaData(info:Object):Void;

2) Inserting the FLV Metadata into the file Download the FLV Metadata Injector tool from the following address:

http://www.buraks.com/flvmdi/flvmdi100exe.zip

Run the exe from a DOS Prompt like this:
flvmdi input file [output file]

NOTE: If the output file is omitted then the FLV will be overwritten.

Leave a Reply

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