Flash Video Options
Whether you need FlashCom for an application requiring video depends
on how you are trying to serve your video, which depends on your
application's requirements. For assistance in
choosing the right technology based on the length of video clips,
number of viewers, and so on, see the chart at:
- http://www.macromedia.com/devnet/mx/flash/articles/video_primer.html
 |
Currently, FlashCom is the only way to collect and redistribute live
video from Flash movies as well as to stream recorded video to Flash
movies.
|
|
This book assumes you've made the decision to use
FlashCom (whether for video or other applications, such as chat).
However, there are other ways to play prerecorded video in Flash as
described next.
For a feature comparison of FlashCom versus other Flash video
alternatives, see:
- http://www.macromedia.com/devnet/mx/flash/articles/video_primer_03.html
Embedded Video
Flash MX and later versions of the Flash authoring tool make it
possible to import video files directly into a Flash movie. A Flash
movie containing embedded video can be played in Flash Player 4 and
later. Unfortunately, embedded video has severe limitations. The
video is incorporated into the .fla file before
it is converted to a .swf, meaning that the
developer must republish the .swf whenever the
video changes. Furthermore, the video makes the
.swf very large and slow to download. Embedded
video must be played at the same rate as the timeline and is limited
to 16,000 frames. Furthermore, sound synchronization problems occur
after about 2 minutes of video playback.
Progressive Download
Flash Player 7 added the ability to play FLV video files as they were
downloaded from a web server. The feature is usually referred to as
progressive download in order to distinguish it
from streaming. All that is required to make an FLV available for
progressive download is to post it on a web server and create a Flash
movie that downloads and plays it. When a Flash movie requests an FLV
file, the web server sends the file starting from the beginning of
the file until either the entire file is downloaded or the browser
and player disconnect. The file is held in cache so that the Player
can seek to different parts of the video that have already been
downloaded. The Player cannot seek ahead to sections of the video
that have not been downloaded from the web server.
Although video starts playing immediately with progressive download,
this approach doesn't support live video nor does it
support all the features of FlashCom such as total control over
seeking. Another limitation is that the entire video is downloaded to
the user's cache, which is undesirable when dealing
with copyrighted material.
The new Macromedia Video Kit is a utility for Dreamweaver developers
that includes Squeeze Lite to compress video in FLV format. The
utility allows HTML developers to easily embed Flash video in a web
page by automatically creating the .swf file to
play the video without the need for the Flash authoring environment.
The Flash video plays using progressive download, as can also be
accomplished using Flash MX 2004 or Flash Pro. For full details, see:
- http://www.macromedia.com/software/studio/flashvideokit
For streaming video from Dreamweaver, see the Flash Video Streaming
Service Lite as described at:
- http://www.macromedia.com/software/flashcom/fvss
- http://www.macromedia.com/devnet/mx/flash/articles/video_primer_04.html#authordwfl
Streaming Video with FlashCom
Unlike embedded video and progressive download, a Flash movie can ask
the FlashCom Server to stream any part of a prerecorded video at any
time. FlashCom will locate the video file, find the part of the video
to send, and start streaming from that point. Whenever it is
important to be able to quickly seek to any portion of a large video
file, FlashCom provides an important advantage over progressive
download and embedded video.
FlashCom also makes it possible to seamlessly adapt to each
client's bandwidth. You can script a bandwidth test
that will estimate the bandwidth available to the client and then
select an appropriate size video to stream. See Chapter 17 for more on bandwidth detection.
Macromedia maintains a video section on its DevNet site:
- http://www.macromedia.com/devnet/mx/flash/video.html
Macromedia has also published a video primer that provides a good
summary comparing different ways to deliver prerecorded video using
Flash:
- http://www.macromedia.com/devnet/mx/flash/articles/video_primer_print.html
FlashCom offers a persistent
connection, allowing you to implement many features with streaming
not supported by progressive download. It also offers the most robust
and consistent delivery platform, especially for large videos and
large numbers of users. Most notably, FlashCom
streaming video
allows you to:
Deliver live video and audio, whether from a web cam or digital video
camera Enable multiuser video conferencing and similar applications Start video playing as soon as possible Implement bandwidth detection to optimize video serving Monitor quality of service and provide logging, tracking, and
reporting statistics Maintain full scripting control of streams for detailed interactive
control of the video experience Easily change content by updating external videos (this also applies
to progressive download) Use less client memory and disk space (especially true for large
videos) Minimize the network load because only the portion of the video that
is viewed needs to be downloaded Securely deliver copyrighted material without its being saved to the
user's cache
See also Chapter 5 and Chapter 7 in this book for details on streaming.
 |