First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Flash Kit Staff

Reader "cantthinkofanic" Asked:

I am not an experienced Flash user. I have converted a mpeg video of some 75Mb using Flash 8 to a set of files (FLV, SWF - not sure what they all do). I find that the FLV downloads and plays intermittently on slower PCs even to the point where the picture freezes and the sound works OK.

Is there a way to synchronize the download (pre-download?) to get it smooth for low bit rate connections. I.e. what do you experts do?

The FLV file which is the one I've uploaded is about 8Mb.

Stefan's Reply:
The user is likely serving a progressive download, where the video downloads when the viewer clicks Play. There are two things to do to help smooth the streaming: reduce the encoding bit rate or pre-buffer the video.

A new user might not understand that when they encode an FLV file, they're choosing a bit rate for that file. If you've encoded your file at 300kbps, then anyone with a slower Internet connection (like someone using a 56kbps dial-up connection) will get stuttering, jerky playback. Try encoding your file at 256kbps, where you'll get a decent picture and still stream well over slow connections. That's still too much data for dial-up, but dial-up really isn't suited to video. If you've mistakenly encoded your work at a high rate, like 1000kbps, this is likely the problem. Most Internet users will have trouble getting a 1000kbps FLV file to play smoothly.

If changing the encoding rate doesn't take care of the problem, you may want to set your FLV player to pre-buffer the video. Pre-buffering means that the video will load for a given length of time before playback begins. For perfectly smooth playback, you can have the entire video load first, although this might keep your viewers waiting for too long a time.

There are two ways to initiate a buffer, and both are a little bit involved. You'll need to learn some ActionScript to get them to work. First, you can use the wizard within Adobe Flash to create a SWF file that includes both the player and the video. Choose File Import and then Video from the program's File menu. The wizard will walk you through the necessary steps. When you're done, you'll have a SWF file than you can embed in your page. The wizard itself doesn't create the buffer, though, You'll need to use ActionScript to select a keyframe and set the buffer time. The second way to create a customized player from scratch using ActionScript and build a buffer into it.

ActionScript is too complex to go into here, but you can learn the needed coding with the documentation that comes with Flash. Alternatively, Richter recommends going to the Flash section of the Adobe Developer Center and selecting the Video category. You'll find plenty of examples that will get you started.

If you're not sure about how much buffer to use, Richter recommends going big. "If in doubt, use a slightly larger buffer," he says.

» Level Intermediate

Added: 2009-01-26
Rating: 9 Votes: 2
» Author
Flash Professional
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.