Streaming server and ASX

At one my clients occured the problem of all videos being played 3 times 3 times 3 times instead of just one.

After some investigation, it turned out, that for each request coming for a WMV file instead of an ASX file is returned. For example, for a request for http://stream/stream.wmv the following asx was generated:

<asx version="3.0">
  <title>Stream</title>
<entry>
    <title>www.stream.hu</title>
    <ref href="http://stream3/stream.wmv" />
    <author>Stream</author>
    <copyright>(c) 2008 stream</copyright>
  </entry><entry>
    <title>www.stream.hu</title>
    <ref href="http://stream1/stream.wmv" />
    <author>Stream</author>
    <copyright>(c) 2008 stream</copyright>
  </entry><entry>
    <title>www.stream.hu</title>
    <ref href="http://stream2/stream.wmv" />
    <author>Stream</author>
    <copyright>(c) 2008 stream</copyright>
  </entry>
</asx>

If you read the specification for the ASX file format, this should/may be rewritten as:

<ASX VERSION="3.0">
<TITLE>Stream</TITLE>
   <ENTRY>
   <TITLE>www.stream.hu</TITLE>
      <REF HREF="http://stream3/stream.wmv" />
      <REF HREF="http://stream1/stream.wmv" />
      <REF HREF="http://stream2/stream.wmv" />
      <AUTHOR>Stream</AUTHOR>
      <COPYRIGHT>(c) 2008 stream</COPYRIGHT>
   </ENTRY>
</ASX>

This would instead of playing the three items after each other just choose the first one, that responds in a timely fashion from the list. The day is saved, the roundrobin load balancing still works as it should, and nothing plays three times three times three times.

Leave a Reply

Your email address will not be published.