Quicktime File Format Specification Contents
Total Page:16
File Type:pdf, Size:1020Kb
QuickTime File Format Specification Contents Introduction to QuickTime File Format Specification 17 Organization of This Document 17 Licensing Information 18 Special Fonts 18 Updates to This Specification 18 For More Information 19 Overview of QTFF 20 Media Description 20 Atoms 20 Atom Layout 22 Atom Structure 22 QT Atoms and Atom Containers 24 QT Atom Containers 27 QuickTime Movie Files 30 The File Type Compatibility Atom 33 Free Space Atoms 35 Movie Data Atoms 35 Preview Atoms 35 Movie Atoms 37 Overview of Movie Atoms 38 The Movie Atom 40 The Movie Profile Atom 42 Movie Header Atoms 43 Color Table Atoms 46 User Data Atoms 47 Track Atoms 54 Track Profile Atom 57 Track Header Atoms 57 Track Exclude From Autoselection Atoms 61 Track Aperture Mode Dimension Atoms 61 Clipping Atoms 66 Clipping Region Atoms 67 2012-08-14 | © 2004, 2012 Apple Inc. All Rights Reserved. 2 Contents Track Matte Atoms 68 Compressed Matte Atoms 69 Edit Atoms 69 Edit List Atoms 70 Track Load Settings Atoms 71 Track Reference Atoms 73 Track Input Map Atoms 76 Media Atoms 79 Media Header Atoms 80 Extended Language Tag Atom 82 Handler Reference Atoms 84 Media Information Atoms 85 Video Media Information Atoms 86 Video Media Information Header Atoms 87 Sound Media Information Atoms 88 Sound Media Information Header Atoms 89 Base Media Information Atoms 89 Base Media Information Header Atoms 90 Base Media Info Atoms 91 Data Information Atoms 92 Data Reference Atoms 94 Sample Atoms 95 Sample Table Atoms 96 Sample Description Atoms 99 Time-to-Sample Atoms 101 Composition Offset Atom 103 Composition Shift Least Greatest Atom 105 Using Composition Offset and Composition Shift Least Greatest Atoms 106 Sync Sample Atoms 107 Partial Sync Sample Atom 108 Sample-to-Chunk Atoms 109 Sample Size Atoms 111 Chunk Offset Atoms 113 Sample Dependency Flags Atom 115 Using Sample Atoms 116 Compressed Movie Resources 117 Allowing QuickTime to Compress the Movie Resource 118 Structure of a Compressed Movie Resource 118 Reference Movies 119 2012-08-14 | © 2004, 2012 Apple Inc. All Rights Reserved. 3 Contents Reference Movie Atom 120 Reference Movie Descriptor Atom 121 Data Reference Atom 122 Data Rate Atom 123 CPU Speed Atom 124 Version Check Atom 124 Component Detect Atom 125 Constants 127 Quality Atom 127 Metadata 128 Overview 128 Data Type 128 Meaning or Purpose 128 Data Location 129 Localization 129 Storage Location in a QuickTime File 129 Metadata Structure 129 Metadata Atom 129 Metadata Handler Atom 130 Metadata Header Atom 131 Extensibility 132 Localization List Sets 132 Country List Atom 133 Language List Atom 134 Metadata Item Keys Atom 135 Metadata Item List Atom 137 Metadata Item Atom 138 Value Atom 139 Type Indicator 139 Locale Indicator 139 Item Information Atom (ID and flags) 141 Name 141 Data Atom Structure 142 Data Ordering 142 Well-Known Types 143 Location Metadata 144 QuickTime Metadata Keys 144 Direction Definition 153 2012-08-14 | © 2004, 2012 Apple Inc. All Rights Reserved. 4 Contents Media Data Atom Types 154 Video Media 155 Video Sample Description 155 Video Sample Data 169 Sound Media 176 Sound Sample Descriptions 176 Sound Sample Data 187 Timecode Media 189 Timecode Sample Description 190 Timecode Media Information Atom 191 Text Media 193 Text Sample Description 193 Text Media Information Atom 196 Text Sample Data 196 Hypertext and Wired Text 197 Closed Captioning Media 198 Closed Captioning Sample Description 198 Closed Captioning Sample Data 199 Subtitle Media 199 Subtitle Sample Description 200 Font Table Atom 201 Subtitle Sample Data 202 Subtitle Style Atom 203 Text Box atom 204 Subtitle Track Header Size and Placement 205 Referencing a Related Forced Subtitle Track 206 Music Media 206 Music Sample Description 207 Music Sample Data 207 MPEG-1 Media 207 MPEG-1 Sample Description 207 MPEG-1 Sample Data 207 Sprite Media 208 Sprite Sample Description 208 Sprite Sample Data 208 Sprite Track Properties 210 Sprite Track Media Format 211 Sprite Media Format Atoms 213 Sprite Media Format Extensions 213 2012-08-14 | © 2004, 2012 Apple Inc. All Rights Reserved. 5 Contents Sprite Track Property Atoms 214 Sprite Media Atom and Data Types 215 Sprite Button Behaviors 220 QT Atom Container Description Key 221 Sprite Media Handler Track Properties QT Atom Container Format 222 Sprite Media Handler Sample QT Atom Container Formats 223 Wired Action Grammar 225 Flash Media 234 Tween Media 235 Tween Sample Description 235 Tween Sample Data 236 Tween Type Categories 237 Tween QT Atom Container 238 Modifier Tracks 247 Limitations of Spatial Modifier Tracks 247 Track References 248 Chapter Lists 248 3D Media 249 3D Sample Description 249 3D Sample Data 250 Streaming Media 250 Streaming Media Sample Description 250 Hint Media 251 Adding Hint Tracks to a Movie 252 Packetization Hint Media Header Atom 253 Hint Track User Data Atom 253 Movie Hint Info Atom 254 Finding an Original Media Track From a Hint Track 255 RTP Hint Tracks 255 Hint Sample Data Format 256 Packetization Hint Sample Data for Data Format 'rtp ' 259 Data Modes 263 VR Media 267 VR World Atom Container 268 Node Parent Atom 273 Node Location Atom Structure 273 Custom Cursor Atoms 274 Node Information Atom Container 275 Node Header Atom Structure 276 2012-08-14 | © 2004, 2012 Apple Inc. All Rights Reserved. 6 Contents Hot Spot Parent Atom 277 Hot Spot Information Atom 278 Specific Information Atoms 280 Link Hot Spot Atom 280 URL Hot Spot Atom 283 Support for Wired Actions 283 QuickTime VR File Format 284 Single-Node Panoramic Movies 285 Single-Node Object Movies 286 Multinode Movies 287 QTVR Track 288 QuickTime VR Sample Description Structure 288 Panorama Tracks 289 Panorama Sample Atom Structure 289 Panorama Image Track 293 Cylindrical Panoramas 295 Cubic Panoramas 296 Image Tracks in Cubic Nodes 297 Panorama Tracks in Cubic Nodes 297 Nonstandard Cubes 299 Hot Spot Image Tracks 300 Low-Resolution Image Tracks 301 Track Reference Entry Structure 301 Object Tracks 302 Object Sample Atom Structure 302 Track References for Object Tracks 309 Movie Media 310 Movie Sample Description 310 Movie Media Sample Format 310 Basic Data Types 316 Language Code Values 316 Macintosh Language Codes 317 ISO Language Codes 319 Calendar Date and Time Values 320 Matrices 320 Graphics Modes 321 RGB Colors 322 Balance 323 2012-08-14 | © 2004, 2012 Apple Inc. All Rights Reserved. 7 Contents Some Useful Examples and Scenarios 324 Creating, Copying, and Disposing of Atom Containers 325 Creating New Atoms 325 Copying Existing Atoms 328 Retrieving Atoms From an Atom Container 329 Modifying Atoms 332 Removing Atoms From an Atom Container 333 Preparing Sound and Subtitle Alternate Groups for Use with Apple Devices 334 General 334 Alternate Subtitle Tracks 335 Alternate Sound Tracks 335 Relationships Across Alternate Groups 336 Creating an Effect Description 337 Structure of an Effect Description 337 Required Atoms of an Effects Description 338 Parameter Atoms of an Effects Description 338 Creating an Input Map 340 Creating Movies with Modifier Tracks 343 Authoring Movies with External Movie Targets 345 Target Atoms for Embedded Movies 346 Adding Wired Actions To a Flash Track 347 Extending the SWF Format 347 Creating Video Tracks at 30 Frames per Second 349 Creating Video Tracks at 29.97 Frames per Second 350 Creating Sound Tracks at 44.1 kHz 351 Creating a Timecode Track for 29.97 FPS Video 352 Playing with Edit Lists 356 Interleaving Movie Data 358 Referencing Two Data Files With a Single Track 359 Getting the Name of a QuickTime VR Node 361 Adding Custom Atoms in a QuickTime VR Movie 363 Adding Atom Containers in a QuickTime VR Movie 364 Optimizing QuickTime VR Movies for Web Playback 365 The QTVR Flattener 366 Sample Atom Container for the QTVR Flattener 368 QuickTime Image File Format 370 Atom Types in QuickTime Image Files 370 Recommended File Type and Suffix 372 2012-08-14 | © 2004, 2012 Apple Inc. All Rights Reserved. 8 Contents Defining Media Data Layouts 373 Using QuickTime Files and Media Layouts 373 Random Access 375 Seeking With a QuickTime File 375 Metadata Handling 377 Digital Video File Formats 377 Digital Audio File Formats 378 Still Image File Formats 379 Animation and 3D File Formats 381 Summary of VR World and Node Atom Types 382 C Summary 382 Constants 382 Data Types 385 Profile Atom Guidelines 393 About This Appendix 393 Profile Atom Specification 394 Definition 394 Syntax 396 Semantics 396 Universal Features 397 Table of Features 398 Maximum Video Bit Rate 399 Average Video Bit Rate 400 Maximum Audio Bit Rate 401 Average Audio Bit Rate 403 QuickTime Video Codec Type 404 QuickTime Audio Codec Type 405 MPEG-4 Video Profile 406 MPEG-4 Video Codec 407 MPEG-4 Video Object Type 408 MPEG-4 Audio Codec 409 Maximum Video Size in a Movie 411 Maximum Video Size in a Track 412 Maximum Video Frame Rate in a Single Track 414 Average Video Frame Rate in a Single Track 415 Video Variable Frame Rate Indication 416 2012-08-14 | © 2004, 2012 Apple Inc. All Rights Reserved. 9 Contents Audio Sample Rate for a Sample Entry 417 Audio Variable Bit Rate Indication 418 Audio Channel Count 419 Audio Priming - Handling Encoder Delay in AAC 421 Background – AAC Encoding 421 The Timing and Synchronization Problem 422 Historical Solution—Implicit Encoder Delay 423 Using Track Structures to Represent Encoder Delay Explicitly 424 Edit List Atom 424 Sample Group Structures 425 Example—Representing Encoder Delay Explicitly 429 Audio Data 430 Track Structures 430 Summary—Using Track Structures to Represent Encoder Delay 432 Document Revision History 433