Adobe Flash Player 9 introduces some new buffering functionality that was not implemented in the previous release. The new features include the buffering of H.264 video files and the ability to continue buffering while the stream has been paused. In order to fully leverage these features, you need to connect Flash Player 9 Update 3 to Flash Media Server 3.
Buffering of H.264 encoded video
One of the most exciting new features of Flash Media Server 3 and Adobe Flash Player 9 is undoubtedly the support for H.264 streaming media. The process of buffering H.264 encoded video is much more complex than buffering On2 VP6 or Sorenson Spark-encoded video.
Both the VP6 and Spark codec primarily use two types of video frames: intra-compressed (i-frames) and inter-predicted frames (p-frames). Known commonly as “keyframes,” i-frames are compressed without reference to other frames. This means that keyframes are independent and represent an anchor when viewers perform seeking, scrubbing, and similar operations. P-frames are encoded as the difference from a previous p-frame or i-frame. P-frames are therefore dependent by the decompression of previous frames.
The Spark codec allows the use of the previous p-frame or i-frame only as reference to a p-frame, while the VP6 codec allows the reference to include two frames—which are always in the past and always reside after the last i-frame. This means a GOP (group of pictures) always extends between two consecutive i-frames. Buffering this type of stream is simple because after the first i-frame is buffered, it is not strictly necessary to buffer an exact amount of subsequent p-frames or i-frames because none of the frames requires future frames in order to be decompressed.
H.264 is a very complex standard. It uses a large number of encoding modes and strategies. A new type of frame, called a b-frame, can have multiple references both in the past and future. P-frames can have multiple references too, and their referencing is not “bounded” by the location of i-frames. Therefore, i-frames are not necessarily keyframes because after an i-frame, you can find a p-frame that refers to a frame preceding that i-frame. In order to identify a safe frame to seek to, H.264 defines a new frame type, called the IDR-frame. An IDR-frame is an i-frame that prevents the next p-frames from using any prior frames as their reference. Two consecutive IDR-frames determine the boundaries of a GOP.
When streaming H.264 videos, depending on the techniques used by the encoder, it might be necessary to buffer several frames before being able to decompress the first frame. When you stream H.264 content you will get an effective buffer length that differs from the settings you applied using the netStream.setBufferLength method. You may also find it is impossible to set and obtain a zero-length buffer.
This means that streaming H.264 video generally requires a deeper buffer. To help with this, I recommend that you always encode your video using two-pass mode because video encoded using single-pass usually requires a higher bit rate at the beginning—and this can lead to longer waiting times before the initial playback begins.
Background extended buffering while in pause
A new important feature is available in Flash Player 9 Update 3 when the stream playback is paused. It differs from the buffering procedure used in previous versions. When a stream is paused using Flash Player 8, for example, the streaming server fills the buffer regularly. As soon as the stream is unpaused, however, it always clears all the buffered data and starts a new rebuffering session. This process wastes precious bandwidth and causes an annoying rebuffering period every time the viewer chooses to pause and unpause the stream playback.
Flash Player 9 operates differently when the stream playback is paused. When the viewer pauses the stream, Flash Media Server continues to feed the buffer. The buffer size is slowly expanded in the background beyond the set buffer length. In approximately 60 seconds (bandwidth permitting) the buffer is filled with 60 seconds of stream data. This new feature takes advantage of the bandwidth available between the client and server without wasting any of it. This causes the buffer to save the extra data, which is waiting when the viewer chooses to unpause the stream.
This buffering process mimics the buffering that occurs when you deliver a progressively downloaded video but includes the advantages inherent over the control of bandwidth usage and server load. If you encounter situations where you don’t wish to use the extended buffering in the background, you can still choose to use the older buffering method. Simply set the stream to stop instead of pause when the user clicks the pause button, or pause the stream and then perform a seek operation. By using these strategies, the buffer is not expanded.
Synchronizing multiple streams
Thanks to this new buffering feature, it is finally possible to synchronize multiple streams using Flash Player 9 and Flash Media Server 3. The process for synchronizing multiple streams using progressive download is very simple. After you launch the load of videos and pause them all, you can monitor the loading status of each video. When a sufficient amount of data for each video is loaded, you can unpause the playback of all the video files at the same time. This method is not possible when using Flash Player 8 to stream video files because the unpause command causes the rebuffering of the streams and the subsequent start of each playback begins with an unpredictable delay.
On the other hand, Flash Player 9 keeps the buffer, so it is now possible to apply the same method as described for progressive downloads to achieve the synchronization of multiple video streams.
Adobe Flash Player 9 Update 3 introduces many features that provide new capabilities for any type of SWF content creator, including enhancements for developers, designers, and video professionals. To find out what you can do with this latest version (9,0,115,0), first read this overview and then take a look at the Flash Player 9 demo to see specific features in action.
H.264 and high-efficiency AAC support
Using the same APIs that you would use to load Sorenson or On2 VP6 video content, you can now load H.264 video in MPEG-4 format. This means that you can take advantage of the numerous tools and technologies around H.264 without even having to recompile your SWF.
Flash Player can play back a subset of MPEG-4 movies containing H.264 content, including baseline, main, and high profiles. What this means is that you can take existing movies like 3GP, MP4, and MOV files and play them back in your SWF content. For example, you can use many video podcasts and videos recorded from your mobile phone on the web in Flash Player.
In addition to supporting more content than ever before, Flash Player gives content developers access to a large ecosystem through the common H.264 standard. Many tools already export for H.264 video, including Adobe After Effects and Adobe Premiere Pro, and there’s a large community of video professionals already experienced with this codec.
Flash Player will continue to work with Sorenson and On2 video. Each of the supported codecs has its own strengths that make it the best choice for certain projects.
Graphical rendering enhancements
Flash Player 9 Update 3 has several improvements designed to make drawing pixels to the screen faster and better than ever before. The various techniques include hardware acceleration, multicore CPU support, and some new image adjustment features to improve image quality.
Full-screen support was introduced in the November 2006 dot release of Flash Player 9 (9,0,28,0). Based on the release timing, it should already have reached around 80% penetration. Flash Player 9 Update 3 adds new APIs to make full-screen more flexible and new capabilities to make even your high-definition videos play back with even better quality and performance in full screen!
To take advantage of these hardware scaling features, you specify a rectangle and then enter full-screen as normal. Flash Player takes the pixels in the rectangle and uses hardware acceleration to scale the image up to the size of the screen.
While in normal mode, rendering continues to be done by your computer’s main processor. However, Flash Player can now take advantage of up to four CPUs/cores for graphics while ActionScript execution remains on your first processor. Bitmaps, filters, vectors, and video can now be split across the processors to make playback more efficient.
Regardless of the number of processors your computer has, you can enable other enhancements such as improved image downscaling. This feature resamples images when they are scaled down by 50% or more. This increases image display efficiency as well as accuracy for better-looking scaled images.
Flash Player cache
Certain components and elements created by Adobe are used by a large number of websites. The most significant of these is the Flex framework. More than 100K of identical data has to be downloaded for every Flex application. With the new Flash Player cache, Flex applications will download and start up much faster because users will have already downloaded the framework from one site and will not need to download it again—even when accessing Flex applications on other websites.
The Flash Player cache is separate from the browser’s cache. It works by storing the contents of a new type of file (SWZ) on your hard drive. When a website makes a request for the SWZ file from the server, Flash Player first checks to see whether it has the matching file already in the cache before attempting to download it.
The Flash Player cache improves the end-user experience because Flex sites will now download much faster. This feature is also beneficial to the application host by reducing bandwidth.
Cross-platform parity
The Flash Player 9 Update 3 release also adds functionality to specific plug-ins to add support for some features that have not been available in the past.
Microsoft Active Accessibility (MSAA) support has been added to the PC plug-in to provide accessibility support across all PC installations of Flash Player on a per-object basis. These features continue to work in the same way as they do in the ActiveX control. There are no changes to the APIs.
For Linux users, full-screen APIs are now available and include the new hardware-scaling features described previously.
General
* Flash Player cannot progressively load files that are greater than 2Gb (210223)
* UILoader ignores scaleContent when content is loaded through loadBytes (209828)
* Memory utilization could substantially increase when large numbers of bitmaps that are subject to mipmapping are loaded (205555).
* Flash Player supports up to 30 frames per second playback for video.
* Opera and Netscape do not allow recursive calls using the ExternalInterface API into the Flash Player. This issue has been reported to Opera and Netscape. (184777)
* In certain browsers, full-screen does not render correctly when the window is split between two monitors where one monitor has a higher resolution than the other. (210161)
* Socket connecting to port under 1024 throws ioError, not securityError (209795)
* When using the Flex profiler, if FlashPlayerTrust is incorrectly created as a file, the Flex profiler will crash. Please ensure FlashPlayerTrust is properly configured as a directory. (203879)
* On the Windows standalone Flash Player, empty POST actions are changed to GET. (85982)
* Subsequent loads of ActionScript 2.0 SWFs containing components into a parent ActionScript 3.0 SWF may cause some components to break. The components will work on the first load, but loading new, or unloading ActionScript 2.0 components of the same class may exhibit this behavior. (176101)
* Developers should not rely on garbage collection if immediate clean up of active objects, such as display objects, streams and media, is expected. Use the appropriate ActionScript 3.0 APIs (close, removeEvent Listener, etc.) to get immediate behavior when cleaning up active objects.
* The delete operator is intended to remove properties of an object, and cannot be used to remove members of a class. For more details on the delete operator, see the ActionScript 3.0 Language Reference.
* Flash Player sound input does not work for OSX Audio MIDI sample rate settings higher than 48Khz. The microphone will either record noise or nothing. Some third party applications and MIDI breakout boxes will change the systemwide Audio settings on launch, and fail to return settings to default on close. To workaround this issue, go to Applications-> Utilities-> Audio MIDI Setup. Select Sound Input and change the properties for the ‘Built-in Input’ and/or ‘Built-in Microphone’ to a setting less than or equal to 48Khz. (160350)
* The standalone player cannot self-register SWF and FLV file associations under Vista without administrator privileges. Workaround: Users should launch SAFlashPlayer.exe once with administrator privileges by right-clicking on the EXE and selecting “Run as administrator” so it can correctly set the registry properties. (183319)
* Bitmap effects and filters cannot be printed. (185581)
* Button label text may not redraw correctly upon exiting full screen mode. User must mouse over the text to force the redraw. (185459)
* Transform Matrix transformations are not reflected in respective MovieClip/DisplayObject properties. Properties like scaleX, scaleY, and rotation are not changed as the result of changes to a DisplayObject’s transformation matrix (flash.geom.Transform, flash.geom.Matrix). However, changes to those properties are reflected in the matrix. If you change a property after changing the matrix, the matrix also resets to its original value. Affects ActionScript 2.0 and ActionScript 3.0. Workaround: If using matrix transformations, avoid using scaleX, scaleY, and rotation in favor of their respective matrix transformations.
* Triggering stage.invalidate() during a “render” event listener fails. (184574)
* Empty strings passed through External Interface API via JavaScript are converted to null. (184474)
* Some users are experiencing sound problems under Windows due to lack of support for WaveOut with drivers for some video cards, such as Realtek and SoundMax. (184367)
* Launching the context menu when in full-screen mode may temporarily reduce FLV video playback performance on Macintosh systems. (189059)
* Although full-screen mode does not support text input, the text input cursor will display over input text fields. Workaround: dynamically convert input fields to dynamic text fields or disable TextInput components when in full-screen mode. (182474) Continue reading →
Flash Player 9 builds on the advances in Flash Player 8 by focusing on three main areas: creating a more robust programming model, achieving standards compliance, and delivering ground-breaking performance.
This release of Flash Player includes:
* ActionScript 3.0, a significant update to the scripting language of the runtime that provides a familiar syntax and compelling new language features. ActionScript3.0 delivers up to 10 times faster performance, faster application start-up times and a reduced memory footprint.
* New Flash Player APIs, such as those for the display list, enable greater creative control over content and applications.
The features available in Flash Player 9 are described in the Flex Builder 2 help. ActionScript 3.0 resources and documentation are also available in the ActionScript Technology Center. Features that developers should be aware of include:
* ActionScript 3.0
* Performance
ActionScript 3.0
ActionScript is the powerful object-oriented programming language of the Flash Player runtime environment. ActionScript 3.0 advances the language to offer developers a robust programming model for rich internet applications. ActionScript 3.0 is compliant with the ECMAScript Edition 3 (ECMA-262) standard and is based on the ECMAScript Edition 4 (ES4) draft language specification. For a complete listing of APIs, see the Flex 2.0 MXML and ActionScript Language Reference.
Some highlights of the ActionScript 3.0 language include:
* ECMAScript for XML (E4X)
E4X enables easy manipulation of XML documents using a familiar syntax. Utilize new E4X classes XML, XMLList, QName, and Namespace to develop code to traverse, filter, and manipulate XML data more quickly and easily than was possible with previous programming techniques.
* Regular Expressions
ActionScript 3.0 implements regular expressions, as defined in the ECMAScript Edition 3 language specification (ECMA-262). Native support for regular expressions saves coding time for string search and manipulation procedures.
* DOM Events APIs
Based on the industry-standard Document Object Model (DOM) Level 3 Events Model, ActionScript 3.0 introduces better control over event handling through standardized APIs.
* Display List APIs
Directly create, manipulate, and control objects on the Flash Player display list for complex application creation and control. New classes include Sprite, a lightweight building block, and Shape, for raw vector shapes. Depth management is automatic and handled by Flash Player 9, with new methods for specifying and managing the z-order of objects.
* New Sound APIs
The new sound APIs provide greater control over imported and embedded sounds; for example, the new SoundMixer.computeSpectrum() method provides the ability to get information about sounds currently playing in Flash Player.
* Binary Data and Sockets
Enables interoperability with existing custom protocols, and increases data transfer performance with a more compact representation of data versus XML.
* Runtime Exceptions & Error handling
ActionScript 3.0 introduces runtime exceptions for common error conditions, improving the debugging experience and enabling development of more secure, robust applications.
Performance:
* Faster ActionScript Performance
Flash Player 9 delivers up to 10x performance improvement for ActionScript 3.0 execution.
* Reduced Memory Footprint
ActionScript 3.0 applications use less memory than equivalent ActionScript 2.0 applications.
Full-screen mode was already supported in previous versions of the Flash stand-alone player and projectors, and we have not changed that implementation. However, we have added new ActionScript that will work in both the stand-alone player and the browser players, and a new HTML tag parameter allowFullScreen to enable the mode. The full-screen mode in Flash Player is initiated through ActionScript and can be terminated through ActionScript, keyboard shortcuts, or by the user switching focus to another window.
If you have the latest version of Flash Player installed, you can now also choose what part of your stage fills the screen. By assigning a value to fullScreenRect before going into full-screen mode, you can trigger a hardware-scaled view of your video that plays back your video with even better performance.
Because hardware scaling involves using capabilities of the user’s video card, Flash Player will fall back to the original software-rendered full screen if the video card does not support this feature. Also, the user can choose to disable hardware scaling which will also cause the original software-rendered full-screen mode to be displayed.
Full-screen mode was not originally supported if the wmode is opaque or transparent windowless, but it is now supported starting with the latest version of Flash Player. If the user has multiple monitors, Flash Player uses a metric to determine the monitor that contains the greatest portion of the Flash movie and then goes full-screen in that main monitor.
You must have version 9,0,28,0 or later of Flash Player installed to use full-screen mode and 9,0,115,0 or later for hardware-scaled full-screen mode.
Note: The keyboard shortcuts which terminate full-screen mode are Escape (Windows and Mac OS), Control+W (Windows), Command+W (Mac OS), and Alt+F4 (Windows).
The rise in broadband penetration has enabled tremendous growth in the use of video on the web. According to a March 2007 comScore Video Metrix rankings study, five out of every seven Internet users (71.4 percent) in the US streamed video online. In addition, a June 2007 Pew Internet & American Life Project report states that 47% of adults in the US have high-speed connections at home.
Contributing to this trend, Flash video is being used to deliver new types of integrated, interactive video content and applications, as well as enabling new business models for video on the web. Since the release of Macromedia Studio 8 and Macromedia Flash Player 8, the use of Flash video has exploded on the Internet for all kinds of content—from video sharing sites that highlight home videos of teens dressed as ninjas singing karaoke to movie trailers, ads, and full episodes of TV shows.
While Flash Player and Flash video currently provide a great video experience that “just works,” it hasn’t quite delivered on the full immersive experience many people posting video to the web would like to provide for their viewers. To enable a richer experience, one that takes the viewer out of the frame of the browser and fills the entire computer screen, you can now take advantage of the full-screen mode in Adobe Flash Player 9.
Although you can use full-screen mode for any type of Flash application, Flash video applications were the primary use case that the Flash Player team focused on in this initial implementation. For this reason, there are a number of security restrictions to full-screen mode (detailed in the next section), which may limit its usefulness with some fully interactive Flash applications or games. We hope to address these limitations in future versions of Flash Player as we continue to develop this feature.
Install the latest Flash Player 9 version available for your operating system, which has the most recent security and stability updates. Version 9.0.262.0 is the latest version of Flash Player 9 for Windows, Macintosh, and Linux.
To check whether Flash Player 10 supports your operating system, see supported operating systems.
If your operating system is not supported, download the most recent Flash Player 9 version through the Flash Player Download Center. Or click the link that corresponds to your operating system:
Windows Flash Player 9
* Internet Explorer: Download (1.46 MB)
* Netscape: Download (1.43 MB)
Macintosh Flash Player 9
* Mac OS X (Intel): Download (4.42 MB)
* Mac OS X (PowerPC): Download (2.81 MB)
Linux Flash Player 9
* All Browsers: Download (2.91 MB)
The issues described in this technote are specific to Adobe Flash Player 9 Update 3 (v9.0.115.0).They do not exist in earlierversions of Flash Player and they are resolved in Flash Player 9.0.124.0. There are two issues introduced with the Adobe Flash Player 9 Update 3 (v9.0.115.0) that involve the use of getURL() and navigateToURL() calls. Both of these issues are reproducible only in the Flash Player ActiveX control used by Internet Explorer for Windows:
1. ActionScript 2 getURL()and ActionScript 3 navigateToURL() calls such as getURL(“javascript:myFunction();”) fail when the content is on a local drive, CD, or DVD. This issue appears to be specific to Internet Explorer 7.
This issue is not affected by the addition of the local path to the FlashPlayerTrust directory or Flash Player Settings Manager, but that trust is still required to play local SWF content.
2. ActionScript 2 getURL() and ActionScript 3 navigateToURL() calls such as getURL(“javascript:myFunction();”) fail with live web-server content if the HTML and SWF are in separate domains. This issue occurs in Internet Explorer versions 6 and 7.
This issue is specific to targeting the reserved frame target names: “_self”, “_parent”, “_top” and “_blank”.
Reason – These are known issues with Flash Player 9 Update 3 (v9.0.115.0).These issuesare addressed in Flash Player 9.0.124.0.
Solution
Ideally all users would update to Flash Player 9.0.124.0 to resolve this issue. But inmany locked-down environments this is not possible. Ifyou must target Flash Player 9.0.115.0, you can work around these issues in three ways: Continue reading →
In 2003, Flash Player 7 software introduced a channel of client-server communication that was new to the web: direct cross-domain data loading, authorized by policy files. Before policy files, web content could only perform two-way communication with its own server, such as runtime configuration or transactions without page reloads. Policy files allowed servers to open up their data selectively to client content from other domains, or generally to content from anywhere. Since the introduction of policy files, domain boundaries have been less of a barrier for authors of rich Internet applications.
Like most new technologies, policy files weren’t perfect when they were first introduced. After four years, the Internet security community has found two undesirable situations (described later in this article) that can arise from the existence of policy files. The basic premise of policy files remains valid, and Flash developers can continue to rely on policy files just as they have since Flash 6. To address the new concerns, however, Adobe is specifying some stricter rules for the use of policy files. Additionally, there are a number of improvements that make policy files more useful and usable. We will try to explain the reasons for our changes clearly and simply.
This article assumes some familiarity with policy files. For a detailed introduction to policy files, see the Flash Player Security chapter of Programming ActionScript 3.0 on Adobe LiveDocs; Cross-domain policy file usage recommendations for Flash Player; and the Cross-domain policy file specification. For information about HTTP header-sending permissions in policy files, which is not covered in this article, see the relevant section in Understanding Flash Player 9 April 2008 Security Update compatibility.
How websites need to respond Continue reading →
With Adobe Flash Player versions later than 9.0.115.0, any of the configurations below may not work as intended:
* A SWF file attempts a socket or XMLSocket connection back to its own host, without performing a loadPolicyFile call to retrieve a socket policy file.
* A SWF file attempts a socket or XMLSocket connection back to its own host, and loads a policy file that does not list its own domain within the allowed domains.
* A SWF file attempts a socket or XMLSocket connection back to any host, with an HTTP policy file granting permission.
Flash Player versions later than 9.0.115.0 change the permission requirements for socket connections, and HTTP policy files no longer authorize socket connections. Flash Player has two types of policy files:
* HTTP policy files, which are crossdomain.xml files on a server that define whether SWF files from other domains can load that server’s content.
* Socket policy files, which define the ports to which Flash Player can connect using Socket or XMLSocket connections.
In earlier versions, a socket policy file, which is a policy file deployed by a socket, was not required to connect to ports greater than 1024, if:
* the domain that served the SWF file was the same as the domain of the socket connection, and
* the serving domain hosted a crossdomain.xml file.
This earlier configuration presented a risk to customers since an increasing number of critical services are served from ports greater than 1024. This change also help to mitigate the possibility of a DNS rebinding attack using Flash Player sockets to reach the victim’s host. To mitigate this issue, Flash Player now requires a socket policy file for all socket connections, regardless of the destination port and the presence of a crossdomain.xml file. There is now a fixed master location for socket policy files on port 843. The policy file on this port will be able to define meta-policies that define whether or not other socket policy files are allowed on the host. By default, all socket policy files are acknowledged. Continue reading →