1
votes

I'm creating some sort of flash video site. It consists of a several HD video's. The background video is 1920x1080. In front of it there is an object witch is also a video, but it it is stopped at first frame. When mouse is over this object - I play the video.

And here's the thing - when I firstly move cursor to the object - it plays like 5-6 fps. From the moment when video plays single time - it starts to go smoothly.

I use FLV files as videos and a sequence of PNG as an object on the video. FLV and PNG is 1920x1080. Flv and PNG's are loaded in the SWF file directly from library.

Here's the questions : Is there some sort of file buffering when the files are firstly displayed? Will it be better to load video from External files?

2

2 Answers

2
votes

This is not a direct answer to your question regarding loading media assets from library or dynamically, but I'll try to give you some thoughts about possible ways how to implement that functionality

For Full HD video I would recommend using H.264 video (mp4 or f4v). Flv is not the best codec for that resolution. H.264 will be rendered using GPU capabilities if you are using StageVideo shipped with Flash Player 10.2. You can overlay this video with your PNG sequence and you will be gaining a good amount performance over using FLV with normal video. StageVideo will also be accelerated if not in full screen mode. Beside that, using H.264 requires to load/stream the video dynamically.

1
votes

PNG sequence indeed has to to be fully loaded first time. That's why you might be getting lags if you are using PNG sequence. You can "play" that sequence before showing it so it IS loaded when you need it.

You'd better use StageVideo as suggested for Full HD videos on background because flash is very slow decoding such videos whatever someone says.