May be the number of videos is to large to keep fps high Sent from my iPhone
On Nov 23, 2010, at 4:06 PM, sledorze <[email protected]> wrote: > Hi! > I am currently trying to create a smooth Video Wall using Away3DLite > (Haxe version). > Everything works fine but each time I start a video, my framerate drop > from 40 to 15 FPS. > Clearly this is related to the FLV or NetStreamer startup time. > I know this is not directly Away3D related but as the community is > very realtime oriented, I wonder if some of you guys have an idea how > I could start a video without impacting the framerate so much or even > if something has been abstracted in the Away3D Engine. > > > I'm a total noub at Flash (1 month experience) > Below is the HaXe code to play the video. > Any input, any time :) > Big thanks! > Stéphane > > class PlaneVideo { > public var plane : Plane; > var screen : Video; > var stream : NetStream; > var sprite : Sprite; > var canceled : Bool; > > public function new(url : String) { > canceled = false; > > var planeSize = new Point(320, 320); > planeSize.normalize(320); > > sprite = new Sprite(); > plane = new Plane(new MovieMaterial(sprite), planeSize.x, > planeSize.y, 1, 1, false); > > screen = new Video(); > screen.cacheAsBitmap = true; > > var connection = new NetConnection(); > connection.connect(null); > stream = new NetStream(connection); > > var thiz = this; > stream.client = { > onMetaData : function (infoObject) { > if (!thiz.canceled) { > var width = Std.parseInt(infoObject.width); > var height = Std.parseInt(infoObject.height); > > var coefX = planeSize.x / width; > var coefY = planeSize.y / height; > var coef = coefY.min(coefX); > > thiz.screen.width = width * coef; > thiz.screen.height = height * coef; > thiz.sprite.addChild(thiz.screen); > } > } > }; > > screen.attachNetStream(stream); > stream.bufferTime = 1; > stream.checkPolicyFile = false; > stream.play(url); > } > > public function stop() : Void { > canceled = true; > plane.parent.removeChild(plane); > if (sprite.contains(screen)) { > sprite.removeChild(screen); > } > screen.clear(); > stream.close(); > } > } > > P.S.: (Vids are 160x120, lowess possible bitrate); I am currently > playing 18 of them simultaneously.
