Log in

View Full Version : Adding a .fla preloader to .flv video for website?



Iconoclast
12-06-2008, 12:18 PM
Hi guys, I've got a Flash video in .flv format, and I'm thinking about putting it up on my website...however, it's fairly long, and I'd like to attach a preloader (I already have the preloader .fla file made) so that when users go to view the page they'll at least see a progress bar of how much loaded, and they can decide if they want to wait to watch it or not.

Like I said, they're two separate files (the .fla for the preloader, and the .flv for the video). How would I go about "attaching" the preloader to the video? Is this possible? Any help would greatly be appreciated!

BLiZZaRD
12-06-2008, 04:26 PM
Make your fla (which you will publish into an .swf to upload) large enough (height width wise) to hold the flv file, use the preloader to load the flv file and pull it into the fla file when loaded.

Have a read of this liveDoc (http://www.adobe.com/devnet/flash/articles/talking_head_video_07.html) for more information.

Iconoclast
12-06-2008, 05:07 PM
Ok, that makes sense to me, but here's what it says when I try to open or import my flv video, it gives me 3 options:

- Load external video with playback component
- Embed FLV in SWF and play in timeline
- Import as mobile device bundled in SWF

This means absolutely nothing to me, it's like it might as well be in a different language. Which do pick and why?

BLiZZaRD
12-06-2008, 05:23 PM
you don't want choice 3.

Option 1 allows the flv to play using the swf to control pause, play etc. End user must have FLV codecs to view, and can be a pain.

Option 2 takes the flv and loads it into the swf, which can then be watched/played in any web browser or standalone with the flash player installed.

You want that one ;)

Iconoclast
12-06-2008, 05:26 PM
Ok cool thanks mate I will give that a try! :)

Iconoclast
12-06-2008, 07:16 PM
Ok, I tested it out, and it seems to work, but I'm having a couple of problems with it.

The first problem is the same as the problem you were helping me with earlier, for whatever reason the sound playing out of the movie sounds like it's being playing through a box or something else to distort it from it's actual good quality.

The second problem is that the video inside my compiled swf plays slower than it does when I open the flv, which means that the video and sound are not in sync as the video is lagging behind quite a bit. Is there any way to fix this?

Is there some other way of "externally" attaching my preloader to this video, but yet still have it display how much of the video is loaded? Because I know if I embed the flv video itself it will play and sound normally, but it seems like every time I try to import it and compile it something goes wrong. Any ideas?

BLiZZaRD
12-06-2008, 07:47 PM
Well stated:



Please be aware that Flash MX has had many reported problems with audio sync. The best way around these problems is to import your video at a one to one framerate as the source and to use a quality setting lower than 100%. You can also try using a 3rd party software, like our Flix encoder which offers excellent sync.

Here are other reasons why you may be losing audio sync:
To start it may be helpful to explain a couple of things:

A) Flash video has two framerates: 1) a video framerate, which is the number of distinct video frames per second in your video, and 2) a SWF framerate, which is the number of SWF frames in your final Flash video. These are not the same thing and you have to keep track of both - and how they relate to each other and to the source video framerate. Flash video is different in this way then standard video which has only a single video framerate.

B) A factor is a mathematical term that describes one of two or more quantities that divides a given quantity without a remainder. For example 1, 2, 3 and 6 are factors of 6; 1, 2, 3, 5, 6, 10, 15, and 30 are factors of 30, and so on. Potential reasons for loss of audio sync:

-The video framerate of your output SWF conflicts with the video framerate of your source video. The video framerate of your SWF video should be a factor of your source video framerate.
-The SWF framerate of your output SWF conflicts with the video framerate. The SWF framerate of your SWF video should be equal to or a multiple of your video framerate.
-The video SWF file created uses up too much RAM for the system it is running on, resulting in a loss of sync.
-The SWF file that the video is embedded (or loaded) in uses up too much processor power for the system it is running on, resulting in a loss of sync.
-The source has errors, which cause loss of sync.
-The source codec used is not 100% supported.
-The computer used to encode lacks the processing power and/or ram required to encode with sync.
-There may be a conflict between the audio settings you are using (frequency and bitrate) and the audio settings of your source video. You can try to experiment by altering your settings to see if it helps the problem. Often, increasing the frequency and bitrate can solve this problem.
-The video framerate being used is very low and the resulting video appears to have audio and video out of sync (especially with talking mouths) but in fact it is in sync and the appearance of sync loss is caused by the very low frame rate.
-The audio and video of the source video was captured with separate cards which results in a loss of sync that gets worse with subsequent generations.