Sourcing from a multicast broadcast using Windows Media Services
A few folks have recently had questions about how to do sourcing of a video stream when using multicast with Windows Media Services (WMS). There are two basic scenarios that we often see:
- Unicast edge server sourcing from a multicast broadcast on an origin server
- Multicast edge server sourcing from a unicast broadcast on an origin server
In this post, I'll address the first scenario, a unicast edge server sourcing from a multicast broadcast on an origin server, as illustrated by the following diagram.
Multicast is often employed across an enterprise wide-area network (WAN) or content distribution network (CDN) to move broadcast content out to edge servers. Two examples of where this is useful are for distributing:
- Executive broadcasts across a multicast-enabled WAN link to a remote enterprise LAN that is not multicast-enabled.
- IPTV broadcasts across a CDN and then delivering the broadcasts to end users using public-facing edge servers.
The primary advantage of multicast is that no matter how many edge servers you have, you only have one video stream being distributed. In other words, even if you run a large CDN and have two thousand edge servers to which you need to distribute a 500kbps stream, your network will only need to support 500kbps. If you had to use two thousand unicast streams to reach those edge servers, some portions of your network would need to be able to support up to 1Gbps of streaming traffic (2,000 x 500kbps).
Let me describe how you would you set up this scenario when using WMS 9.0 or above. The following steps assume:
- You have Windows Media Service 9 Series running on Windows Server 2003 servers and/or Windows Media Services 2008 running on Windows Server 2008 servers, and
- Your network hardware (routers, etc.) between the Origin and Edge Servers is multicast-enabled.
Origin Server: Set up a multicast publishing point
First, we need to set up the Origin Server, from which the multicast originates, sourcing from a file, playlist, or live encoder.
- On the Origin Server, right-click on Publishing Points in the console tree on the left side of the WMS user interface, as shown below.
-
Click on Add Publishing Point (Wizard)… to create a new publishing point with the following settings (click Next to move from one dialog box to the next):
- Name: A descriptive name (I'll call it GlobalMulticast in this example)
- Content Type: One file, for testing purposes. (Later, you can source from a live encoder running on a PC, such as the free Windows Media Encoder 9 Series or a free trial version of Microsoft Expression Encoder 2, hooked up to a Webcam or other video camera.)
- Publishing Point Type: Broadcast publishing point
- Delivery Options: Multicast; for testing purposes, leave the 'Enable unicast rollover' box unchecked
-
File Location: Pick any lengthy Windows Media video (.wmv) file that you have
- TIP: For testing purposes, you could also source from a WMS Server-Side Playlist that is set to loop
- Publishing Point Summary: Verify your selections
- Completing the Publishing Point Wizard: Leave the default choice of creating a .nsc file and click Finish
-
Multicast Announcement Wizard
- Click Next if you see the Welcome dialog
- Specify Files to Create: Select the second option, Multicast information file (.nsc)
-
Stream Formats: Click the Add button
-
Add Stream Formats:
-
If sourcing from a file, click the Browse button
- In the Windows Media Browse dialog box, change the Data Source and Location fields as needed to find your multicast source file
- Click once on the file name to highlight it
- Click the Select File button
- If sourcing from an encoder, enter an HTTP path to it
- Click OK
-
- Click Next
-
- Multicast Logging: Leave the default No answer and click Next
-
Save Multicast Announcement Files
- For the edge servers that will be sourcing from the multicast, LAN users, you must save the NSC file at a location that can be accessed using an absolute path (e.g., \\server\directory\file.nsc - in this example, I made use of a shared 'media' directory and would specify \\mediapack1\media\GlobalMulticast.nsc)
-
For local LAN users, you can save the NSC file:
- On a Web server (for example, if you are using the default Web site in IIS7 running on the Origin Server, enter a path such as c:\inetpub\wwwroot\file.nsc), or
- On a server share (for example, \\server\directory\file.nsc)
- Click Next
- Archive Content: Leave the default No answer and click Next
- Completing the Multicast Announcement Wizard: Click Finish
-
Ensure multicast streaming is enabled
- In the console tree, click the new broadcast publishing point (if the publishing point is started, click Stop)
- In the details pane, click the Properties tab
- In Category, click Multicast streaming
- In Plug-in, click WMS Multicast Data Writer, and then right-click – if Enable is not grayed out, click on it
Edge Server: Set up a unicast broadcast publishing point
Now, let's set up an edge server, which will receive the multicast stream and pass it on to end users via unicast streams.
- On the edge server, right-click on Publishing Points in the WMS console tree
-
Click on Add Publishing Point (Advanced)… to create a new publishing point in the Add Publishing Point dialog box, with the following settings:
- Publishing Point Type: Broadcast
- Publishing Point Name: A descriptive name (I'll call it EdgeBroadcast in this example)
- Delivery Options: Multicast; for testing purposes, leave the 'Enable unicast rollover' box unchecked
- Location of content: We need to point at your Origin Server. Supply a path that is similar to the Content type example shown for a Multicast stream, mcast://\\server\directory\file.nsc. Using the Origin Server settings above, I would fill in mcast://\\mediapack1\media\GlobalMulticast.nsc (see image, below).
- Click OK
- Right-click on the new publishing point, and select the Start option (see image, below)
-
To test that the unicast stream is working:
- First use the Test Stream feature in WMS. Click once on your edge publishing point in the console tree, then in the details pane, select the Source tab. Click on the Windows Media Player icon at the bottom (circled in image below, on a WMS 2008 server).
- Next, from a client PC, launch Windows Media Player and open (Ctrl + U) the unicast stream on the edge server, using a URL such as mms://server/publishingPoint. In my example, I would use mms://edgeserver1/EdgeBroadcast (URLs are not case-sensitive).
- First use the Test Stream feature in WMS. Click once on your edge publishing point in the console tree, then in the details pane, select the Source tab. Click on the Windows Media Player icon at the bottom (circled in image below, on a WMS 2008 server).
If all went well, you are now able to source from a multicast broadcast and re-distribute content using unicast streams from the edge.
Coming soon: I'll describe how to set up scenario #2, sourcing a multicast edge server from a unicast origin server.