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.

Firebug and WYSIWYG CSS

Firebug is a super slick development plugin for Firefox that provides debugging capabilities for javascript, css, html and more. I’ve barely scratched the surface of it, but it continues, in small ways, to give me warm fuzzies. Today, I growing increasingly surly as I was fighting my blog style sheet in the Word Press editor until I remembered the live non-destructive css editing capabilities of Firebug. Click the link below to watch a short example.

Watch Video

Using Simple JSFL to Reduce Tediousness of Manual Timeline Tweening

Someone over on the TechSmith forums was complaining about the tedious nature of timeline tweening in Flash, so whipped up a very simple<a href=”http://www.adobe.com/devnet/flash/articles/invisible_button.html”> jsfl</a> script that can be utilized to reduce some of the repetitive mouse interactions necessary. The following script will create a motion tween for a symbol based on the selected number of frames.

var doc = fl.getDocumentDOM();
var tl = doc.getTimeline();
var trace = fl.outputPanel.trace;

var currentLayer = tl.currentLayer;
var numberFrames = tl.layers[currentLayer].frames.length;
var actionsLayer = null;

var sel = tl.getSelectedFrames();
var lastKeyframe;
var frameArr = tl.layers[sel[0]].frames;

var flen = frameArr.length;
for ( var i = 0; i < flen; i++ )
{
if ( i == frameArr[i].startFrame )
{
lastKeyframe = i;
}
}

This code would be saved in a file with the .jsfl extension and you would obviously use the “Commands” menu of Flash MX 2004 / 8 to execute it.

I also put together a quick and dirty screencast that illustrates how to take advantage of the jsfl script inside of the Flash IDE.