Video and Audio Stream SWF File Structure

This section describes the SWF file structure that records both video and audio streams. It uses DEFINEVIDEOSTREAM tag to define the video stream data and SOUNDSTREAMHEAD2 tag to define audio stream data.

SWF file format can also be used to record video streams, audio streams, or video and audio streams mixed together.

Below is the structure of a SWF file dumped by the "swfdump" command from the SWFTools package. This SWF file records both video stream and audio stream mixed together.

[HEADER]   File version: 6
[HEADER]   File size: 8383705
[HEADER]   Frame rate: 25.000000
[HEADER]   Frame count: 4795
[HEADER]   Movie width: 416.00
[HEADER]   Movie height: 240.00
[02d]    6 SOUNDSTREAMHEAD2
[03c]   10 DEFINEVIDEOSTREAM defines id 0000 (4795 frames, 416x240 
           sorenson h.263)

[01a]   21 PLACEOBJECT2 places id 0000 at depth 0001 name "video"
[03d] 6485 VIDEOFRAME adds information to id 0000 (frame 0) 416x240...
[013]  421 SOUNDSTREAMBLOCK
[001]    0 SHOWFRAME 1 (00:00:00,000)

[01a]    5 PLACEOBJECT2 moves object at depth 0001
[03d] 1069 VIDEOFRAME adds information to id 0000 (frame 1) 416x240...
[013]  422 SOUNDSTREAMBLOCK
[001]    0 SHOWFRAME 2 (00:00:00,040)

[01a]    5 PLACEOBJECT2 moves object at depth 0001
[03d]  440 VIDEOFRAME adds information to id 0000 (frame 2) 416x240...
[013]  840 SOUNDSTREAMBLOCK
[001]    0 SHOWFRAME 3 (00:00:00,080)

...

[01a]    5 PLACEOBJECT2 moves object at depth 0001
[03d]   97 VIDEOFRAME adds information to id 0000 (frame 4794) 416x...
[013]  422 SOUNDSTREAMBLOCK
[001]    0 SHOWFRAME 4795 (00:03:11,757)
[000]    0 END

As you can see from the dump file, a video and audio stream SWF file structure is very simple:

Last update: 2014.

Table of Contents

 About This Book

 Introduction of Adobe Flash

 Adobe Flash Player Plugin for Firefox

 Adobe Flash Player Plugin for Chrome

 Adobe Flash Player Plugin for Safari

 Adobe Flash Player ActiveX for IE

 Using "object" Elements for Flash Files

 Using "embed" Elements for Flash Files

 "mp3player" - MP3 Music Player

 SWFObject - Hidding "object" behind JavaScript

 Flash Player Projector

 SWFTools - SWF File Manipulation Tools

 SWFC Script to Generate Flash SWF Files

 ActionScript Embedded in SWFC Script

 AS3Compile - ActionScript 3 Compiler

 Adobe Flex SDK 4

 SWF File Structure and Tags

 SWF File Processing Rules

SWF Files for Video and Audio Streams

Video and Audio Stream SWF File Structure

 Installing FFmpeg to Manipulate Video SWF Files

 Playing Movie with FFmpeg "ffplay" Command

 See File Properties with FFmpeg "ffprobe" Command

 Convert File Format with "ffmpeg" Command

 Issue with "ffplay" on SWF Output File

 "ffplay" Interactive Commands

 Break Long Video into Parts with "ffmpeg"

 Concatenate Video Files with "ffmpeg"

 Video/Audio Stream Concatenation Order

 Split Audio Stream Out of SWF File

 Split Video Stream Out of SWF File

 Merge Video and Audio Streams to SWF File

 Reduce Video Stream Resolution

 Reduce Video Frame Rate

 Outdated Tutorials

 References

 PDF Printing Version