Prevailing Whispers

A collection of words - Losthumans.Com

Thursday, April 14, 2005

FITC 2005 Presentations - Six Advanced Flash Video Techniques


Six Advanced Flash Video Techniques

Kevin Towes - [
www.newyyz.com]

FITC 2005

-> newYYZ

Sync
Scrub
Captionate (Alpha Preview allows you to enter captions right in the flv itself)
Video Trans
Bandwidth scaling
Rock star video encoding
-> Flash video development course

-> Video 101

Stream content to over 42% more users than available to Quicktime
Progressive download in FP7
VitalStream, Akamai, etc. (offer FlashCom based streaming services)
-> Slide mode cue points

Have to be in slides mode
Cue Points is in the component inspector at the bottom
-> Non slide mode cue points

Cue Points controlled through actionscript
mx.controls.MediaDisplay
Add slides to AddCuePoint array
Use for loop to pull data dynamically if need be
Create slide mc and enter frame labels to control "slides"
Time is entered in the AddCuePoint array object as well for each slide
Listener created can also be used for progress bar???
Monitor timecode
Fire events to make display react
Grab code from his Website
He made custom monitorStream function to control progress bar
Uses setInterval
You can build your own cue point event handlers in there for closed captioning
-> Scrub bar

Need total duration - (grab from metaData :: .duration property :: spit out from Sorenson)
(You could also use a Meta Data Injector :: Google to find)
Need current time - ()
Store the meta data duration in the NetStream object
Progress calc = 100 * (ns.time / ns.duration)
Then reposition along a progress track
currPos = posDelta / endPos * 100
seekTo = (currPos / 100) * streamDuration
*** Ask about why seeking sometimes jumps ***
Must use ns["duration"] quotes and square brackets to add properties to strong datatyped pre-existing objects, could not use dot notation here
Very nice to add these to the netStream object, real clean
Also must use quote and bracket to reference these dynamic props
Some of the jumps may be caused by lack of a keyframe being on that exact frame
Is there a way to encode the file to assist in this issue???
Must stop interval when you grab handle
Set the onMouseMove to call a seek function
Code will be available to everyone from Website
-> Captionate

Manitu Group
They created the FLV MetaData Injector
beta@captionate.com 2 join beta
FLV Embedded
Closed Captioned
Cue Points
Currently the way we do it is using xml data (like RSSC video)
This allows us to embed the meta data for the captions right within the FLV in multiple languages
Also lets you embed cue points so you do not have to use AS if you dont want to
The CC files not can stay with the video
You can use this with progressive download as well as FlashCom
You can do this with 3 lines of code (and onCaption event)
ns["onCaption"]
Allows you to export a data only flv file or the XML
You can also edit the timeline of your FLV
Nice authoring environment
You can video preview within the FLV environment (nice)
Build markers on the timeline
It adds to list on the bottom
You can also tweak timecodes manually
Edit speakers as well (multiple speakers, etc.)
All it does is save the same flv file with the metadata instantly
Embeds it as an AMF packet
Get this!!!
-> FlashCom allows you to seek forward progressive will not

-> Video transitions

Tween class and transition class
Use tween classes to fade form one video to another
This could work with CC room
Nice fade instead of harsh switch, you cannot do this in any other media player
He will provide code for this as well
He builds an array of movieclips and an array of netStreams and binds them together
Uses a dissolve video function that takes two targets and crossfades them using Tween class (very easy)
Use the onMotionFinished to kill the old netStream object and delete the object
You could also extend this to also to crossfade the sounds using the Tween class as well
-> Negotiating Bandwidth

This really only applies to FlashCom
-> Encoding rockstar video

Currently two codecs and another coming soon
Two audio codecs coming as well
Bandwidth calculations he has in slides, download from site
Better to drop frame size than frame rate
Look at the motion in the video
Try to use files that have no pre-compression (Very important)
He also has examples of how Sorenson compresses the video on slides
The Flash player has a 4 megabit limit both in and out