F4V Cue Point Solution

I have produced a simple to use workaround (you saw it here first) to enable cue points in F4V files.

I came up with the solution after the same question came up in the office twice on separate occasions:

Why are my F4V cue points not working?

The first time it came up I was shown CS4 media encoder with cue points clearly in place, but the cue point events did not appear to be firing in flash.

With a bit of googling we found the following article from adobe entitled “Cue points for FLV and F4V video files”, perhaps we were doing something wrong?

But then at the at the bottom of the page in the comments we found a link to the adobe tech note:

F4V-format video exported from Adobe Media Encoder CS4 does not contain cue points”

Reason:

“The F4V format is based on the format specified by ISO/IEC 14496-12: ISO base media file format which is not specific to Flash and does not have native support for the cue points that the FLV format uses.

So we gave up and used a FLV.

Then the question came up again this time it was pointed out to me the fact that when imported to flash the FLVPlayback component inspector clearly showed the cue points added in CS4 encoder showing up in the component inspector! The cue point events still where not working but this finding meant the data had to be in the file.

After some experimentation I found that the cue point information was being stored in the XMP metadata, this data is available in flash at runtime using the onXMPData event.

Whilst researching XMP I came across this useful adobe page “Using cue points and metadata” whilst detailing how to parse cue points from the XML it also further reinforced by use of a table f4v not supporting the onCuePoint event.

Runtime F4V FLV
Flash Player 9/ AIR1.0 OnCuePoint
OnMetaData
Flash Player 10 OnCuePoint
OnMetaData OnMetaData
OnXMPData OnXMPData

The Solution

I wanted to come up with a simple fix for non-codey types to use.

The solution uses a single action script class file XMPCuePointClient.as that you can place with your FLA it can then be enabled using two lines of code:

import fl.video.VideoPlayer;
VideoPlayer.netStreamClientClass = XMPCuePointClient;

The class works by parsing the XMP data and inserting FLVPlayback action script versions of the cue points. Cue points can then be consumed using usual code something like:

import fl.video.MetadataEvent;
function onCuePoint(e:MetadataEvent):void
{
trace(e.info.time,e.info.name,e.info.parameters.typeConverted);
}
myFLVPlayback.addEventListener(MetadataEvent.CUE_POINT, onCuePoint);

Worth noting with this solution is the cue point types are converted to actionscript, but the class does store the original type (event|navigation) in parameters.typeConverted.

A sample fla, f4v video, and the XMPCuePointClient.as file can be downloaded here:

XMP Cue Point Client.

If you find this code useful please return the favour by giving us a web link on your site or blog.

NEC using Mediastation Graphics and Animation

NEC have been using examples of our graphics and animation to show of a new range of scalable display technologies to their best.

NEC Scalable Display Technologies

More from MTV on our commercial

http://moviesblog.mtv.com/2010/02/04/the-super-bowl-commercial-for-the-wizarding-world-of-harry-potter-is-right-here/

The Wizarding World of Harry Potter now online

Mediastation are proud to announce our involvement in the production of The Wizarding World of Harry Potter TV commercial & website experience. Both these are to officially launch at the US Superbowl on the 8th February (The most expensive 30 second advertising slot in the world!). Mediastation were commissioned by Rosso Media to produce the CGI and special FX for the commercial along with production of the high-profile website for Universal Orlando Resort.Click this to view our work: www.universalorlando.com/harrypotter

 

Watch the commercial here:

 

TV starting to cover it see here: http://www.youtube.com/watch?v=sHvtpHxQsyk

What’s really incredible is that all this was created with our in-house team, making them one of the only companies in the world which can handle the diversity and quality of production required to achieve all this under one roof. Goto www.mediastation.co.uk to find out more.

Mediastation open new motion capture (mocap) studio

To compliment our dedicated specialist 3D modelling and animation pipeline we are proud to announce the opening of our new motion capture studio.

Using motion capture data instead of key-framed animation not only speeds up the animation of characters it also gets much more realistic movement especially for secondary movements and weight interpretation which is easily recreated. This new expansion will be of real benefit to our customers in terms of realism, cost effectiveness and faster production time lines.

Rendered 3D vs Real Time 3D in Flash

With the latest versions of flash player it is now possible to create environments and 3D objects for use in the standard flash player - Here are two examples of using 3D in flash:

This first version is a rendered video - with the playback (Forwards and Backwards) programmed in flash to give interactivity:

www.mediastation.co.uk/flash3d

Now this version is using the 3D capabilities of the flash player, its much more interactive as we can control the model in real time (note by clicking and dragging you can rotate the object in all directions) and it is a much smaller file size for download. The disadvantage is that you can only use a limited amount of polygons in the mesh (note the round edges are squared off in places) It also suffers from rather flat shading.

www.mediastation.co.uk/flash3d/rt

Mediastation are currently developing out own proprietary flash 3D engine that will bring better shaders and lighting.

Tommy’s Fix your House for Free?

Mediastation have produced the title sequences and branding for Flame TV’s new production for Discovery Real Time: “Tommy’s Fix your house for free?”. Ground Force presenter Tommy Walsh and “scavenger” Liam Collins use materials they have blagged to make major changes to people’s homes.

"Tommy's Fix Your House For Free?"
Tammy Walsh andLiam Collins
Visit www.flametv.co.uk for more details.

Google O3D browser plug-in

At Mediastation one of our specialties is the production of real time 3D content but over the last few years we have experienced difficulty in delivering high polygon real time content to web browsers due to fall in popularity of Shockwave 3D and the lack of a suitable hardware accelerated browser plug-in to replace it.

After Adobe serious failings (far too many to list) of the ever so long awaited Director 11/11.5 up until now we have been no closer in finding a replacement. The only real contender being Unity 3D, but we’re yet to find a project with a client happy for their users to have to install this lesser known plug-in. In fact this year so far all of our web based real time 3D projects have been delivered using Flash 3D technologies such those brought by flash player 10 and third party engines such as Papervision 3D. Whilst this has been used to amazing effect in terms of 3D detail it’s been a step backwards due to the lack of 3D hardware acceleration in flash player.

Enter Google O3D:

http://code.google.com/apis/o3d/

Essentially its java scripted OpenGL, unfortunately the technology is not quite ready for use. The tech demos are reasonable and showing some promising features, but the thing that’s got us excited is in the name - Google! According to keynote speaker Michael Jones at GeoWeb in 2008 Google Earth at the time had 400 million users - that’s more than people in the United States! If Google pushed they could probably have the O3D plug-in installed on most PCs in no time and we certainly feel clients would be much more accepting of a plug-in backed by the mighty Google.

At Mediastaion we always like to stay ahead of the game by being the first to use the latest in multimedia technologies. We all ready have our 3D developers assessing O3Ds capabilities and will be watching this space closely to see if O3D becomes the plug-in we have been waiting for!

Large area 3D scanning

Mediastation have teamed up with professional surveyors at www.msasurvey.com to offer a unique visualisation service. MSA use state-of-the-art 3D scanners to scan and survey any environment - from a single room to a whole complex. While primarily this technology is used for fast and accurate environment surveying, the data produced can be used in virtual worlds as well - giving us endless possibilities to blend the real with the virtual.

The scanning equipment produces something called “point cloud data”, the video below shows the detail that is captured.

 

This technique means we can produce extremely accurate assets for visualisation and animation. Once captured our 3D artists remove any unrequired data and convert it to a 3D model to use in the virtual environment.  The scan also cpatures colour so texturing is much easier and realistic.

This process can be used for any number of visualistation services, it is specifically usefull for visualising how a new building is going to look it the current environment rather than single flat artist impressions. We can put the camera in any position and output videos or stills for marketing and communications.

Mediastation CGI aired on BBC Newsnight

3D CGI produced  by us showing the Future Carrier was used by BBC Newsnight last week as part of a piece discussing possible defence cuts.

3D BBC CGI

Mediastation Creative Solutions Ltd