Change / Insert FLV Metadata Values (timestamp, dimensions) with Flvtool2

After a bit of fiddling I figured out how to use flvtool2 to overwrite the existing metadata values for an flv or even add completely new name value pairs.

In most circumstances the video tool used to encode an flv will insert a few values into the file’s metadata. Typically you will find properties such as duration, width, height, etc. stored in the file allowing you to to respond to the data when the flv’s onMetaData event fires.

You can also use flv metadata “injectors” such as flvtool2 to do this for you if your encoder failed to insert the data, or you wish to augment the metadata (the injectors often add additional metadata that is not included by the encoder).

However, it can sometimes be useful to change the values set by the encoder / injector. For example, perhaps I’ve performed a cut operation on an flv with flvtool2 and would now like the duration to reflect the new timestamp value. In this scenario you use flvtool2’s “-key:value” switch to change the value of an existing property, or key.

Here’s a short video illustrating how to overwrite existing metadata values using flvtool2.

You can also add completely new name / value pair to an flv’s metadata:

flvtool2 -U -drummer:Portnoy example.flv

If you’re interested in more commands take a look at the flvtool2 wiki.

2 Comments

  1. Lancaster
    Posted April 19, 2007 at 4:36 pm | Permalink

    Wow, April has been a busy month:)

  2. Posted August 11, 2008 at 6:26 pm | Permalink

    Thanks, I’ve been looking how to modify the metadata for ages, even though I’ve already been using flvtool2, I wasn’t aware of customizing the metadata values.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*