Re: How to reduce startup latency while playing .wmv file - from J

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Wed, 27 Aug 2008 02:00:01 -0700, mswin
<mswin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hi Neil,

Thanks a lot for detailed response.
I have tgried using
player.network.bufferingtime = 0
but, after setting this the video quality that is played is veru bad and it
get distorted.


As I noted, that's because you're subverting the very thing which is
required for smooth playback. There is no workaround to this.


I have even tried using silverlight to play the video file, but still the
buffering time seems to be same in both the cases. And moreover, for the
first time this will prompt the user to download silverlight t play the video.


Silverlight is not ubiquitous (and may never be), this is to be
expected.


I have very little knowledge on the media player internal working.
When I saw a video clipping on Youtube, even it is big in size, it will
start as soon as I start playing the video.

That's because the page begins preloading the video as soon as the
flash player is instantiated.

Plus they often use the very low quality (but slightly lower latency)
H263 video codec which explains the macroblocking - unless you access
content on pages with alternate paths having On2 VP6 or H264 codecs
also supported in later versions of flash.

H263 was commonly used by video conferencing applications (such as
Netmeeting) because of the lower latency, but also the lower recovery
available for "missing" packets.

Latency cannot be tolerated in video conferencing, and you're trying
to do that, but with codecs optimised for playback quality, which
won't work.


Is there any alternate approach to play the video files on the webpage,
without the user experiencing latency, using media player.


No, there isn't, unless you're prepared to precache the video by
starting playback in a hidden player using script, and immediately
pausing it when the playing event is triggered.


Thanks in Advance for any thoughts on this.


"Neil Smith [MVP Digital Media]" wrote:

On Thu, 21 Aug 2008 01:24:01 -0700, mswin
<mswin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:


We are using html object tag to embed and play the video files(.wmv) by
using classid:

22d6f312-b0f6-11d0-94ab-0080c74c7e95


Aaaagghhhh ! Why do people still use embedding code from 1999 ? The
player SDK clearly notes a CLSID starting 69.... for WMP7 and later !

The CLSID you've listed throws the player into compatibility mode for
WMP6.4 so your object model will probably be incorrect or at best,
emulated.


See this page for how to begin embedding WMP 7 and later :
http://msdn.microsoft.com/en-us/library/bb249579.aspx

Considerable improvements in XHTML compliance can be achieved using
adaptations of the Flash Satay type method demonstrated on the site
www.alistapart.com and subsequent links


When we try to play the videos from the remote server using http URL, video
buffering is taking more time and then playing the video. The user is
experiencing the latency in playing the video file.


This is an integral part of video streaming and considered normal


The video files are stored at a physical location on the remote server and
accessed by http.

As of now we are displaying a message to the user at the time when the video
is getting bufferred.
Is there a way to play the video file as soon as the user starts it,


No and there will never be - buffering is integral to streaming. It
can arise from a range of sources, but in your case you're only
encountering the player buffers, not those from a streaming server or
a live encoder.

instead of waiting till the whole stream is bufferred.
We need a property that we can set from Javascript to the MediaPlayer object.


You can in theory reduce the player buffers for specific content
sources using javascript, but not with that embedding code. See
http://msdn.microsoft.com/en-us/library/bb249243.aspx

player.network.bufferingtime can be set down to zero, typically it's 5
seconds by default but may have been specifically chosen by the user

Tampering with those values is generally a bad idea unless you have
very specific detailed knowledge of the users local network conditions
and the routed path to the user (do you ?)


We want the video to be played immediately without waiting till the whole
content bufferred.

You can't play immediately, but you also shouldn't get download of the
complete content even over HTTP.

If that's happening, your server is probably reporting the wrong MIME
type for the content (which should be video/x-ms-asf assuming WMV)

You *should* also enable client side caching on your server, so
examine the server headers for no-cache, proxy and expires headers
appropriate to the amount of time you expect your viewers to re-view
the content (i.e. several days at least)

HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2008
http://mvp.support.microsoft.com/mvpfaqs

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



Relevant Pages

  • Re: Why is everything on E4 always out if lipsync ?
    ... After playing a video there was always a lip sync ... i.e. why is it necessary to code audio & video separately. ... or shortage of memory for buffering to cause loss of sync. ...
    (uk.tech.digital-tv)
  • 2003 Server video playback issues
    ... on the same switch can connect and view demand content ... >norton firewall activated and can see the video, ... >>HTTP) and see if they see buffering? ... >>Windows media Player 9 or greater? ...
    (microsoft.public.windowsmedia.server)
  • Re: How to reduce startup latency while playing .wmv file - from Javas
    ... We are using html object tag to embed and play the video filesby ... No and there will never be - buffering is integral to streaming. ... but not with that embedding code. ...
    (microsoft.public.windowsmedia.sdk)
  • Re: OpenGL-based framebuffer concepts
    ... This is possible only if the video memory management is in the kernel. ... userspace may also want to use double buffering, ... currently in use to display the data. ... the graphics system to take... ...
    (Linux-Kernel)
  • Re: Video Capture Performance with directshow
    ... I suspect you're using the WMV encoder? ... The memory usage spike you're seeing is the buffering filter storing up as ... filter on the low priority thread which the video encoding happens on. ... I'm writing a directshow based solution for capturing window (target ...
    (microsoft.public.pocketpc.developer)