• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

play a WMV starting at a time (e.g. 00:01:33) of the video on web

L

Liu

Flightless Bird
How do I control the playback of WMV so it does not start at the beginning of
the video but at a specific time or marker (created using Windows Media File
Editor)?
For example I have video play automaticall from web with the following code:
How can I make it play from a certain time of the video by modifying the
code below?
THANKS,


<%
Dim videoname, coursecode, width, height
videoname = "filename.wmv" '
width = "896"
height = "565"
%>

<object id="MediaPlayer1"
width=<%=width%> height=<%=height%>
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<param name="URL"
value="mms://<%=serverloc%>/serverNameHere/<%=coursecode%>/<%=videoname%>"
valuetype="ref">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
</object>
 
A

Andrew E.

Flightless Bird
If you don't get an answer here,you might look into WMP 11 SDK.It lets
users modify the player,get these at:
http://msdn.microsoft.com/en-us/windows/bb190307.aspx

"Liu" wrote:

> How do I control the playback of WMV so it does not start at the beginning of
> the video but at a specific time or marker (created using Windows Media File
> Editor)?
> For example I have video play automaticall from web with the following code:
> How can I make it play from a certain time of the video by modifying the
> code below?
> THANKS,
>
>
> <%
> Dim videoname, coursecode, width, height
> videoname = "filename.wmv" '
> width = "896"
> height = "565"
> %>
>
> <object id="MediaPlayer1"
> width=<%=width%> height=<%=height%>
> classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
> type="application/x-oleobject">
> <param name="URL"
> value="mms://<%=serverloc%>/serverNameHere/<%=coursecode%>/<%=videoname%>"
> valuetype="ref">
> <param name="rate" value="1">
> <param name="balance" value="0">
> <param name="currentPosition" value="0">
> <param name="defaultFrame" value>
> <param name="playCount" value="1">
> <param name="autoStart" value="-1">
> <param name="currentMarker" value="0">
> <param name="invokeURLs" value="-1">
> <param name="baseURL" value>
> <param name="volume" value="50">
> <param name="mute" value="0">
> <param name="uiMode" value="full">
> <param name="stretchToFit" value="0">
> <param name="windowlessVideo" value="0">
> <param name="enabled" value="-1">
> <param name="enableContextMenu" value="-1">
> <param name="fullScreen" value="0">
> <param name="SAMIStyle" value>
> <param name="SAMILang" value>
> <param name="SAMIFilename" value>
> <param name="captioningID" value>
> <param name="enableErrorDialogs" value="0">
> </object>
>
>
 
N

Neil Smith [MVP Digital Media]

Flightless Bird
Use a start time, it's easier to understand and to modify
programatically. Also, you won't need to invoke javascript for this
(or VBScript which only IE supports) - a simple playlist will be
enough.

You can generate the playlist on the web server by writing out the
tags and text on an HTTP request to an ASP page (in exaclty the same
way as you'd send an HTML page created from script). PHP, Perl, JSP or
Python can all be used as alternative languages to dso this step.

An example format would be :

<asx version="3.0">
<title>Title of your stream</title>
<entry>
<ref
href="mms://<%=serverloc%>/serverNameHere/<%=coursecode%>/<%=videoname%>"
/>
<StartTime value="0:00:15.5" />
</entry>
</asx>

See the ASX playlist reference for more elements you can use to
improve the presentation (including prebuffer param and LogURL)
http://msdn.microsoft.com/en-us/library/dd564668(v=VS.85).aspx

To send the ASX content, set your web server to send a MIME type for
the ASP page of Content-Type: video/x-ms-asf (regardless of whether
the playlist content is images, video or audio or a mixture of these)
and a Content-Length header as well, which corresponds to the
character length of your ASX content.

Finally, change the URL below to the URL of your ASP page, this can
also include for example query string parameters to generate the ASX
on the fly, or a simple video ID which you use to lookup the video
properties in your DB that are needed to create the server and path
name

HTH
Cheers - Neil



On Fri, 23 Apr 2010 10:19:01 -0700, Liu
<Liu@discussions.microsoft.com> wrote:

>How do I control the playback of WMV so it does not start at the beginning of
>the video but at a specific time or marker (created using Windows Media File
>Editor)?
>For example I have video play automaticall from web with the following code:
>How can I make it play from a certain time of the video by modifying the
>code below?
>THANKS,
>
>
><%
>Dim videoname, coursecode, width, height
>videoname = "filename.wmv" '
>width = "896"
>height = "565"
>%>
>
><object id="MediaPlayer1"
>width=<%=width%> height=<%=height%>
>classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
>type="application/x-oleobject">
><param name="URL"
>value="mms://<%=serverloc%>/serverNameHere/<%=coursecode%>/<%=videoname%>"
>valuetype="ref">
><param name="rate" value="1">
><param name="balance" value="0">
><param name="currentPosition" value="0">
><param name="defaultFrame" value>
><param name="playCount" value="1">
><param name="autoStart" value="-1">
><param name="currentMarker" value="0">
><param name="invokeURLs" value="-1">
><param name="baseURL" value>
><param name="volume" value="50">
><param name="mute" value="0">
><param name="uiMode" value="full">
><param name="stretchToFit" value="0">
><param name="windowlessVideo" value="0">
><param name="enabled" value="-1">
><param name="enableContextMenu" value="-1">
><param name="fullScreen" value="0">
><param name="SAMIStyle" value>
><param name="SAMILang" value>
><param name="SAMIFilename" value>
><param name="captioningID" value>
><param name="enableErrorDialogs" value="0">
></object>
>

------------------------------------------------
Digital Media MVP : 2004-2010
http://mvp.support.microsoft.com/mvpfaqs
 
Top