[StreamWorks Server]

Creating PLAY Files

Creating PLAY Files


PLAY files provide a flexible mechanism for controlling stream access, e.g., you can provide access to any number of streams using a single PLAY file logic, and you can embed thinning tables within your PLAY files (read Thinning Streams for details). Following are examples of how you can use PLAY files to control stream access:

Using SCHEDULE Sections

When the StreamWorks Player sends to your StreamWorks Server a stream request, the StreamWorks Server notes the current date and time. By using SCHEDULE sections, you can control stream delivery based on the current date and time. Following are two examples of how you might use SCHEDULE sections.

Scheduling Coverage of a Live Event

If you are planning to cover an event by serving a Live Feed originating at a StreamWorks Transmitter, SCHEDULE sections provide a convenient mechanism for controlling stream availability before, during, and after the event, e.g.:
To implement this strategy when covering a one-hour event starting on July 4, 1996 at 7:30pm, your PLAY file might look like this:
  SCHEDULE TO 07:04:96 19:29
  SOURCE = FILE
  FILE = event_promo.mpg
SCHEDULE FROM 07:04:96 19:30 TO 07:04:96 20:30 SOURCE = TRANSMITTER PORT = 8002
SCHEDULE FROM 07:04:96 20:31 SOURCE = FILE FILE = recorded_event.mpg
In this example, the first SCHEDULE section causes all end-user stream requests received through July 4 1996 at 7:29p to result in delivery of the "event_promo.mpg" file. The second SCHEDULE section causes all end-user stream requests received between 7:30p and 8:30p to result in delivery of the Live Feed. The third SCHEDULE section causes all end-user stream requests received after July 4 1996 at 8:30p to result in delivery of the "recorded_event.mpg" file.

Creating a Virtual Broadcast Schedule

If you want to serve a number of audio/video files as a series of scheduled programs (i.e., similar to a broadcast television schedule), you can use SCHEDULE sections to control stream availability; e.g.:
  SCHEDULE FROM 07:04:96 00:00 TO 07:04:96 00:05
  SOURCE = LIVEFILE
  FILE = sign-on.mpa
SCHEDULE FROM 07:04:96 00:05 TO 07:04:96 06:00 SOURCE = FILE FILE = news_briefs.mpg
SCHEDULE FROM 07:04:96 06:00 TO 07:04:96 17:30 SOURCE = LIVEFILE FILE = early_show.mpg
In this example, the first SCHEDULE section causes all end-user stream requests received between 12:00a and 12:05a to result in delivery of the Live File "sign-on.mpa". The second SCHEDULE section causes all end-user stream requests received between 12:05a and 6:00a to result in delivery of the On-Demand File "news_briefs.mpg". The third SCHEDULE section causes all end-user stream requests received between 6:00a and 5:30p to result in delivery of the Live File "highlights.mpg". Because no stream is scheduled between 5:30p and 12:00a, end-user who request the stream during this period receive a warning: "Stream Not Scheduled at This Time". NOTE: The "Live File" source used in this example requires the Live File Add-On.
NOTE: Currently, your StreamWorks Server does not have the ability to serve a series of streams to an end-user; i.e., when an end-user requests a scheduled stream, they receive the stream in its entirety, and stream transmission then terminates. If the end-user receives a live file, transmission terminates only when all end-users close the stream.

Using CONNECTION Sections

When the StreamWorks Player sends to your StreamWorks Server a stream request, the request includes data indicating the StreamWorks Player's network connection speed. By using CONNECTION sections, you can control stream delivery based on the StreamWorks Player's connection speed. Following are two examples of how you might use CONNECTION sections
NOTE regarding stream data rate: CONNECTION sections in PLAY files directly affect the amount of data delivered to end-users; read Thinning Streams for details.

Optimizing StreamWorks Player Performance

Using the CONNECTION method, you can optimize StreamWorks Player performance by serving streams appropriate for end-users' connection speed; e.g.:
  CONNECTION 9.6
  SOURCE = FILE
  FILE = message1.lbr
CONNECTION 128 SOURCE = TRANSMITTER PORT = 8000
CONNECTION 1000 SOURCE = TRANSMITTER PORT = 8003
In this example:

Minimizing Bandwidth Consumption

If you want to minimize consumption of your available bandwidth by end-users with high-speed connections, you can use the CONNECTION method to control the maximum number of concurrent high-speed end-user; e.g.:
  CONNECTION 28.8
  SOURCE = FILE
  FILE = lowrate.mpa
  CONNECTION 1000
  SOURCE = FILE
  FILE = highrate.mpa
  MAXCLIENTS = 10
In this example:

Using Complex PLAY Files

You can combine within a single PLAY file any combination of sections to create a complete strategy for stream delivery, e.g.:
  SCHEDULE TO 07:04:96 19:29
  SOURCE = FILE
  FILE = event_promo.mpg
SCHEDULE FROM 07:04:96 19:30 TO 07:04:96 20:30 CONNECTION 56 SOURCE = FILE FILE = message1.lbr CONNECTION 128 SOURCE = TRANSMITTER PORT = 8002
SCHEDULE 07:04:96 20:31 CONNECTION 28.8 SOURCE = FILE FILE = recorded_event.lbr CONNECTION 56 SOURCE = FILE FILE = recorded_event.mpg MAXCLIENTS = 10