Video File Format Specification
Version 9
Copyright © 2008 Adobe Systems Incorporated. All rights reserved. This manual may not be copied, photocopied, reproduced,
translated, or converted to any electronic or machine-readable form in whole or in part without written approval from Adobe
Systems Incorporated. Notwithstanding the foregoing, a person obtaining an electronic version of this manual from Adobe may
print out one copy of this manual provided that no part of this manual may be printed out, reproduced, distributed, resold, or
transmitted for any other purposes, including, without limitation, commercial purposes, such as selling copies of this
documentation or providing paid-for support services.
Trademarks
Adobe, ActionScript, Flash, Flash Media Server, and Flash Player are either registered trademarks or trademarks of Adobe Systems
Incorporated and may be registered in the United States or in other jurisdictions including internationally. Other product names,
logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of
Adobe Systems Incorporated or other entities and may be registered in certain jurisdictions including internationally. No right or
license is granted to any Adobe trademark.
Third-Party Information
This guide contains links to third-party websites that are not under the control of Adobe Systems Incorporated, and Adobe
Systems Incorporated is not responsible for the content on any linked site. If you access a third-party website mentioned in this
guide, then you do so at your own risk. Adobe Systems Incorporated provides these links only as a convenience, and the inclusion
of the link does not imply that Adobe Systems Incorporated endorses or accepts any responsibility for the content on those third-
party sites. No right, license or interest is granted in any third party technology referenced in this guide.
NOTICE: THIS PUBLICATION AND THE INFORMATION HEREIN IS FURNISHED “AS IS”, IS SUBJECT TO
CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE
SYSTEMS INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR
LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY KIND (EXPRESS,
IMPLIED, OR STATUTORY) WITH RESPECT TO THIS PUBLICATION, AND EXPRESSLY DISCLAIMS ANY AND
ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSES, AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
Adobe Systems Incorporated
Published April 2008
i
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The FLV file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The F4V file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1: The FLV File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The FLV header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
The FLV file body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
FLV tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Audio tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
AACAUDIODATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Video tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
AVCVIDEOPACKET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Data tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
onMetaData. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 2: The F4V File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
The F4V box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
ftyp box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
moov box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
mvhd box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
trak box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
udta box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
meta box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
mdia box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
minf box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
stbl box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
tkhd box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
mdhd box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
stsd box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
stsc box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
stts box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
ctts box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
stco and co64 boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
stss box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
ii Contents
stsz box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
chpl box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
pdin box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
mdat box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Required structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Supported media types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Unsupported boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Chapter 3: F4V Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Tag box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
ilst box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Image metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Text metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
styl box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
hlit box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
hclr box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
krok box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
dlay box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
drpo box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
drpt box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
href box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
tbox box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
blnk box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
twrp box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1
Introduction
This document provides technical format information for the video file formats supported by
Adobe® Flash® Player software—FLV and F4V.
Adobe seriously considers all feedback to the video file format specification. E-mail any
unclear or potentially erroneous information within the specification to Adobe at
flashformat@adobe.com. All such email submissions shall be subject to the Submitted
Materials guidelines in the Terms of Use at www.adobe.com/misc/copyright.html.
The FLV file format
Starting with SWF files published for Flash Player 6, Flash Player can exchange audio, video,
and data over RTMP connections with the Adobe Flash Media Server™. One way to feed data
to Flash Media Server (and thus on to Flash Player clients) is from files in the FLV file format.
Starting with SWF files published for Flash Player 7, Flash Player can also play FLV files
directly with MIME type video/x-flv.
An FLV file encodes synchronized audio and video streams. The audio and video data within
FLV files are encoded in the same way as audio and video within SWF files.
This document describes FLV version 1. For more information on the FLV format, see
Chapter 1, “The FLV File Format,” on page 3.
The F4V file format
Starting with SWF files published for Flash Player 9 Update 3 (9,0,115,0), Flash Player can
play F4V files. The F4V format is based on the format specified by ISO/IEC 14496-12: ISO
base media file format. For more information on the F4V format, see Chapter 2, “The F4V
File Format,” on page 15.
A large part of the F4V format involves metadata. For more information on F4V metadata,
see Chapter 3, “F4V Metadata,” on page 33.