From SWF 6 a movie can carry video on its timeline: a DefineVideoStream character placed like any other, and a VideoFrame tag for each frame of video. The explorer lists the video tags but does not decode or draw the video.
DefineVideoStream (60, SWF 6)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 2 | UI16 | CharacterID | The character ID |
| 2 | 2 | UI16 | NumFrames | The number of video frames |
| 4 | 2 | UI16 | Width | In pixels |
| 6 | 2 | UI16 | Height | In pixels |
| 8 | 4 bits | UB[4] | VideoFlagsReserved | 0 |
| 8 | 3 bits | UB[3] | VideoFlagsDeblocking | See below |
| 8 | 1 bit | UB[1] | VideoFlagsSmoothing | 1 smooths the video when it is scaled |
| 9 | 1 | UI8 | CodecID | See below |
| CodecID | Codec | From SWF |
|---|---|---|
| 2 | Sorenson H.263 | 6 |
| 3 | Screen video | 7 |
| 4 | On2 VP6 | 8 |
| 5 | On2 VP6 with alpha | 8 |
| 6 | Screen video version 2 | 9 |
| Deblocking | Meaning |
|---|---|
| 0 | Use the setting in the video packet |
| 1 | Off |
| 2 | Level 1 |
| 3 | Level 2 |
| 4 | Level 3 |
| 5 | Level 4 |
The levels above 2 are for VP6.
VideoFrame (61, SWF 6)
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 2 | UI16 | StreamID | The DefineVideoStream it belongs to |
| 2 | 2 | UI16 | FrameNum | The video frame’s number |
| 4 | to the end | bytes | VideoData | One packet in the codec’s own format |
The packet is an H263VIDEOPACKET, SCREENVIDEOPACKET, VP6SWFVIDEOPACKET, VP6SWFALPHAVIDEOPACKET or SCREENV2VIDEOPACKET, by the stream’s codec. A video placed on the timeline shows frame by frame through the PlaceObject2 Ratio, which gives the frame to show.
H.264 video plays from external FLV, F4V or MP4 files, not, as far as is known, from SWF tags: no H.264 codec ID is defined in the SWF 19 codec list as read here.