Click Here to Install Silverlight*
United StatesChange|All Microsoft Sites
Windows Media Player 9 Series*
Search Microsoft.com for:
|Windows Media Worldwide

Using enhanced trick mode

Feedback
E-mail us with your comments and feedback about this article.
 
Abstract
To stream high volumes of on-demand video content that is indexed to support trick mode capability, you can use Windows Media Services to improve trick mode functionality for the video portion of encoded files. The Advanced FF/RW feature in Windows Media Services stabilizes your network bandwidth availability and reduces potential server performance bottlenecks, all while delivering a seamless experience to your clients.

 

David Nelson
Microsoft Corporation
September 2007
 

Applies to:
   Microsoft® Windows Media® Services 9 Series or later
   Windows Media Player 9 Series or later
   Windows CE version 5.0 or later
  

Contents


Introduction

If you intend to stream high volumes of on-demand video content that is indexed to support fast-forward, skip, rewind, and pause capability, you can use the Advanced FF/RW feature in Windows Media Services to improve fast-forward and rewind ("trick mode") functionality for the video portion of encoded files. This feature stabilizes network bandwidth availability by smoothing the rate at which data is sent, and reduces potential server performance bottlenecks by reading less presentation data from the source content disk, all while delivering a seamless experience to clients. Copies of the original source content files must be created that support the different fast-forward or rewind speeds requested by clients. Advanced FF/RW is enabled on the Windows Media server through the WMS Advanced FF/RW Format Media Parser plug-in.

Advanced FF/RW was added to Windows Media Services beginning with the Windows Server 2003, Enterprise Edition and Windows Server 2003, Datacenter Edition with Service Pack (SP1) operating systems. It is also included with Windows Media Services when it is installed on the Windows Server 2008 Enterprise and Windows Server 2008 Datacenter operating systems. Support for this feature was added to clients beginning with Windows Media Player 9 Series for Windows XP and Windows CE version 5.0.

Back to the top of this pageBack to Top


How enhanced trick mode works

When clients use standard trick mode to fast-forward or rewind an on-demand video file, the Windows Media server receives a request that includes the following information:
  • A rate request.
  • The presentation time at which the client began fast-forward or rewind.

The server responds by rapidly searching the source content file for all available key frames after the presentation time reported by the client so that it can send the data quickly at the requested rate. The server divides the total presentation time by the rate request value to calculate the correct trick mode speed, and then delivers the content, beginning at the first available key frame after the presentation time reported by the client.

Clients that use standard trick mode to fast-forward or rewind an on-demand video file can create enormous demands for network resources because identical amounts of presentation data must be processed and sent at faster speeds to fulfill the client requests. Servers must process additional presentation data from source content disks, or from storage devices in Storage Area Networks (SANs), at accelerated rates, potentially creating server performance bottlenecks caused by higher disk-read rates.

The key frames that are sent to clients during standard trick mode consume additional bandwidth, especially at high speeds. This can exceed the original bandwidth of the content. If the content has low key-frame distances, more network bandwidth is consumed at high speeds because the server must send more key frames in a specific time period. If the content has high key-frame distances, less network bandwidth is consumed at high speeds because the number of key frames sent in the specific time period is lower. However, the motion viewed in the client may not be smooth while it fast-forwards or rewinds the file.

Advanced FF/RW addresses the performance issues that accompany standard trick mode functionality by smoothing the rate at which data is sent from servers to clients and from back-end network devices to servers. For example, when a client requests that content be rewound at five times normal speed (5x), the server responds by matching the client's rate request value to a compressed copy of the original source file and delivers a version of the original source file that contains only 20 percent of the frames that were originally present (a file created from the original such that for every 5 frames, 4 frames are dropped). It locates the first available key frame after the presentation time reported by the client and begins streaming the file copy to the client after that point. The file copy is compressed so that its reduced file size also reduces the total presentation time by the correct amount.

On the client, data appears to render at the rate requested. However, the client is simply playing back the content stream from the server. Because key frames contain all of the data that is required to reconstruct the video image in the client, without reference to previous frames, the fast-forward or rewind presentation in the client remains smooth, alleviating spikes in network bandwidth. When the server delivers this file to the client in place of the original source file, it reads the presentation data without incurring a high disk-read rate from the source content disk.

After the client's Advanced FF/RW request is complete, the server seamlessly switches back the original source content file and resumes playback at normal speed.

Note
  • When a user clicks the Fast Forward or Rewind button in Windows Media Player, the implementation of Advanced FF/RW appears to be seamless: the file plays faster in the desired direction. Users may experience a slight readjustment of the video displayed as the Player locates the nearest key frame when the file is played. During Advanced FF/RW, no sound is played, although any sound data that remains in the client cache is played until it is exhausted.

Back to the top of this pageBack to Top


Encoding trick mode speed files

To use Advanced FF/RW, you must create compressed copies of the original source content files (sometimes called "trick mode speed files") for the different fast-forward or rewind speed values that may be requested by clients.

By default, when a user clicks the Fast Forward or Rewind button in Windows Media Player, the file plays in the desired direction at five times normal speed. Rate requests up to ten times normal speed can be sent by Windows Media Player if the user adjusts the slider in the Play Speed Settings Enhancements pane. Windows CE supports even higher rate requests.

If a client makes a rate request for which you have not encoded a corresponding trick mode speed file, the server fulfills the request by using standard trick mode instead. In typical video-on-demand scenarios, clients can be restricted to request trick mode functionality at predetermined speeds to use Advanced FF/RW.

Trick mode speed files are identical to the original content source file, except that excess frames are removed during encoding. For example, for clients that might request fast-forward at five times normal speed, a corresponding trick mode speed file is created by retaining every fifth frame as a key frame during the encoding process, while the rest of the frames are removed. By using only key frames in trick mode speed files, the fast-forward presentation in the client is smoother. Also, by using only 20 percent of the original frames in the trick mode speed file, the file size is reduced by approximately 80 percent, reducing the presentation time. When you play the trick mode speed file using Windows Media Player, it will appear as if the original file is being played five times faster.

Video editing tools such as Adobe Premiere Pro from Adobe Systems Incorporated should be used to create trick mode speed files. After creating a project with the appropriate settings (such as video size, frame rate, and so on), the source content file can be dropped onto a time line and the appropriate speed value applied to match a rate request. For example, you can use the following settings on the Speed/Duration tab in Adobe Premiere.

Set speed toFor a client rate request of
100%
Normal speed
500%
Five times normal speed
1000%
Ten times normal speed
10000%
One hundred times normal speed (Windows CE)

The file can then be exported as an Audio-Video Interleaved (AVI), which is then encoded to the corresponding normal and trick mode speed files in Windows Media Video (WMV) format.

For best results, make sure to observe the following guidelines while creating trick mode speed files:
  • Use AVI files for your original source content.
  • If your encoding software includes an option to import or include an encoding system profile in the encoding process, you can save time by using an encoding profile to encode trick mode speed files for various speeds.
  • Encode a normal speed content file to WMV format using the encoding profile of your choice. Set the key frame distance to an appropriate value for smooth playback on the client.
  • Use the same encoding profile settings (audio/video bit rate, stream numbers, and buffers, video size and pixel aspect ratio, interlace/progressive mode, frame rate, packet size, and encoding buffer) and codecs to encode all your trick mode speed files to WMV format. Unpredictable behavior may result if you change the settings. For example, the server may not be able to stream the files to the client or the client experience may vary when switching between the normal speed file and a trick mode speed file. However, you should set the key frame distance to zero. This setting allows the Windows Media server to send all frames as key frames, resulting in smooth playback on the client during fast-forward or rewind. Note, however, that the quality of a file is reduced when more key frames are used.
  • Name your files so that it is easy to differentiate the normal speed file and trick mode speed files.

Normal and trick mode speed files created for Advanced FF/RW must be placed in a location that is accessible to the client. Clients are directed to trick mode speed files through either a fully qualified or relative URL contained in a tmi element in a client-side playlist (.asx). For more information, see Implementing enhanced trick mode.

Back to the top of this pageBack to Top


Implementing enhanced trick mode

After you create the normal speed file and trick mode speed files, the files must be placed in a location accessible by the client. The Windows Media server provides the client with the information it needs to connect to the server and receive the content by using an announcement file (a Windows Media metafile with an .asx file name extension). The announcement contains a reference to a .tmi file that contains the URLs of the normal speed file and trick mode speed files.

The following is an example of a basic announcement file that contains a reference to a .tmi file (mycontent.tmi):

<asx version = "3.0">
<entry>
<ref href = "mms://wmserver/mycontent.tmi"/>
</entry>
</asx>
A .tmi file resides on the server and provides the server with the locations of the normal speed file and trick mode speed files so that the server can stream the files to the client upon request. A .tmi file is based on the Extensible Markup Language (XML).

The following example shows the elements in a .tmi file:

<?tmi version="1.0"?>
<tmi>
<media src="file://C:\wmpub\WMRoot\myFile_1x.wmv" rate="1"/>
<media src="file://C:\wmpub\WMRoot\myFile_5x.wmv" rate="5"/>
</tmi>
A .tmi file contains the following elements:
  • tmi
  • media, nested inside the tmi element

Each tmi element can include up to 10 media elements, which correspond to the normal speed and trick mode speed files.

The media element includes two attributes:
  • src, the location of the normal speed file and trick mode speed files
  • rate, the speed at which the normal speed file and trick mode speed files are played

The src attribute specifies the location of the normal speed and trick mode speed files. The location value can be a fully qualified URL or a relative URL. If relative, it will be resolved to a fully qualified URL by using the location of the .tmi file on the server as the base URL. The rate attribute specifies the speed factor for the file referenced in the src attribute.

If more than one trick mode speed file is referenced, you can add another media element to the tmi element. For example, if you want to add a trick mode speed file that plays 10 times faster than a normal speed file, add the following media element to the .tmi file:

<media src="file://C:\wmpub\WMRoot\myfile_10x.wmv" rate="10"/>
You can create or edit a .tmi file by using a text editor, such as Notepad, or an XML editing program.

Notes
  • If the src attribute does not reference a file with a .wmv file name extension, a "file not found" error is displayed in the client.
  • If a client makes a rate request for which you have not created a corresponding entry in the .tmi file, the server fulfills the request using standard trick mode instead.
  • Trick mode speeds specified in announcement files must be whole numbers (integers). Trick mode speeds up to 10-times normal speed are supported by Windows Media Player. Trick mode speeds are not restricted by Windows CE.

Back to the top of this pageBack to Top


WMS Advanced FF/RW Format Media Parser

Media parser plug-ins in Windows Media Services enable you to stream specific types of digital media content. By enabling or disabling the media parser plug-ins, you can control the ability of the Windows Media server to stream content.

The WMS Advanced FF/RW Format Media Parser plug-in allows Windows Media Services to stream "trick mode" Windows Media files. It is enabled by default.

To enable the WMS Advanced FF/RW Format Media Parser plug-in
  1. Click the server for which you want to enable a plug-in.
  2. In the details pane, click the Properties tab.
  3. In Category, click Media parser. If the Media parser category is not displayed on the Properties tab, click the Show all plug-in categories check box.
  4. In Plug-in, click WMS Advanced FF/RW Format Media Parser, and then click Enable.

Back to the top of this pageBack to Top



© 2008 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy Statement
Microsoft