Configuring Encoders and Servers


Fabrikam will run multiple instances of the encoder on each computer. Because only one program can capture from an audio or video capture device at a time, they could install multiple capture cards and then configure each instance of the encoder to source from a different set of capture cards. Instead, they will use a program or plug-in that splits the audio and video streams from a single capture card. An example of stream-splitting software is Osprey SimulStream, which can be used with Osprey video capture cards. By splitting the streams from a single card, Fabrikam can save the cost of additional capture devices and make configuration easier.

Configuration of the multicast system begins with the encoders. As you will remember from testing the server farm, encoder configuration information is required in order to create a multicast information file. This information is added to the multicast file and passed on to Windows Media Player as header information. Without encoder configuration information, the Player cannot receive the stream. If you use unicast streaming, header information will be sent automatically when a client connects to the server, so a custom encoder configuration could be entered moments before the encoder is started. With multicast, on the other hand, the server needs that information up front.

Creating Standard Encoder Configurations

You could grab encoder configuration information automatically from the encoder when you create the multicast information files. If you use the push method of live encoding, you can create and send the multicast information files with the encoder.

However, to make setting up a broadcast easier, the Media department works with the IT department to create a standard set of broadcast encoding templates. By standardizing, new multicast information files do not have to be created for every live event. Standardization also enables the IT department to maintain control of bandwidth usage on the network. For more information about the push and pull methods of encoding, see the Connecting the Encoder and Server sidebar later in this chapter.

To create standardized encoder configurations, the Fabrikam technicians do the following:

  1. Decide on two or three standard bit rates. For example, 56 Kbps and 300 Kbps would be good bit rates for Fabrikam. Remote locations using frame relay can connect to the 56 Kbps stream, and the 300 Kbps stream can be used by local clients with high-speed connections and fast computers. A 300 Kbps stream can be displayed at full-screen in conference rooms and media centers in the factory.

  2. Configure the encoder. You can use the preconfigured templates or create your own custom configurations for each bit rate. After you enter a configuration, start encoding. Check the quality and bit rate. If you plan to do a lot of low-motion video, such as talking head videos, you can increase the quality setting to get sharper images or lower the frame rate to 15 fps because you are less likely to notice a reduced frame rate with low motion. For information about how to configure the encoder, see the test topics in chapter 17 or Windows Media Encoder Help.

  3. Save the configuration. After finding the right balance of quality, frame size, and frame rate for each bit rate, save the configurations as encoder session files with .wme extensions and as encoder stream format files with .asf extensions. For example, if you choose to standardize on 56 Kbps and 300 Kbps, you will create four files: Enc56K.asf, Enc56K.wme, Enc300K.asf, and Enc300K.wme.

  4. Copy the session files to the other encoding computers, and copy the stream format files to a location on the server that will originate the broadcast. After creating the standard configuration files, do not change encoder settings that affect how the audio and video are encoded, or you will not be able to start the publishing point. For information about generating these files, see Windows Media Encoder Help.

    Because each encoder has an identical configuration, the session files created on one encoding computer will work on the other one. The only settings that are different are the computer names and IP addresses. However, these settings can vary because they do not affect the audio and video.

  5. On the server, establish standard publishing points for live multicasts. For example, the Fabrikam staff will create the following multicast publishing points:

    Publishing Point

    Source

    Channel 1

    Rollover56.wsx

    Channel 2

    Rollover300.wsx

Fabrikam will run two instances of the encoder on both computers: one instance will use the Enc56K.wme session file, and the other will use the Enc300K.wme session file. If an encoder or computer fails, the server-side playlist files Rollover56.wsx and Rollover300.wsx will switch to the encoder on the other computer. To add fault tolerance in case of server failure, they can also stream from identical publishing points on one of the other Windows Media servers in the server farm, and then implement server rollover in a client-side playlist.

Setting up a Publishing Point

The Fabrikam technicians follow this procedure to set up a publishing point on one of the Windows Media servers:

  1. Open the Windows Media Services MMC snap-in, and then add the Windows Media server that you want to use for multicast broadcasting.

  2. Open the Add Publishing Point Wizard. You can create publishing points manually using the Advanced method, but the wizard helps configure the multicast automatically.

  3. In the Add Publishing Point Wizard, do the following:

    • Enter Channel 1 as the publishing point name.

    • Select Playlist as the content type.

    • Select Broadcast publishing point.

    • Select Multicast.

    • Choose to create a new playlist and add two media elements: the 56K encoders on both computers, for example, http://LiveEncoder01:9090 and http://LiveEncoder02:9090.

    • Save the playlist for future reference.

    • Select the Loop check box. Each playlist has two entries. With Loop checked, if the stream stops in the current entry, the server will play the other.

    • Launch the wizard to create an .nsc file.

  4. In the Multicast Announcement Wizard, enter the following information:

    • Make a multicast information file (.nsc) and announcement file (.asx).

    • Add the Enc56.asf and Enc300.asf stream format files.

    • Enable logging, and enter the URL of the logging file.

    • Enter locations for the multicast information and announcement files.

    • Check the URL of the multicast information file.

    • Enable archiving, and enter a location and name for the file.

  5. Repeat steps 1 through 4 for the other publishing point. Name the publishing point Channel 2 and add to the playlist the 300K encoders on both computers, http://LiveEncoder01:9091 and http://LiveEncoder02:9091.

    Figure 18.7 shows the playlist on the Channel 1 publishing point.

    click to expand
    Figure 18.7: Configuring the playlist for publishing point “Channel 1.”

Windows Media Services Administrator for the Web will be used to control the broadcast publishing point from the remote-control computer, but it cannot be used to create multicast information (.nsc) files. Therefore, you must use the Windows Media Services MMC snap-in on a computer running Windows Server 2003 to initially configure the multicast publishing point. Once the publishing point has been configured, Windows Media Services Administrator for the Web can be used to start, stop, monitor, and configure other properties of the publishing point. If you want to create multicast publishing points with a remote control computer, it must be running Windows Server 2003.

Preparing the Encoders

The last configuration step for the Fabrikam technicians to do is to prepare the encoders on each computer. These steps are followed to complete the process:

  1. On LiveEncoder01, start Windows Media Encoder, and open the session file Enc56K.wme.

  2. In Session Properties, on the Source tab, change the audio and video sources to the first capture card output.

  3. On the Output tab, select the Pull from encoder check box, and enter the port number 9090. (This port number should match the one entered in the Channel 1 server-side playlist.)

  4. Click Apply.

  5. With the 56K encoder still open, open a second encoder.

  6. Configure the second encoder by first opening Enc300.wme, and then selecting the second capture card output for the audio and video sources, and port 9091 on the Output tab. (This port should match the one used in the Channel 2 server-side playlist.)

  7. Repeat steps 1 through 6 for the second encoding computer, LiveEncoder02. The encoders on both computers should be configured identically.

  8. Start the encoders and the publishing point.

End users will access Channel 1.asx to receive the 56 Kbps stream, or Channel 2.asx to receive the 300 Kbps stream. Because the two stream formats are built into the multicast information files for each publishing point, you can use either session file with either encoder. The playlist for each channel will indicate that the first encoder is playing. End users can connect to the Channel 1 publishing point and stream the content from LiveEncoder01:9090, or they can connect to Channel 2 and stream from LiveEncoder01:9091.

Encoder Rollover

To see how encoder rollover works, you could stop the 56K encoder on LiveEncoder01. Media elements with a smil parent element will play in sequence from first to last. When the encoder stops, the server begins streaming the next element in the list, LiveEncoder02:9090. When it does, Windows Media Player buffers and begins playing the new stream. If you restart the encoder on LiveEncoder01 and stop the encoder on LiveEncoder02, the playlist goes back to the first element in the list. This happens because you have enabled looping.

Keep in mind that, while having the ability to do rollovers can be very useful, if the encoding computers are properly configured and running with adequate CPU and RAM in a controlled environment, there is no more risk of an encoder failing than most other components in the signal path. Also, the computers are capable of encoding more than two streams. You could, for example, create a third stream format and session file for 100 Kbps, and then encode three streams from LiveEncoder01 to a third channel on the server. You could also use LiveEncoder02 to encode an entirely different live program and send it to additional publishing points.

If you do not use encoder rollover, you can source the publishing point directly from the encoding computer. You can ease the setup of encoders and multicast broadcasts by creating standardized session and stream format files and applying the formats to all standardized publishing points.

You can add fault tolerance to the multicast server by mirroring the broadcast publishing points on another Windows Media server in the server farm, and by implementing rollover with a client-side playlist. To create a client-side playlist, you can modify the announcement files and the file names of the multicast information files to add the fail-over server.

The following script shows an example of the Channel 1 announcement file with a rollover added:

<asx version = "3.0">     <entry>         <ref href = "http://WebServer/WMS01Channel 1.nsc"/>         <ref href = "http://WebServer/WMS02Channel 1.nsc"/>     <Title>Channel 1</Title>     <Author></Author>     <Copyright></Copyright>     <Banner></Banner>     </entry>     <Title>Channel 1</Title>     <Author></Author>     <Copyright></Copyright>     <Banner></Banner>     <LogURL href = ""/> </asx> 

The multicast information and announcement files for both servers are hosted on the Fabrikam Web servers. They will need one announcement file for each channel. The technicians rename each multicast information file, adding the name of the server it points to. Then they change the href parameter of the first ref element to point to the primary server information file, and they edit the second ref element to point to the rollover server file. If WMS01 fails during the multicast event, Windows Media Player will attempt to connect to the second server, which is called out in WMS02Channel 1.nsc.

One last option you should consider is broadcast security, which enables you to deny or allow access to the live stream from an Encoder. For more information, see chapter 12.




Microsoft Windows Media Resource Kit
Microsoft Windows Media Resource Kit (Pro-Resource Kit)
ISBN: 0735618070
EAN: 2147483647
Year: 2005
Pages: 258

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net