« Previous Next »

Thread: Unable to seek forward

Last post 02-27-2009 12:22 PM by prakashd. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 11-24-2008, 5:52 AM

    • einar
    • Not Ranked
    • Joined on 06-01-2007, 6:59 PM
    • Posts 7

    Unable to seek forward

    I just installed the IIS Media Pack on my IIS7. I enabled Bitrate throttling and created a new web playlist pointing to a wmv file. The playlist looks like this:

    <!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 2.1//EN" "http://www.w3.org/2005/SMIL21/SMIL21.dtd"[]>
    <
    smil xmlns="http://www.w3.org/2005/SMIL21/Language">
    <
    head>
    <meta name="title" content="Test!" />
    </
    head>
    <
    body>
    <
    seq>
    <
    ref src="testfile.wmv">
    <
    param name="srcType" value="relativeURI" />
    <
    param name="canSkipForward" value="True" />
    <
    param name="canSkipBack" value="True" />
    <
    param name="canSeek" value="True" />
    <
    param name="extraParam" value="" />
    <
    param name="title" value="This is a test" />
    </
    ref>
    </
    seq>
    </
    body>
    </
    smil>

    When I play the WMV file directly from the web server (not via playlist) in WMP I can seek forward in the file (without downloading every bit in between), however when I open the URL to the web playlist (Test.isx) I'm not able to seek forward. As you can see abow I've enabled the the "canSeek" parameter in my playlist. I've tried this both with bitrate throtling on and off.

    Shouldn't seeking into the video be possible without having to download the whole video?

    Has anyone had this issue? Are there some settings elsewhere in IIS7 that could cause this behaviour?

  • 11-29-2008, 12:38 AM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 4:12 AM
    • Redmond, WA
    • Posts 57

    Re: Unable to seek forward

    Hi einar,

    Is your issue that WMP is not seeking at all when using a playlist?  Or is it that WMP is downloading the entire video when requested via a Playlist so the seek is a local seek?

    If it's the latter, 'seek' behavior will depend on the client.  WMP pre-roll's playlist entries so 'Seek' operations occur locally.

    If it's the former, could you tell us which version WMP and which OS you're using?  Could you also tell us how long the video you're requesting is so that we can test this scenario in-house?  thx...

     - bobby

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 11-29-2008, 5:13 AM In reply to

    • einar
    • Not Ranked
    • Joined on 06-01-2007, 6:59 PM
    • Posts 7

    Re: Unable to seek forward

    Hi Bobby

    My issue is the latter one, WMP tries to download the whole video instead of requesting a new byte range.

    However, I did figure out why this is. If you look at the http headers returned by IIS7 when you request a media file directly, one of them is "Accept-Ranges: bytes". This tells the client (WMP in this case) that the server accepts requests specifing specific byte ranges. (http://www.freesoft.org/CIE/RFC/2068/160.htm).

    When you request a Web Playlist, this header is not returned by the server and therefore WMP does not even try to request a byte range.

    To verify that this was the case and to create a workaround, I created a simple IIS Module, which injects the "Accept-Ranges: bytes" header when serving .isx files. Im not sure where in the request pipeline this best fits in, but I put it in the PostRequestHandlerExecute event.

    Here is my code (sorry for the bad formatting):

    public class WebPlaylistsFixModule : IHttpModule
    {
    public void Dispose() {}
    public void Init(HttpApplication context)
    {
    context.PostRequestHandlerExecute +=
    new EventHandler(context_PostRequestHandlerExecute);
    }

    void context_PostRequestHandlerExecute(object sender, EventArgs e)
    {
    HttpApplication app = (HttpApplication)sender;
    HttpRequest request = app.Context.Request;
    if (request.Path.IndexOf(".isx") > -1)
    {
    app.Response.Headers.Add(
    "Accept-Ranges", "bytes");
    }
    }
    }

    -Einar

  • 12-01-2008, 2:11 AM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 4:12 AM
    • Redmond, WA
    • Posts 57

    Re: Unable to seek forward

    Thanks Einar...

    I'll file a bug tomorrow to get this fixed.  Is this a feasable work-around for you?  Please feel free to provide additional suggestions/issues, as necessary.  Thanks...

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 02-27-2009, 12:22 PM In reply to

    • prakashd
    • Top 200 Contributor
    • Joined on 10-16-2007, 7:33 PM
    • Redmond
    • Posts 29

    Re: Unable to seek forward

    In the IIS admin you could go to Cutom Headers module and set the header "Accept Ranges:bytes" for the folder containing your media files so that the header is always sent. Would that work for you?

Page 1 of 1 (5 items)
Microsoft Communities