Streaming Video: An Overview
Frame rate and keyframes
Other factors that could impact the user experience are frame rate and key frame placement.
Frame rate is the speed at which a video plays. One of the more common frame rates for digital video is 29 or 30 frames per second which matches the North American video standard of 29.97 frames per second. Another common frame rate is 24 frames per second. Regardless of which one you have been handed there will be occasions where you may wish to reduce the rate such as in low bandwidth situations. If you want to lower the frame rate, you should use equal divisions of the source frame rate. For 30 fps, use 15 fps, 10 fps, 7.5 fps, and so on. For 24 fps, use 12 fps, 8 fps, 6 fps, and so on.
Be careful when you consider playing with the frame rate. Your FLV frame rate should be as close to the Flash frame rate as possible. The reason is the audio track in the video. It always plays back at the original frame rate. Let’s assume you create an FLV that uses 24 fps. Place that in Flash movie that plays back at 12 frames per second. The video portion will play at 12 fps but the audio will zip along at 24 fps … a nasty scenario to say the least.
Key frames in video, in many respects, are similar to key frames in Flash. In video, a key frame contains all of the data in that frame — where they part company is in what happens between the key frames. In video the frames between the key frames are called Difference Frames or, if you are really “techie”, “Delta Frames". Difference frames have the stuff that doesn’t change between key frames removed. This means the file size is reduced.
Now let’s be very careful here because a bad decision here can ruin your work.
If you were to stand at the side of a major city intersection and shoot cars and people walking by there is going to be a lot of change and very few difference frames. Now take your camera into a farmer’s field and shoot some footage of a tree. There won’t be a lot of change meaning there can be a lot of difference frames. This explains why a 30 second video of a Formula One race is a lot larger in file size than that of a 30 second video of a tree in a field. Fewer difference frames means larger file size. The problem is, if you spread out the key frames in the Formula One video, the image quality degrades and looks blurry. We wish we could say to you there is a hard and fast rule about key frame frequency, but there isn’t.
Before you encode the video, watch the video and see if there is a lot of movement both in the video and with the camera. This will determine the key frame frequency. If you are at all unsure of what to do select “Automatic” from the Pop Down and let the software do the work for you.
By spreading out the key frames you can have quite a positive impact upon the final size of the FLV. What you don’t want to do is to think all video is created equally. If there is a lot of motion — a Formula One Race — you will need more key frames. If it is a “Talking Head” video — a tree in a field — you can get away with fewer key frames. The bottom line is this decision is up to you but it is the prudent developer who reviews the entire video prior to converting the file to an FLV.
Image 16: Keyframes and frame rate can be set when the video is created.
Image 17: Keyframes and frame rate can be set in the Flash Video Encoder.


This work is licensed under a Creative Commons License.
