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.
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|
Rating: 10 Votes: 1
|Download the files used in this tutorial.|
|Download (0 kb)|
|More help? Search our boards for quick answers!|