How do I add and customize intervals of keyframes via API?

The default value for keyframe interval set by the optional format field <keyframe> is 300, i.e. keyframe is added every 300 frames. For a framerate of 30fps this would equal 10 secs. But for 15fps (most often used for FLV) it would be 20 seconds, which may be too often. To change this value, simply use the <keyframe> parameter within the <format> element. For example, setting the value to 30 will allow to seek the video for every 2 seconds, assuming framerate 15 fps.

About Keyframes: Because video compression only stores incremental changes between frames (except for key frames), it is not possible to fast forward or rewind to any arbitrary spot in the video stream. That is because the data for a given frame only represents how that frame was different from the preceding frame. For that reason it is beneficial to include key frames at arbitrary intervals while encoding video. For example, a key frame may be output once for each 10 seconds of video, even though the video image does not change enough visually to warrant the automatic creation of the key frame. That would allow seeking within the video stream at a minimum of 10 second intervals. The down side is that the resulting video stream will be larger in size because many key frames were added when they were not necessary for the visual representation of the frame. http://en.wikipedia.org/wiki/Key_frame

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading...

edchelp