Creating video playback in the scene

Hey there Popcode,
First off your framework and mobile implementation looks great, and I'm excited to create some content.
I was wondering, how would I go about creating a video playback option on a plane. instead of the full screen playback url option you have in the developer guide. could it work like a texture of sorts? I've seen it done but being new to xml wasn't sure of the best ways to go about it or what filetypes would work best. thanks for your time.
-cheers, Denman


Hack at the moment

Hi Denman,

Currently the demos we have that appear to show video in the scene (such as the science festival brochure) are done using a hack; each frame is stored as an image and given a separate object in the scene, and then an animation sets the objects to visible or invisible at the correct times to make it look like a video.

That way means that all the textures are uploaded to the GPU when the scene is loaded, so there is no decoding cost when the scene is being viewed, but it does limit the length of videos to a couple of hundred frames maximum, even at low 128x128 resolution.

Here's an example with 4 frames, you can write a quick script to generate the XML for more frames that that:

  <object id="0" type="primitives://plane.aro" skin="frames/000.png"/>
  <object id="1" type="primitives://plane.aro" skin="frames/001.png" visible="false"/>
  <object id="2" type="primitives://plane.aro" skin="frames/002.png" visible="false"/>
  <object id="3" type="primitives://plane.aro" skin="frames/003.png" visible="false"/>
  <sequential times="-1">
    <set object="0" what="visible" to="false" />
    <set object="1" what="visible" to="true" />
    <wait length="30" />
    <set object="1" what="visible" to="false" />
    <set object="2" what="visible" to="true" />
    <wait length="30" />
    <set object="2" what="visible" to="false" />
    <set object="3" what="visible" to="true" />
    <wait length="30" />
    <set object="3" what="visible" to="false" />
    <set object="0" what="visible" to="true" />
    <wait length="30" />

Doing full decoding of video to allow arbitrary lengths is on our todo-list, the problem is doing it cross-platform, and in a way that we can use the hardware video decoding capabilities of the phones if at all possible.