1 / 12

Video Streaming in Flash

Learn about the advantages of using Flash for video streaming, including better compression and optimized streaming. Explore the capabilities of Flash Media Server and discover how YouTube utilizes Flash for video hosting.

sbarney
Download Presentation

Video Streaming in Flash

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Video Streaming in Flash CSCI 4220 – Network Programming Kacper Harabasz

  2. Challenges • Video’s major problem is compression, which leads to many proprietary formats. • Today’s major players are Microsoft, Real, Apple’s QuickTime, and now Flash.

  3. Why Choose Flash? • Other players can require video drivers on top of their players. For example DivX. • Flash circumvents this by converting stream able media to its own format, which is better compressed and optimized for streaming, although at a loss to quality. • It is really easy. Adobe has done most of the work for you.

  4. Streaming in Flash • Flash is Vector, not Bitmap based. • Images are represented as a set of points and geometric figures, as opposed to pixels. • Adobe is the ‘leader’ in both markets, with Photoshop (bitmap), Illustrator (vector), Director Suite (vector). • Free alternates are The Gimp (bitmap) and Inkscape (vector).

  5. Streaming in Flash • Thanks to this vector representation, Flash can save considerable space over other formats. • This is done by storing the representation of an image in the first frame of animation, and than having each successive frame hold information on how the vector changes. • The actual codec belongs to Sorenson Media, and the product is called Sorenson Squeeze. • Most other formats stream on a per pixel basis. Each pixel that changes from frame to frame must be sent in the stream.

  6. Progressive Download • Flash Player caches the media as it is downloaded from the destination. This is a very convincing imitation of streaming. Some Limitations are: • It cannot be used for live events, only stored video files. • It is less efficient than true streaming. • It cannot automatically adjust for the end user's connection speed. • It is not secure, the video file is saved on the end user's computer. • The end user cannot jump ahead to a later part of the video until it has downloaded.

  7. Flash Media Server • In Adobe’s own words, “The product is server based software which runs media applications developed for it with the Flash authoring tool.” • Works by opening a "persistent connection" between the server and client. In a normal server/client relationship the client sends periodic requests to the server as required. With a persistent connection the server and client are in constant, controlled contact. • Handles Bandwidth detection, Player detection (flash version), Dynamic buffering, basically everything that usually gives network programmers a headache.

  8. Case Study - YouTube • Developed by Steve Chen, Chad Hurley, and Jawed Karim, while working at PayPal. • Needed a way to post a video online after a party. At that time, there was no easy way to do it.

  9. How is it done? • When a user uploads a video to YouTube, an ‘agent’ processes the upload to produce a .flv (Flash Video File) using Adobe’s Video Encoder. Also, a still image is captured to represent the clip during search results and previews. • A short 10-12 char, randomly generated string serves as the ‘key’ for the media.

  10. How is it done? • Flash Player and Flash Media Server • Player embedded into webpage. • The embed calls a url, which is re-written to hit a script that converts the ‘key’ to the location of the media on the Flash Media Server. A new url is constructed, and the script forwards the original embed call to a Flash Player with the location of the media on the Flash Media Server.

  11. How is it done? • Now that it is correctly referencing the media, the Flash Player and Flash Media Server interact to stream the media. This is true streaming. • Flash provides the classes that handle this interaction for the programmer.

  12. Creating a Player • Demonstration of a Progressive Download Streamer (Hey, Flash Media Server isn’t cheap!) • Short Introduction to the Flash Environment. • Explanation of Code.

More Related