[StreamWorks Server]

Thinning Streams

Thinning Streams


Your StreamWorks Server's Thinning feature enables the ability to reduce the data rate of streams to meet the bandwidth requirements of StreamWorks Player end-users. By using thinning, you can have a single source (e.g., an on-demand file or a transmission from a StreamWorks Transmitter) that is served at various data rates according to the connection speed of end-users of the StreamWorks Player.
To implement a strategy for stream thinning, complete the following procedures:

Planning Stream Thinning

Before implementing a strategy for thinning your streams, make sure you are familiar with the capabilities and limitations of your StreamWorks Server's Video Thinning and Audio Thinning capabilities. To successfully deliver a stream at various data rates to end-users of the StreamWorks Player, you may have to modify the characteristics of your original (unthinned) audio/video streams; e.g., if you want to serve audio streams to users of 14.4 kilobit/second modems, your stream must contain LBR or audio with a data rate less than 14 kilobits/second (or MPEG2 audio).

Video Thinning

Thinning of video data occurs in two stages (read MPEG Basics for details):

Audio Thinning

Currently, audio thinning is supported only with streams containing MPEG1 or MPEG2 audio data; LBR audio data can not be thinned. Thinning of audio data occurs in two stages:

Creating Thinning Tables

A thinning table is a collection of one or more CONNECTION sections in a PLAY file. In addition to controlling stream delivery as described in Using CONNECTION Sections, CONNECTION sections in thinning tables determine the data rate at which streams are delivered to end-users of the StreamWorks Player.

Required Parameters

A basic CONNECTION section in a thinning table looks like a standard CONNECTION section in a PLAY file; e.g., a basic thinning table for an on-demand file looks like this:
  CONNECTION 9.6
  SOURCE = FILE
  FILE = modemfeed.mpg
CONNECTION 128 SOURCE = FILE FILE = isdnfeed.mpg
In this example, the first CONNECTION section specifies that end-users with a connection speed of at least 9.6 kilobits/second receive the stream "modemfeed.mpg" at a data rate of 9.6 kilobits/second. The second CONNECTION section specifies that end-users with a connection speed of at least 128 kilobits/second receive the stream "isdnfeed.mpg" at a data rate of 128 kilobits/second.

Optional Parameters

When creating a thinning table in a PLAY file, you can include the following parameters:
NOTE: When creating thinning tables, it is usually desirable to specify a TRANSMITRATE slightly lower than the end-user's connection rate--Doing so lowers the risk of stream termination due to loss of network packets.

Thinning Options

The following options can be specified by the VIDEOSCALING and AUDIOSCALING parameters of a thinning table.
NOTE: The following combinations of VIDEOSCALING and AUDIOSCALING options are inappropriate:
MediumScaling + NoScaling
MediumScaling + MediumScaling
MediumScaling + Suppress
Suppress + Suppress

Example Thinning Table in a PLAY File

Here's an example of a PLAY file containing a complete thinning table for a live feed:
  CONNECTION = 9.6
  SOURCE = TRANSMITTER
  PORT = 8000
  TRANSMIT RATE = 9
  AUDIOSCALING = AutoScaling
  VIDEOSCALING = Suppress
CONNECTION = 28.8 SOURCE = TRANSMITTER PORT = 8000 TRANSMIT RATE = 24 AUDIOSCALING = NoThinning VIDEOSCALING = AutoScaling
CONNECTION = 128 SOURCE = TRANSMITTER PORT = 8000 TRANSMIT RATE = 112 AUDIOSCALING = AutoScaling VIDEOSCALING = AutoScaling
CONNECTION = 1000 SOURCE = TRANSMITTER PORT = 8000
In this example:

Preventing Thinning

To insure that a stream is served unthinned, create a basic CONNECTION section in the form:
  CONNECTION {DataRate}
  SOURCE = {MySource}
  ...
For example, to insure unthinned delivery of an on-demand file (grammy.mpg) that has a total data rate of 56 kilobits, your PLAY file looks like this:
  CONNECTION 56
  SOURCE = FILE
  FILE = grammy.mpg
This CONNECTION section insures that the on-demand file is unavailable if a StreamWorks Player's connection speed is less than 56 kilobits/second, so delivered data will not be thinned.

Customizing the Global Thinning Table

Because it is unnecessary to create PLAY files for on-demand files (i.e., the names of on-demand files can be directly referenced in end-users' stream specifications), you can control thinning of on-demand files by customizing your StreamWorks Server's Global Thinning Table.
The Global Thinning Table is a PLAY file ("GlobalThinning.ply") located in the "streams" subdirectory of your streamworks20 directory (unless you have modified the PlayRoot parameter in your StreamWorks Server configuration file, "streamworks.cfg") that controls stream thinning whenever the names of on-demand files are directly referenced in end-users' stream specifications. This file is similar to a standard PLAY file, but it does not contain SOURCE parameters:
  CONNECTION = 9.6
  TRANSMIT RATE = 8
  AUDIOSCALING = AutoScaling
  VIDEOSCALING = AutoScaling
CONNECTION = 14.4 TRANSMIT RATE = 12 AUDIOSCALING = AutoScaling VIDEOSCALING = AutoScaling
CONNECTION = 28.8 TRANSMIT RATE = 24 AUDIOSCALING = AutoScaling VIDEOSCALING = AutoScaling
CONNECTION = 56 TRANSMIT RATE = 52 AUDIOSCALING = AutoScaling VIDEOSCALING = AutoScaling
CONNECTION = 128 TRANSMIT RATE = 112 AUDIOSCALING = AutoScaling VIDEOSCALING = AutoScaling
CONNECTION = 1500 TRANSMIT RATE = 1500 AUDIOSCALING = AutoScaling VIDEOSCALING = AutoScaling