Omar Gonzalez


12 May 2008

Prerequisite knowledge
Some knowledge of Flex and Flash Player.
Required Products
Flash Player
Flex Builder 3 (Download trial)
Download the complete chapter
Chapter 10: Working with video (1892 KB)
User Level
In this chapter, I will attempt to give you a thorough understanding of the video display object of the Flex framework, with some specific insight into a few of the key video playback features in the RMX, including playlists and UI considerations for instream advertising. First, R Blank will start off with a brief word on some core video compression concepts that are important to understand—even for coders—in the preparation and delivery of Flash video. Next, I will go over playing back video in Flex.

Video boot camp

Although this chapter is about working with Flash video, as opposed to creating Flash video, in this section, I want to cover some of the basic issues in the preparation of video in Flash, before Omar discusses how to load and display the video files.
Compressing video is much like compressing flat images to bitmap formats like JPG. The compressor examines the source media, breaks it into separate blocks of pixels, and seeks redundancies it can exploit to represent those blocks with less data. This is how a 20MB PSD can be prepared into a 78KB JPG file for placement in a web site. Of course, with video, you have an additional dimension of data. Just as JPG compression seeks these shortcuts in two dimensions of visual data, or within a frame, video compression analyzes and processes three dimensions of color pixels, within a frame and between frames—both intraframe and interframe compression. So, when compressing video as opposed to still imagery, you have some additional settings available to you.
It's also worth noting, if you are relatively new to video, that video encoding is more an art than a science. There is never a single set of encoding settings that will objectively work for your video. It depends both on the characteristics of your source file (both the nature of the content as well as the technical settings of the digital media file) and your eye. It is a process of trial and retrial until you are happy with the results. Of course, the more you know about what settings you have at your disposal, the more tools you have in this process. As video compression technologies improve in quality, and the pipes you use to distribute compressed video grow, the less you must compress your media, and the less this matters.
This chapter covers the following topics:
  • VideoDisplay component
  • Adding video controls
  • Additional functionality
  • Playlists
  • Limitations of the VideoDisplay class


Prerequisite knowledge

Some knowledge of Flex and Flash Player.

User level