کد:
http://learn.iis.net/page.aspx/620/live-smooth-streaming-for-iis-70---getting-started/
IS Live Smooth Streaming is an extension for Internet Information Services (IIS) 7 that delivers compelling, uninterrupted live video streams that instantly adjust quality (bit rate) to match changing network and CPU conditions at the client. Live Smooth Streaming enables adaptive streaming of live events to Smooth Streaming-compatible clients, such as Microsoft Silverlight. Using HTTP to deliver live events takes advantage of the scale of existing HTTP networks by keeping content close to the user and making true HD (720p+) a realistic option for Web broadcasts. The additional advantage of using HTTP-based delivery for live events is that the existing HTTP infrastructure also provides much more availability for live events.
For many popular live Web broadcasts, content providers and content distribution networks (CDNs) are concerned with how much capacity they can dedicate on their resource-constrained streaming networks. By using their primary HTTP networks, which are typically 10-to-20-times larger than their streaming networks, they can take advantage of their primary network and not worry about maximizing network capacity and limiting the number of users for live events.
IIS Live Smooth Streaming allows you to set up a Web server as a Live Smooth Streaming server that sources content pushed from Live Smooth Streaming encoders for delivery to a Smooth-Streaming compatible clients. Because Microsoft Expression Encoder currently does not contain a profile for encoding media to the Live Smooth Streaming presentation format, this walkthrough describes how to use a Push Encoder Simulator that sources from on-demand Smooth Streaming presentation files and simulates the output that is required by Live Smooth Streaming servers. The Encoder Simulator is suitable for use in test environments until a Live Smooth Streaming profile for Expression Encoder is available.
There are also many third-party encoding solutions available to you for encoding on-demand and live Smooth Streaming video in production environments. To help you determine which encoding solution is best-suited for your Smooth Streaming configuration, see the list of our encoding partners on the Smooth Streaming Showcase.
This document contains the following sections:

  • Installing IIS Live Smooth Streaming
  • Deploying IIS Live Smooth Streaming Sample Files
  • Configuring the IIS Live Streaming Server
  • Pushing a Stream to the Live Smooth Streaming Publishing Point
  • Delivering the Live Stream to the Client

Installing IIS Live Smooth Streaming

The following prerequisites must be fulfilled to install IIS Live Smooth Streaming:

  • You must use IIS 7 running on one of the following operating systems:
    • Windows Server 2008
    • Windows Server 2008 R2
    • Windows Vista with SP1
    • Windows 7

  • To manage IIS Live Smooth Streaming using the IIS Manager user interface, the IIS Management Console for IIS must be installed.

The following options are available for installing IIS Live Smooth Streaming:

  • Web Platform Installer 2.0
  • Windows Installer files (for 32-bit and 64-bit versions of the selected operating system)

The "Installation Notes" section of the Live Smooth Streaming Readme contains detailed instructions for each of these installation options.
Deploying IIS Live Smooth Streaming Sample Files

The adaptive streaming platform for IIS 7 is still under development, and as such, sample content and files are required to demonstrate the end-to-end Live Smooth Streaming experience. This sample content includes:

  • Smooth Streaming video files (files with .ismv file name extensions).
  • An encoder that sources from the .ismv video files to generate simulated Live Smooth Streaming output for testing purposes.
  • A sample Silverlight client that progressively downloads and plays the live stream from the Web server with IIS Live Smooth Streaming installed.

To install the Smooth Streaming video source files

  1. Download and then run Big_Buck_Bunny_Sample-IIS_Smooth_Streaming_Beta.exe, the executable file that contains the sample content.
  2. When you are prompted to extract files to an installation directory, enter a directory path. This article describes a Live Smooth Streaming Web server with the sample content extracted to %SystemDrive%\inetpub\wwwroot\LiveSmooth. For example:


    If you want to extract the files to a different Web site or virtual directory, enter its physical path (for example, %SystemDrive%\inetpub\wwwroot\MySite\LiveSmooth). Substitute your chosen Web site or virtual directory path appropriately for the rest of the procedures in this article.

Note You can create your own Smooth Streaming video (.ismv) files by purchasing a copy of Microsoft Expression Encoder 3. For more information, see the "Creating and Publishing Your Own Content" section in Smooth Streaming for IIS 7.0 – Getting Started.
To deploy the Encoder Simulator and IIS Smooth Streaming Player Development Kit

  1. Download and then run IIS_Smooth_Streaming_Player_Development_Kit_1.0_Be ta_2.exe, the executable file that contains the encoder and sample client.
  2. When you are prompted to extract files to an installation directory, enter the same directory path that you used for the Smooth Streaming video source files (above). For example:


    Again, if you want to extract the files to a different Web site or virtual directory, enter its physical path (for example, %SystemDrive%\inetpub\wwwroot\MySite\LiveSmooth) and substitute your chosen Web site or virtual directory path appropriately for the rest of the procedures in this article.

Configuring the IIS Live Streaming Server

After you install IIS Live Smooth Streaming, verify that the extension is installed correctly. To do this, select a Web Site or virtual directory in IIS Manager. On the Home page, the Live Smooth Streaming Publishing Points feature should be displayed in the Media Services area.
Note If IIS Manager was running while you installed IIS Live Smooth Streaming, close and restart it to see Live Smooth Streaming Publishing Points.
Adding a Live Smooth Streaming Publishing Point

This section describes how to create a publishing point that accepts the simulated live stream pushed to it from the encoder that you installed earlier.

  1. If you have not done so already, double-click the Live Smooth Streaming Publishing Points icon to open the feature page.
  2. In the Actions pane, click Add.
  3. In the Add Publishing Point dialog box, in File name, enter a name for the Live Smooth Streaming publishing point definition file. In this example, and throughout the rest of this article, we use the file name LiveSmoothStream. If you specify a different file name, be sure to substitute it appropriately as you follow the steps in this article.
  4. In Estimated duration, you can enter the duration (in hours:minutes:seconds) of the live stream (if known) so that the sample Silverlight client can scale its Seek bar to the length of the content.
  5. Note that in Live source type, the Push option is displayed.


    Because the intent of this article is to demonstrate a live stream that is pushed to this publishing point, no further configuration is necessary and you can click OK to close the dialog box.

    To learn more about the additional options that you can configure in the dialog box, click in the upper-right corner to open IIS Media Services Help.
  6. Our newly created Live Smooth Publishing Point file named LiveSmoothStream.isml is added to the Web site root.


    Select the publishing point, and then in the Actions pane, click Start Publishing Point.

The publishing point is now ready to accept a live stream pushed to it from a Live Smooth Streaming encoder. See the next section, which describes how to configure the Encoder Simulator that accomplishes this task.
Pushing a Stream to the Live Smooth Streaming Publishing Point

This section describes how to configure the Encoder Simulator to convert a Smooth Streaming video (.ismv) file to a simulated Live Smooth Streaming output that can be pushed to the Live Smooth Streaming publishing point that you configured in the previous section.

  1. Open a Command Prompt and navigate to the directory where you installed the encoder and sample client files. In this example, navigate to C:\inetpub\wwwroot\LiveSmooth.
  2. Type a command to begin encoding simulated Live Smooth Streaming output from the sample Smooth Streaming video (.ismv) files that you downloaded earlier.

    The general syntax to use for pushencoder for this push scenario is:

    pushencoder <url-of-publishingpoint> <ism-file>
    Where <url-of-publishingpoint> is the fully qualified URL of the publishing point .isml file on the Web server and <ism-file> is the relative URL of the manifest for the sample Smooth Streaming video that describes its available bit rates.

    For our configuration, we type the following:

    pushencoder http://server_name/LiveSmooth/LiveSmoothStream.isml "Big Buck Bunny.ism"

    where server_name is the name of the Live Smooth Streaming server. Note that because the manifest file (.ism) name contains spaces, we wrap the <ism-file> in quotation marks.
  3. As the encoder pushes the available bit rates to the Live Smooth Streaming publishing point, you can observe the push activity in the Command Prompt window.

Delivering the Live Stream to the Client

Now we are nearly ready to view the simulated live Smooth Stream, using the Silverlight browser plug-in for Live Smooth Streaming. The Silverlight browser plug-in allows you to see Smooth Streaming in action. If the Internet bandwidth and video rendering capability on your playback device are sufficiently high, you are about to experience high-definition (HD) video playback of the sample content. You will also be able to simulate end user experiences under varying conditions by simulating drops and recoveries in bandwidth. If your actual bandwidth is below 3 megabits per second (Mbps), or your playback device is video-challenged, then you will experience the adaptive nature of Live Smooth Streaming without needing to simulate a bandwidth cap.

Before proceeding, be sure that the latest version of Microsoft Silverlight is installed on the client computer that you want to use to observe Live Smooth Streaming in action.

  1. Update the sample Silverlight Project Test Page on the Web server.

    Before the Live Smooth Streaming output from the publishing point can be viewed, the sample Silverlight Project Test Page that we installed with the encoder must be updated so that the client can reference the live streaming output. (This file is located at %SystemDrive%\inetpub\wwwroot\LiveSmooth\default.html in our implementation.)

    In a text editor, such as Notepad, open the file and update the mediaSource attribute value with the fully qualified URL of the Live Smooth Streaming publishing point definition file:

    mediaSource="<url-of-publishingpoint>/Manifest"

    For example: mediaSource="http://Server_Name/LiveSmooth/LiveSmoothStream.isml/Manifest"
  2. In a Web browser on the client computer, you can download the test page from the Web server and begin viewing the stream. In the Web browser address bar, type http://Server_Name/LiveSmooth/default.html, substituting the Web server name for Server_Name.

    The Live Smooth Stream opens in the Web browser, using the Silverlight browser plug-in for Live Smooth Streaming:


    For more information about the controls that you can use to vary the available bandwidth and exercise the adaptive nature of Live Smooth Streaming, see the "User Interface Key" section on the Experience Smooth Streaming Web page.

Note By the time you reach this point in this walkthrough article, the simulated live stream may have ended because the sample Smooth Streaming video (.ismv) source is only 10-minutes long. If you don't see any video, push the video to the publishing point using the pushencoder command again, and then refresh the Web browser on the client computer




موضوعات مشابه: