Trapped inside a GreatWhite streaming video cube
December 6, 2007 – 10:57 am Tags: .flv, boards of canada, flash, fortet, GreatWhite, lali puna, Papervision3d 2.0, radiohead, Streaming video in Flash, VideoCube, VideoStreamMaterialI’ve been playing around with a lot of video stuff way back since Phunky (man, those were the days, weren’t they?) Anyways, thought I’d post a cool example of how to do streaming video, on six sides of a cube, in Great White.
If you’ve never set up an .flv player in as3, (complete with scrub, sound-scrub, etc…), well this is just your lucky day, cause that’s all in the source too. (get it here)
(contained in source: how to do streaming video in flash, how to use the VideoStreamMaterial in GreatWhite, how to trap the user inside a huge video cube– please, use with discretion only)
and if you don’t mind, i’d like to talk about radiohead for a moment. this video was released a few days after they released their “in rainbows” album, for free.
the fact that radiohead released this album for free was very inspiring to me. of course they still made goads of money, but i think they are pioneers in the music world who have, perhaps, taken a cue from the open source software movement. (that’s us, guys!). You see, we’ve all seemed to realize that working together, collaborating, offering source, sharing, etc…. produces a better product for Everyone. And what’s even better? Everyone who contributes and understands and loves their craft as much as radiohead loves making music is going to get paid.
And I definitely love my craft.
So thanks so much to radiohead for offering their music for free, and in the same spirit, you can have the source for this file for free. don’t forget attributions!
just to note: this video is pretty awesome. it is kind of experimental, you’ll have to wait a few moments for it to get cool, but it’s definitely worth the wait.
it was released a couple of days after they released “in rainbows”, and they used the new H.264 encoding for it. H.264 encoding is sweet, open, and awesome (but only supported in the beta release of the flash player, I believe), and I think the fact that they released it as such is another indicator of their support for open hardware/software/music/society.
here is another video made using this technique (this one was with phunky though), with some added stuff. It was made in phunky, and thanks a lot to Lali Puna and Morr Music for giving me permission to use it.
There are also some other awesome video cubes you should check out, but I’m not sure about permissions for using them. They *are* on youtube, so that makes it ok, right? Well, here they are, and if anyone has a problem with it I’d be glad to take them down.
- boards of canada
- fortet
- books
- more radiohead: videotape






13 Responses to “Trapped inside a GreatWhite streaming video cube”
Nice example and great video choice. Radiohead definitely outdid themselves with In Rainbows and its release. Looking at your source helped me a lot in figuring out how to effectively implement VideoStreamMaterial, so thanks!
By JD on Jan 16, 2008
Hey!
Great examples and thank you so much for releasing the sources.
Some really inspiring stuff! Keep it up
(BTW the “youtube” cubes don’t work for some reason, just thought i’d let you know)
By Daniel on Jan 31, 2008
Thanks Daniel!
As for the you tube videos, I must finally take some time to explain the issue here-
The latest Flash Player version implemented some more security restrictions which affect the VideoStreamMaterial.
Because of this, you can’t use the VideoStreamMaterial with RTMP streams, or non-local files.
I’ve been too lazy to move the flv’s for the youtube videos from whereever they are to their local directories, and that’s probably why they aren’t currently working.
So if you’re trying to use the VideoStreamMaterial in Papervision, just keep in mind that your .flv file has to be stored in the same directory as your .swf.
Hopefully soon I’ll get around to moving those files, because some of them are awesome to see!
By Thomas on Jan 31, 2008
Thanks so much for the sources Thomas! Very helpful; the only example of actual code of VideoStreamMaterial I could find online.
Do you by any chance know the syntax for converting the vidMat to something that could go on a sphere?
I tried var vidMaterial= new MovieMaterial(vidMat)
and also tried
var vidMaterial= new MaterialObject3D(vidMat)
but neither worked…
all hints appreciated. and thanks again.
jhave
By jhave on Feb 6, 2008
It would be something like this-
var vidMat:VideoStreamMaterial = new VideoStreamMaterial(video, stream);
var videoSphere:Sphere = new Sphere(vidmat, radius, segmentsW, segmentsH);
hope this helps!
By Thomas on Feb 7, 2008
Thanks so much, that worked perfectly…
so simple.
there was a typo in the caps… so i post,
correct version:
vidMat = new VideoStreamMaterial(video, stream);
var videoSphere:Sphere = new Sphere(vidMat, radius, segmentsW, segmentsH);
By jhave on Feb 7, 2008
Thx for sharing your source ! … but: it doesn’t work for me !!
I admit that i’m a noob in papervision coding, but here’s what i have in the errors’console (french translated !) when i compile the videocube.fla file :
“vertices3D.as, line 37 / description : 1020 : the mathod written override should neutralize another method”
source : public override function clone():DisplayObject3D
Could you help me resolve this error ?
By itch on Aug 25, 2008
Hello tanks for share… one question… how can I change propetries of video flv to get alpha of video or chromakey… of videos thats have alpha actived,.imagine a cube or a plane with a video flv alpha looks like hologram..thanks
By Javier Patiño on Mar 31, 2009
Great example, but I find myself having trouble getting the video to map onto a plane, and can’t understand why, as the Papervision Plane class is almost identical to the Cube class. Yet I’m getting this error “Implicit coercion of a value of type org.papervision3d.materials.utils:MaterialsList to an unrelated type org.papervision3d.core.proto:MaterialObject3D.
The only difference btw working code and non-working code is that I call ‘createPlane’ instead of ‘createCube’, and this is my function:
private function createPlane():void
{
trace(”CREATE PLANE”);
var quality = 16;
vidMat = new VideoStreamMaterial(video,stream);
vidMat.oneSide = true;
var vidList:MaterialsList = new MaterialsList({all:vidMat});
//var insideFaces:int = Plane.ALL;
plane = new Plane(vidList,600,400,0,0);
universe.addChild(plane);
}
Yet from the documentation the VideoStreamMaterial class inherits from MaterialObject3D — VideoStreamMaterial Inheritance MovieMaterial Inheritance BitmapMaterial Inheritance MaterialObject3D.
Both Cube and Plane expect the first param in the contructor to be a MaterialObject3d, and it works just fine with Cube class.
HELP!
By PDub on Jun 11, 2010
The solution I came up with was to use the code at http://www.garrahan.org/papervideo.php. I used the PaperVideo/PaperBase classes to handle the video, and placed the video in a DisplayObject3D container.
By PDub on Jun 17, 2010