David Hassoun


23 May 2009

Requirements                                                                       Required products                              Sample Files                                                                                                           
Prerequisite knowledge                                                                                                                         live_dvr_pt2.zip (734 KB)
                                                                                              Flash Media Live Encoder                                                                                                                                                                                                         Adobe Animate CC CS4
A basic understanding of how to use video
in Flash CS4 Profesisonal, the FLVPlayback
component, and Flash Media Server 3.5.
User level


Additional Requirements


DVRCast 1.1 application, FLVPlayback 2.5 component


This article provides a simple example of streaming and displaying live DVR-enabled content. You will capture and encode the content with Adobe Flash Media Live Encoder 3, stream the content to the DVRCast application (dvrcast_origin) on Flash Media Interactive Server 3.5, and play the content with the FLVPlayback 2. 5 component.

As I mentioned in Part 1, live DVR is the process of recording or "caching" a live video stream on the server and then enabling viewer access to the live or recorded stream content as it streams. A unique opportunity for this approach is making video-on-demand (VOD) content available quickly following the live event without the time-consuming requirement of sending, encoding, and uploading it. The recorded content can be made available as VOD content.

After reading this article, you should have a basic understanding of implementing the new DVRCast server-side application, streaming and recording content with Flash Media Live Encoder 3, and playing back the live DVR content with the updated FLVPlayback 2.5 component. If you want to use Flash Media Live Encoder for DVR, you must pair it with the DVRCast server-side application. This application is provided by Adobe and used in this article, and you must use Flash Media Live Encoder 3, as previous versions will not work. The same goes for the FLVPlayback 2.5 component; the updated version linked to in this article must be used when pairing with the new DVRCast server-side application.

Note: DVR functionality is not available with Flash Media Streaming Server because of the server-side caching/recording requirements.


DVRCast with FLVPayback 2.5 and Flash Media Live Encoder 3


As a broadcaster, you can enhance your high-quality, live streams with DVR functionality. Flash Media Live Encoder 3 has been updated to support enabling DVR functionality on your live stream. Adobe released the Flash Media Interactive Server application called DVRCast—available for download from Adobe's Flash Media Server Productivity Tools page—to help manage your DVR workflow. To make it easier to develop your client application, the updated FLVPlayback 2.5 component for Flash CS4 Professional and Adobe Flex 3 has been enhanced with new functionality and management capabilities to consume and interact with live DVR-enabled streams.

Building an appropriate and robust solution requires additional encoding and streaming tools, plus the addition of a robust client-side player with server-side script to manage the event, recording, scheduling, and client-side interaction—as well as considerations for multiserver or origin/edge configurations. Along with the updated tools, the addition of the DVRCast server-side application offers a solution that is powerful, extensible, and easy to use out of the box. Flash Media Live Encoder 3 supports server-side recording, both on the start of publishing and after publishing has started, by manually invoking recording from the interface. An important note about using the new server-side recording functionality provided by Flash Media Live Encoder 3 is that it requires the server-side ActionScript (SSAS) provided with the DVRCast application. The source code is available and can be copied or merged in with existing server-side applications to enable Flash Media Live Encoder 3 and the FLVPlayback 2.5 component to work.

The updated FLVPlayback 2.5 component sports a few new properties regarding DVR with Flash Media Server. For simple usage, all you have to do is set the isDVR property to true —which will supersede the isLive property. There are also other parameters for initially snapping to the live point, such as dvrSnapToLive , and properties to allow some more fine-tuned performance or accuracy.

By default, when using the updated FLVPlayback 2.5 component with the DVRCast server-side application, the player will have a dynamic progress bar in relation to the preset or growing size of the recorded content. The FLVPlayback 2.5 component also has the ability to set a fixed, predetermined duration which will be represented in the progress bar in the client application if you desire. If you set a fixed, predetermined duration, it will disable the logic meant to handle the dynamic duration as the content is being recorded for you from the DVRCast application. (Read more about the dvrFixedDuration property in the special ActionScript 3.0 API documentation that accompanies the FLVPlayback 2.5 fl.video package.)

To get the DVRCast server-side application, Flash Media Live Encoder 3, and the updated FLVPlayback 2.5 component, check out the links in the Requirements section of this article.


Walkthrough: DVRCast 1.1, Flash Media Live Encoder 3, FLVPlayback 2.5

In this walkthrough you will:

  • Copy the DVRCast application to the Flash Media Server applications folder
  • Broadcast a live video from Flash Media Live Encoder and record the content to the server
  • Use the FLVPlayback 2.5 component to connect to a live DVR stream (see Figure 1)


  1. Install the dvrcast_origin application into the {Flash Media Server install}/applications/ directory. This is done after extracting the dvrcast_origin application and moving it into the Flash Media Server application directory.
  2. Download and install the FLVPlayback 2.5 component.
  3. Launch Flash CS4 Professional.
  4. Open the file DVR-FLVPlayback.fla in the {start files}/hands-on/DVR-FMLE-FLVPB/start/ directory.
  5. Open the Components panel (Window > Components) and expand the Video category (see Figure 2).


  1. Drag the FLVPlayback 2.5 component onto the Stage, and click it to select it.
  2. Open the Component inspector (Window > Component Inspector) and set the isDVR property to true . Also set the source property to the following (see also Figure 3):


  1. Launch Flash Media Live Encoder 3.
  2. Under the Encoding Options tab, enable video by clicking the Video check box (see Figure 4).


  1. Set the RTMP path to the following (see also Figure 5):


rtmp://{your server}/dvrcast_origin
  1. Click the Connect button.
  2. Check the DVR Auto Record option at the bottom of the Flash Media Live Encoder window (see Figure 6).


  1. Click Start.
  2. Return to Flash and test the application (Control > Test Movie). You should see the live stream that is being recorded from Flash Media Live Encoder playing in the SWF file (see Figure 7).



Where to go from here


The DVRCast application from Adobe paired with Flash Media Live Encoder 3 and the enhanced FLVPlayback 2.5 component provide a powerful trident of tools to deliver powerful live DVR solutions to your audiences quickly. Live DVR can be easy to implement and extend its features and manage using the tools provided.

This article provided only a cursory overview of the full potential of the DVRCast server-side ActionScript application. To learn more, consult the DVRCast documentation on the Flash Media Server Productivity Tools page.