Windows Media Encoder banner art

Using the remote administration sample with Windows Media Encoder 7

You can use the Microsoft Windows Media Encoder Software Development Kit (SDK) to develop applications that remotely administer and control one or more encoders over a local area network (LAN) or the Internet. For example, a radio station with multiple geographically dispersed encoding computers could administer all the encoder feeds from one central location, or a content production facility could control a set of encoding workstations 24 hours a day, 7 days a week with a central control system.

The following diagram shows how you might control Windows Media Encoder remotely over a LAN.

Control of the encoder over a LAN

Controlling Windows Media Encoder over a LAN

The remote administration sample uses Active Server Pages (ASP) to demonstrate how you can use the Windows Media Encoder SDK to remotely control and administer Windows Media Encoder. The following diagram shows a typical configuration in which ASP pages are used to administer the encoder remotely.

Control of the encoder over the Internet

Using Active Server Pages to control Windows Media Encoder over the Internet

The remote administration sample is provided so you can modify, customize, and use it in your own applications and production facilities. Some of the features in the sample include:

This document contains the following sections:

For more information about the remote administration sample, see the Windows Media Encoder SDK documentation.

Setting up the remote administration sample

Use the following steps to set up the remote administration sample:

  1. Install Windows Media Encoder on the remote computer. When you install the encoder, the remote administration sample files are copied into the \Program Files\Windows Media Components\Encoder\RemAdmin directory.

  2. Copy the remote administration sample files from \Program Files\Windows Media Components\Encoder\RemAdmin to a directory under \Wwwroot on your remote computer, or create a virtual directory that points to the default installation path.

  3. Install Microsoft Internet Information Services (IIS) on the remote computer or on a computer that is connected to the remote computer. For more information about setting up IIS, see Windows Media Encoder Help.

  4. Configure the distributed Component Object Model (DCOM) on the remote computer. For more information about configuring DCOM, see Windows Media Encoder Help.

    Note   The remote administration application does not function if DCOM is not configured properly.

Understanding the remote administration sample pages

The remote administration sample contains numerous .asp pages, which can be viewed from any computer with a browser connected to the network. This section describes each of the .asp pages. You can modify any of these pages to suit your needs.

Machine.htm. The starting page for the remote administration application is used to collect the IP address or name of the computer to be administered remotely. Machine.htm calls Transit.asp, which creates two session variables. One variable stores the name of the computer to be administered remotely (MchNameSess). The second variable stores a pointer to the object WmEncLoc (AgentLocSess). WmEncLoc is the interface used to control the encoder through DCOM.

RemoteControl.htm. This page is where most of the user interaction takes place. RemoteControl.htm has three frames. The left frame is the navigation frame. The right frame is a container for other pages described in this section. The third frame is a hidden frame that contains RemoteRefresh.asp. RemoteRefresh.asp is responsible for starting and stopping the encoder, stopping the archiving process, changing the archive path, and activating a particular source group. RemoteRefresh.asp also automatically refreshes your screen every 30 seconds to update the encoding statistics.

RemoteAdminMain.asp. This page is contained within the right frame of RemoteControl.htm and is where you create a new instance of the encoder, call an existing instance of the encoder, and display the encoder user interface. RemoteAdmin.asp is a companion page for RemoteAdminMain.asp, and uses the session variables created in Transit.asp to start the encoder on the remote computer. It also collects the statistics, source groups, and archive state of your encoder.

NewEncoderMain.asp and CrtNewEncoder.asp. These pages are contained within the right frame of RemoteControl.htm and enable you to create an instance of the encoder remotely. NewEncoderMain.asp works with NewEncoder.asp to collect the data needed for creating an instance of the encoder, such as the source file or device, profile, and output settings (broadcast, archive, or file). CrtNewEncoder.asp creates the instance of the encoder by using the data collected from NewEncoder.asp, and redirects the user to the RemoteControl.htm page.

DestroyEncoder.asp. This page is called by RemoteControl.htm to remove an instance of the encoder. If an encoder is idle for 15 minutes after the browser has been closed and then reopened, IIS Caching removes the encoder instance from the remote computer.

LoadEncoder.asp. This page is used to search for a Windows Media Encoder configuration file with a .wme extension on the encoding computer.

NewSrc.asp. This page is used to add a source group to an encoding configuration.

NewLoadEncoderMain.asp and NewLoadEncoder.htm. These pages work together to collect from the user an encoder name and the name of the Windows Media Encoder configuration file with a .wme extension that is to be loaded into the specified encoder.

Using the remote administration sample

Any selections you make when setting up a session remotely, including source files, devices, profiles, or output files, will be from the items available on the remote computer, not the computer you are currently using. For example, if your current computer has a custom profile called Myprofile.prx and you want to use that profile in the session you are setting up remotely, you must ensure that Myprofile.prx is installed on the remote computer or it will not be available for the session.

When configuring a session by using the remote administration sample, you must provide a name for the encoder, set up at least one source, select a profile, and specify the output destination. For more information about configuring an encoding session, see Windows Media Encoder Help.

To start the remote administration application

  1. Start your browser.

  2. Type the URL that points to the virtual directory where the files are installed. Include Machine.htm in the path, for example:
    http://machinename/machine.htm

  3. When Machine.htm is displayed, type the name or IP address of the remote computer, and then click OK.

  4. Proceed through the sample to set up your encoding session.

© 2000 Microsoft Corporation. All rights reserved.