|
CSE Home |
About Us |
Search |
Contact Info |
Overview:
An encoded Windows Media stream may optionally contain arbitrary embedded data called script commands. A primary purpose of script commands is to enable the construction of interfaces (mainly in the context of a web browser) using Windows Media streams which may synchronize other media with the streams in various interesting ways. Script commands may be embedded in the live Windows Media stream by sending them directly to the running encoder. Script commands and associated markers may also be added to archived stream files (WMV files) by formatting script command data in a particular way, then importing the data into the WMV file using one of a variety of tools such as the Windows Media Indexer. The purpose of the Script Command Client and Server tools is to permit easy, flexible and fail-safe collection of script command data, and optionally, transmission of that data to a running live encoder. The post-production tools are designed to automate the process of preparing the collected data for integration into a stored stream file. The image preparation tool simply exports JPEG images from a PowerPoint presentation using user-defined dimensions. The tools specifically target a situation where script commands are of type "URL" and represent slides in a PowerPoint presentation, but they could be extended to cover other requirements.
The data collection is accomplished with one or more Script Command Clients and one Script Command Server. The clients are intended to run on systems on which lecturers, presenters, or assistants will run Powerpoint presentations. The server (if used) should run on the system with the Windows Media Encoder. After the client opens a PowerPoint presentation, it detects slide transitions as the instructor moves along. These transitions and timing information can be saved to a local log file for later use, and optionally transmitted to the server for inclusion in a live stream. When the server launches, it listens for clients and attempts to connect to a running Windows Media Encoder on the local machine. It monitors the status of client and encoder connections, writes a local log file, and passes script commands received from clients on to the encoder. The server can handle multiple simultaneous client connections. Multiple clients can be run on one machine, or different presenter machines can send script commands to the same server.
Download
Runtime
Download
Source
Server Configuration
1. Install the Script Command Server on the target system. The system should also have the Windows Media Encoder installed. If you have VB6 on the system or if you have already run another VB6 setup program, you may not need to run the Script Command Server setup program, but if in doubt, do it anyway. Otherwise, just run the executable ScriptServer_20.exe. Note: The setup program for the server will install the latest version. However, if you are running an encoder older than version 7, you should use Script Command Server v.1.0. The 1.0 executable is included in the distribution, and can be invoked directly after the setup is complete.
2. Compose and save a WME (encoder settings) file using the Windows Media Encoder. The Script Server will ask for this when it launches, so you should have one ready to go. Note that the earlier version of the Script server (1.0) did not ask for the encoder settings file, but rather, it just detected a running encoder after it launched.
3. Run the Script Command server. Supply your WME file. The encoder should launch, and the main Script Server window should appear. On the Script Server window, click configure, and set the port number upon which to listen. The server and client are designed to use a port number between 1000 and 32767. If in doubt about the choice of a port number, run 'netstat -a' to see which ports are in use by currently running processes. Click OK, then quit and restart the Script Command server to begin listening on your preferred port.
4. In the server configuration dialog, select "override base URL specified by client" if desired. When the client detects a slide transition, for example to slide number 3, it will build a URL using the base URL in the client configuration, followed by "slide3.jpg". If the override option is selected, the server will strip all but the last element, "slide3.jpg", and replace it with the Base URL specified before logging and sending the script command to the encoder.
5. The server automatically appends to a log file called ScriptCommandServer.log in the location specified. If the option to record a separate timings file is selected, an additional file at the same path will be created for each invocation of the server. This timings file will be formatted more appropriately for use in postproduction. The timings file name will begin with "TIMING_LOG"
Client Configuration
1. Install the Script Command Client on the target system if necessary. Otherwise, just run the executable ScriptClient.exe
2. Run the client, and click configure. If the client is to be used in conjunction with a server, select "Connect to Script Command Server, enter the name or address of the server system, and the port number you set in the server configuration. If the client is to be run stand-alone, don't check the connect box. In this case, it will still record a local log file with timings of PowerPoint slide transitions.
3. The Base URL should be the location at which the exported jpeg images of the slides will be available. This string will be prepended to a file name for each slide, composed as "slideN.jpg", where N is the slide number. As mentioned above, the base URL can be overridden on the server.
4. The client records a log file for every PowerPoint file opened. These files will be stored at the location specified, and have names beginning with "TIMING_LOG".
Slide Image Preparation
Before a presentation or lecture, we need to store the images of the PowerPoint slides on a web server in JPEG format. Different versions of PowerPoint can export slides to JPEG images in a variety of ways, but PowerPoint 2000 does not include an export function that permits the specification of image dimensions. The PowerPoint JPEG Exporter tool is designed to fill this gap. This is a simple Visual Basic program. As with the other VB programs in the distributions, you may need to run the setup program before first use. The output of the program is a new directory containing image files named "slideN.jpg" where N is a slide number. The directory will be placed in the same directory with the PowerPoint file, and its name will be composed beginning with "PPT_IMAGES". Next, this directory is uploaded to a web server, and the URL of the directory is our Base URL for the Script Command Client or Server configuration. This tool has been tested with PowerPoint 2000, but not with other versions of PowerPoint.
Client and Server Operation
On the server system, run the server and the encoder with your preferred stream format. Note that you must use a stream format that permits the use of script commands. You should see an indication that the encoder is running on the server's main dialog. When you begin encoding, the Script Command Server should notice that, and report it in the Encoder State on its main dialog. The server can only send script commands to an encoder that is encoding, and has script commands enabled.
On the client system, run the Script Command Client, and note the text at the top of its main dialog. If you have configured the client to connect to a server, the text should read either "trying to connect" or "connected". If the server is running and it is not connected, double check your server address and port number.
Click Open PowerPoint File. Navigate to your presentation and click open. Note that the client's main dialog reports that the file was opened. The client will now watch this document object for slide transitions made in Slide Show mode. When the presentation is not in Slide Show mode, no transitions will be recorded or transmitted. If the presentation is closed or PowerPoint is quit altogether, the client will notice these events as well. To begin the presentation, go to Slide Show mode. The client should now begin sending script commands to the server, and if the encoder is running and encoding, the server should send them to the encoder. If the client is terminated, it will also close the PowerPoint document it opened. Only one Powerpoint document can be opened by a client, but multiple clients can be run on one system. If you want to collect slide transitions, but don't have a live encoder to feed, you can run the client stand-alone.
The client and server are designed to tolerate a variety of operational problems and scenarios. If the connection between the server and the client fails, you can still log data on the client for later use. If the connection later comes back up, server and client will automatically reconnect and resume. You can launch things in any order you choose -- when the server starts it will listen for clients and try to connect to an encoder. When the client starts, it will automatically begin trying to connect to a server.
Post-Production
Once the timing data has been collected and the WMV file has been encoded, there is a little bit of postproduction work necessary before the file is published to a streaming server. The post-production tools in this package consist of a Perl script and a Visual Basic program. The Perl script is designed to build a file of script commands and markers appropriate for importing into a stream file using a tool such as the Windows Media Indexer. One of the inputs the Perl script can use is a list of slide titles. The VB program is designed to automate the process of building this list. Before you use the two programs you may need to do a little configuration. The VB program comes with a setup program. Again, if you already have VB6 installed on your system, you can just run the executable GetTitles.exe. The Perl script of course requires that you install Perl on your system. Perl is available free of charge for major platforms from http://www.perl.com.
Building the Slide Titles List
Once GetTitles is installed, simply run it, select your PowerPoint file when prompted, and wait a few moments for it to complete. The result will be a new text file in the same directory with the PowerPoint file which contains a list of slide titles. The file name begins with "TITLES" and includes a date and timestamp. Titles are not mandatory for PowerPoint slides. If the tools finds a slide without a title, it will try to infer what may appear in the slide as a title by finding the uppermost shape on the slide that contains text. This does not always lead to a desired result. If the tool can't locate any reasonable candidate for a title, it will print "NO TITLE" in lieu of a real title. It's always best to scan over the results before proceeding.
Running the Perl Script
The Perl script is called scrconv.pl. The usage for it looks like:
perl scrconv.pl -timings ScriptTimingsFile [-titles SlideTitlesList] [-offset offset]The script builds a file of script commands and markers appropriate for importing into a Windows Media Video file with a tool such as the Windows Media Indexer. It uses a timings file such as those produced by either the Script Command Client or Server. Lines in this timings file are formatted as:
Type = URL; Command = http://url/of/slide.jpg; Time = hh:mm:ssThe SlideTitlesList is a list such as the one produced by the GetTitles program. The titles are used by the script to make user friendly marker names. The offset, if used should be a positive or negative number. It will be interpreted as a number of seconds to be added to each time in the timings file. This is useful to synchronize the slide transitions with a stream file which may begin before or after "time zero" of the ScriptTimingsFile. The script filters out script commands which represent a slide which didn't persist for at least some minimum number of seconds. This is defined by the threshold variable near the top of the script. Output is printed on standard out. The script was developed and tested with Win32 Perl 5, but it should be easily portable to other platforms.
|
Department of Computer Science & Engineering University of Washington Box 352350 Seattle, WA 98195-2350 (206) 543-1695 voice, (206) 543-2969 FAX [comments to Email the page owner] | |