videovideo-encodingflv

What is the "generated keyframe" in the FLV spec?


I was working on a program to take an AVC stream and wrap it in FLV. I noticed that in the FLV spec, it mentions that one of the frame types is "generated keyframe (reserved for server use only)". I was unable to find further information on it.

  1. It's reserved for server use only, but what's it used for?
  2. What's a real-world example of when I would see it in the FLV container?

Solution

  • For creating FLV you need to worry only about adding key-frame and inter-frame.

    FLV was created by Adobe. You could play FLV inside Flash by using its provided NetStream API (equivalent to HTML5's <video> tag and MSE all in one API)

    For a video playing API, there is a "seeking" option. in AS3 there is also added "enhanced seeking" which generated any needed keyframes on-the-fly. I'm sure you are aware that compressed video must decode from a keyframe point first (and then decode up to the user's required seek frame)

    1. It's reserved for server use only, but what's it used for?

    See: AS3 NetStream's seek() function. It tells you:

    "If enhanced seeking is enabled, the server generates a new keyframe at offset based on the previous keyframe and any intervening P-frames."

    1. What's a real-world example of when I would see it in the FLV container?

    You don't. They are not saved just sent to the decoder after being generated by the server (or encoder if you want to call it that). They are not part of a file.