Client-Side Communication ActionScript > Camera.setKeyFrameInterval |
![]() ![]() ![]() |
Camera.setKeyFrameInterval
Availability
![]() |
Flash Player 6. |
![]() |
Flash Communication Server MX (not required). |
Usage
activeCamera
.setKeyFrameInterval(keyframeInterval
)
Parameters
keyframeInterval
A numeric value that specifies which video frames are transmitted in full (called keyframes) instead of being interpolated by the video compression algorithm. A value of 1 means that every frame is a keyframe, a value of 3 means that every third frame is a keyframe, and so on. Acceptable values are 1 through 48. The default value is 15.
Returns
Nothing.
Description
Method; specifies which video frames are transmitted in full (called keyframes) instead of being interpolated by the video compression algorithm. This method is generally applicable only if you are transmitting video using Flash Communication Server.
The Flash video compression algorithm compresses video by transmitting only what has changed since the last frame of the video; these portions are considered to be interpolated frames. It may help to compare this concept with how tweening and keyframes interact within the Flash authoring environment: the frames between keyframes are created (interpolated) based on the contents of the previous frame. Similarly, frames of a video can be interpolated according to the contents of the previous frame. A keyframe, however, is a video frame that is complete; it is not interpolated from prior frames.
To determine how to set a value for keyframeInterval
, consider both bandwidth use and video playback accessibility. For example, specifying a higher value for keyframeInterval
(sending keyframes less frequently) reduces bandwidth use. However, this may increase the amount of time required to position the playhead at a particular point in the video; more prior video frames may have to be interpolated before the video can resume.
Conversely, specifying a lower value for keyframeInterval
(sending keyframes more frequently) increases bandwidth use, because entire video frames are transmitted more often, but may decrease the amount of time required to seek a particular video frame within a recorded video.
See also
![]() ![]() ![]() |