Server Side Playlists - Part 1

During my chat with several people using Windows Media Services, I realized that very few actually know about Server Side playlists. I will be focusing on this subject over the next few posts and try to de-mystify it a little.

Definition: Server-side playlist is a list that identifies what content is played for a client, the time at which it is played, and the order in which it is played. The server-side playlist for a Windows Media server is an XML document.

The way this is different from a regular playlist is that this is configured on the server and client has very little control over it. The client is unable to make out that the stream coming to it from a server is actually from multiple digital media files. Instead, client just sees a single stream coming to it.

Now, this is a very powerful tool for the following reasons:

  1. As the client just sees a single stream it does not have the ability to change the order of the files and the content has to be consumed in a particular order only.
  2. As multiple content is streamed as a single stream, client does not have to connect multiple times and thus saving precious bandwidth
  3. This is a great tool to to insert advertisements. You can wrap content requested by the client with additional advertisements that must be viewed whenever a client connects to a broadcast.
  4. You can use the server object (to be covered in subsequent posts) to specify dynamically what media files to stream. In other words, you can edit the playlist even while a client is viewing a stream identified by the playlist. This is an extremely useful feature that could be used to dynamically pick relevant content for the client.
  5. Even though the client sees a single stream, you can send more information about the digital media file being streamed by using the playlist attributes (to be covered in subsequent posts)

In subsequent posts I will give scenarios which are very common and where server side playlists could help. I will also cover the server object and talk more on dynamic content programming using server-side playlists.

30 Comments

  • Finally someone is talking about SS Playlists. My fav feature of Media server. I personally would love to know what changes or things to look for in the new Windows server. Also, you mention dynamic modification of the clients playlist object. It seems pretty easy to modify a users playlist object but how do I identify individual users and modify thier specific one or all at once? Thanks!

  • great post, Vishal! I look forward to reading your blog!

  • Hi Jason,
    I am really glad to hear that SSPL is your fav too. It is a really powerful tool.
    With regards to your question, which of the following is your scenario:

    Determine what content to play for a particular user request at the startup time OR
    At runtime make changes to content for a specific user connection OR
    You just need to be able to identify users the request is coming from
    Thanks

  • Hi! I have some question about Silverlight and mms streaming:

    If I set source of Publishing point as playlist (for example "C:\wmpub\WMRoot\serverside_playlist.wsx") or I broadcast my web camera to this publishing point through Windows Media Encoder then video doesn't display in Silverlight Media Control.

    But Silverlight Media Control can display mms stream if the server broadcasted a concrete file (for example "C:\wmpub\WMRoot\industrial.wmv").

    Can you say where is a problem ?
    (I am using Windows Media Services 9.0 on Windows 2003)

  • Hi,

    The problem here is that silverlight 1.0 does not support the .wsx format. This is also known as Server side playlist.

    Could you please tell me a little more about your broadcast scenario? That should work with silverlight.

  • There are some steps below that I do.

    In the properties of Media Server in section "Control protocol" I enable "WMS HTTP Server Control Protocol" and change its port to 33333, since by default pot 80 is used by IIS.

    I create publishing point "admin" and set its source, for example "C:\wmpub\WMRoot\industrial.wmv".
    Then I press "Start publishing point".

    I create a new Silverlight project. In file Page.xaml I add next string:

    I press run project and the video plays in the browser.

    It was noticed that MediaElement displayed mms stream only if the server broadcasted a concrete file ("industrial.wmv" in my case).

    If I set source of Publishing point as playlist (for example "C:\wmpub\WMRoot\serverside_playlist.wsx") or I broadcast my web camera to this publishing point through Windows Media Encoder then video doesn't display and there are no errors.

    But video played properly in the previous version of Silverlight Runtime.


  • Hi Tony,

    .wsx format won't work wth silver light as there is no support for server side playlist in Silver light right now.

    The camera scenario should work unless there is an unsuported format with camera encoding.

    Does the content play in Windows Media Player?

  • yes, in the Windows Media Player the content plays correctly...
    and in previous version of silverlight I saw web camera broadcasting.

    Maybe, in this version of silverlight I must use Expression Media Encoder ? (now I use Windows Media Encoder 9.0)
    But in current version of Expression Encoder the option "Live streaming" is absent (I saw it in the video from MIX2007)

  • Hi Tony

    This should be working. I believe your understanding of live not supported in Expression Encoder is correct however silverlight should be able to play.

    Is there a stream available that we can try ?

  • Hi! I'm broadcasting now my webcam.
    You can try it by the following address:

    mms://194.187.155.69:1120/Web.Camera's_playlist

    In the Windows Media Player the video plays correctly, but in the Silverlight it doesn't.

  • I have solved the problem.
    It is necessary to use "http://" instead of "mms://" in the Source of MediaElement. (for example, Source="http://194.187.155.69:1120/Web.Camera's_playlist" )

  • in the previous post it is necessary read example as "http: // 194.187.155.69 : 1120 / Web.Camera's_playlist" (without spaces)

  • This might be the perfect place to ask a question.
    Can someone please visit the following newsgroup and help me out.

    It is a question for Media Service SDK using C# on FireEvent method.

    Direct link to the newsgroup is
    http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/default.mspx?dg=microsoft.public.windowsmedia.sdk&tid=fe0271cb-f16c-41df-b77f-64c18f0efb3a&lang=en&cr=US&p=1


    Thank you

  • Nice Tony, thanks for sharing that

  • Hi Niraj, I see your problem is solved.

    In general, for anyone else having the same problem, the thumb rule should be:-
    Broadcast scenarios - Use shared playlist object
    On-demand scenarios - Use requestted playlist object

    This is based on the fact that a stream is shared for a broadcast and for on-demand each connection has a separate stream

    Here are two useful links:-
    On-Demand Scenarios
    http://msdn.microsoft.com/en-us/library/ms752544.aspx

    Broadcast scnearios
    http://msdn.microsoft.com/en-us/library/ms752544.aspx

  • "

    Comments: re: Server Side Playlists - Part 1
    Posted July 19, 2007 P by vsood

    Hi Jason,

    I am really glad to hear that SSPL is your fav too. It is a really powerful tool.

    With regards to your question, which of the following is your scenario:

    1. Determine what content to play for a particular user request at the startup time OR
    2. At runtime make changes to content for a specific user connection OR
    3. You just need to be able to identify users the request is coming from

    Thanks

    "


    Vishal, could you please try to give solutions to above specified scenarions?

    Since long time I was trying to find out the solution for these scenarions but haven't yet found?
    Is there realy any possible silution available for each above mentioned scenarion?

    :
    :

    Thanks and best regards...
    Milind Dhobe.

  • Hi, i am trying to broadcast video stream from a video capture card, using MS media encoder, thru windows media services 9.0. I can see the video playing when i pressed the test button at the Source tab from the media service, but it seems like no video stream actually coming out from my streaming server. can anyone help me on this issue?

  • Hi Jasmine

    Are you pushing to WMS or pulling from the encoder?

    Are you able to play the video directly from the encoder.

    Regards
    Vishal

  • @ vsood:
    Here is my scenario: I am pushing VOD. I don't need extensive control of the playback. I want the user to be able to 'look inside the server side playlist' so to speak. In other words, I don't want a single stream of video. I want the user to see every media file in the playlist and be able to jump from one file to the next. Is this possible in any kind of way with WMS? Thanks for any and all replies.

    note: even with client side playlists (.asx) the user cannot see the files that make up the playlist - is that right?

  • Client side playlist (asx) is the way to go for you.
    A client can view the contents of asx files by going to Now Playing in the library.  Even with server side playlist a client can easily go to next video, etc. if you do not block that. However, they cannot see the contents. While the content is playling the user can get details on the content piece by going to "Now Playing" in the library (WMP 11)

  • Great Blog!

    Well, I'm trying to make a DirectShow-based player application on XP PC & WinMobile PDA which can play On-Demand WMS' streaming contents with Server Side Playlist.

    However, it seems that default WMP source filter does not support Server Side Playlist feature. When I command "Render URL" on the FilterGraphEditor, it plays only the first media file on the list and stops.

    Meanwhile, Windows Media Player succeeded playing next media files on the server side playlist.

    Can you give me a hint how to make it work with DirectShow filter programming?


    Best Regards,
    LeSMin

  • Hi All,

    Great Blog i hope i will get the answer of my query here.

    i am trying to mention the "media source" in Server side playlist(wsx file) as external URL ( e.g http://mydomain.com/file1.wmv) . Its giving me error when i start my publishing point.

    Can anyone guide me how to mention external source of files in server side playlist ?

    Thanks
    Anil

  • Hi Anil

    This should work.

    You need to make sure that the external URL is accessible from WMS and if required set a HTTP proxy to access the external URL (In the Network Data source plug-in).

    Also, a simple way to test is play the url in Windows Media player from the server.

    Hope this helps

    Cheers
    Vishal

  • Vishal,

    I have a specific task and can't find the solution for my needs. Please advice something if you can. Here is my task.

    I have two servers: Web server(Linux) and Streaming Server(Win2003 Server with WMS 9). Web Server runs a PHP site that should allow interface for users to receive their own publishing points and upload and manage their content. For now I have an interface of upload videos to the Streaming Server. There I have a scheduled PHP convert script which converts uploaded videos to wmv using mencoder software into a specific user folder. So far it gives me an ability to publish on-demand content.

    But the problem I have appears when it comes to a broadcast publishing point:

    1. First of all I don't know how to create Publishing Points automatically through a PHP script giving it a name and maybe other parameters. I believe that it is possible with ASP, but not sure.

    2. Even if I create a Publishing Point manually, I don't know how to manage it's content. I tried different source options: Playlist, Directory. I can still upload new videos to the PP folder, but as I understand if i add videos to the streaming directory or change playlist file by script, I will need to stop and start Publishing Point again for changes to apply.

    Right now I'm trying to find a solution using Dynamic Source. I can address PP to a script on my Web Server which will generate an ASX plalysit. But as I understand it will use playlist generated after first access to playlist generator. And it can't be changed until this playlist is played till the end and SS will ask Web Server for the new one. And I need users to be able to change their playlist on the fly - add/delete videos, change videos order, etc.

    For now I see only one solution - have a looped Server-side playlist with a single element inside addressing to a Web server playlist generator. Generator will return a single element which will be played and as the list will be looped it will ask Web Server for a new file after every video is finished. This way I need to pass PP id and store current playing position on the web server, so that I could return next video for a certain PP.

    So, this is my problem. Unfortunately I couldn't found needed solution in manuals and different forums. I hope for your help a lot!!

    Thanks in advance,

    Victor

  • LesMin,

    Did you ever find a solution to your problem playing server side playlists on your WinMobile PDA? I'm having a similar problem on CE 5.0.

    Steve

  • Answering Victor's question

    1. Creating publishing point is exposed through COM API by the server. You can use a program/script that is COM aware to create the publishing point.

    2. By default you can have simple video/jpeg image with repeat=infinite option which says something like "No Live feeds" (To prevent the publishing pont from stopping ) . The Windows media server exposes its playlists using COM APIs a simple XML DOM Document. You can add/remove elements dynamically, change the order and change the current playing entry. So you could update the entries as and when users upload the videos.

    If accessing the COM interfaces from Linux box is difficult, you could write simple scripts/ASP pages and deploy them on a site on the IIS on the NT box and make them runnable only from the linux box (using IP address authentication).

    Hope this helps.

  • Hi,
    >You can use the server object (to be covered in subsequent posts) to specify
    >dynamically what media files to stream. In other words, you can edit the playlist
    >even while a client is viewing a stream identified by the playlist. This is an
    >extremely useful feature that could be used to dynamically pick relevant content for
    >the client.
    Let's assume that I have the following .wsx-Playlist that I want to stream using an On-Demand Publishing Point.
    <?wsx version="1.0"?>
    <smil>
       <media src="racecar_300.wmv"/>
       <media src="snowboard_300.wmv"/>
    </smil>
    I now want to exchange the snowboard_300.wmv Mediafile with something else while the Server still streams racecar (or add a third Mediafile, or ...).
    How would I be able to do that? According to the WMS documentation this playlist is being loaded into memory at the start of the streaming process. So I would have to tell the WMS to reload the modified playlist...unfortunately I can't find a way to do that short of telling the client to restart the connection.
    Hope you can help me
    Thorsten

  • Hi Thorsten,

    WMS exposes APIs to do this. Have you tried cueStream, uncueStream and FireEvent menthods mentioned here:
    http://msdn.microsoft.com/en-us/library/ms740343(VS.85).aspx

    Regards
    Vishal

  • Hi Vishal,
    I am a newbie to this windows media services.
    I have a broadcast publishing point using playlist.
    Playlist has two itmes.
    I would like to programatically jump to the next item in playlist in VBscript.
    Can someone help in getting to do this.
    My source code is as follows:
    sServerName = "localhost"
    set oWMSSrv = createobject("WMSServer.server",sServerName)
    set oPubPoints = oWMSSrv.PublishingPoints
    set THEPubPoint = oWMSSrv.PublishingPoints("WMEXenonTestPL2")
    'THEPubPoint.Start
    set Playlist = THEPubPoint.SharedPlaylist


    I would like to know the properties and methods available for playlist object.

    Many thanks in advance,

    Regards,
    Dheeraj.

  • Hi Dheeraj

    Does this help: http://msdn.microsoft.com/en-us/library/ms748532(VS.85).aspx

    Regards
    Vishal

Comments have been disabled for this content.