FLV to BitmapData faster than normal FLV playing?!?

Hi!

I’m currently developing an application that needs a background video and over the video there will be some png’s tweening from one position to another…

In my quest for greater performance I’ve discovered that “reading” the video object and send it to a bitmap is faster (more fps’s) than simply adding the video object to the stage!

Here is the normal method:


var ncVideo:NetConnection = new NetConnection;
ncVideo.connect(null);
var nsVideo:NetStream = new NetStream(ncVideo);
nsVideo.client = new Object();
nsVideo.addEventListener(NetStatusEvent.NET_STATUS, videoStreamHandler, false, 0, true);
nsVideo.play("bg.flv");
var video:Video = new Video(918, 435);
video.attachNetStream(nsVideo);
 
videoHolder_mc.addChild(video);
 
function videoStreamHandler(e:NetStatusEvent):void {
  if (e.info.code == "NetStream.Play.Stop") {
    nsVideo.seek(0);
  }
}

And here goes the faster method:


var ncVideo:NetConnection = new NetConnection;
ncVideo.connect(null);
var nsVideo:NetStream = new NetStream(ncVideo);
nsVideo.client = new Object();
nsVideo.addEventListener(NetStatusEvent.NET_STATUS, videoStreamHandler, false, 0, true);
nsVideo.play("bg.flv");
var video:Video = new Video(918, 435);
video.attachNetStream(nsVideo);
 
function videoStreamHandler(e:NetStatusEvent):void {
  if (e.info.code == "NetStream.Play.Stop") {
    nsVideo.seek(0);
  }
}
 
var vidBMPData:BitmapData = new BitmapData(918, 435, false, 0x000000);
var vidBMP:Bitmap = new Bitmap(vidBMPData);
videoHolder_mc.addChild(vidBMP);
this.addEventListener(Event.ENTER_FRAME, drawVid);
 
function drawVid(e:Event):void {
  vidBMPData.draw(video);
}

And here you can see both examples…

Normal video - http://www.lpfmultimedia.com/flvPerformance/normalVideo.swf

“Bitmap video” - http://www.lpfmultimedia.com/flvPerformance/bitmapVideo.swf

Can someone please explain me why is this possible?