Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: URGENT: Slow source with delays

HTVi
TV Discussion Newsgroups

URGENT: Slow source with delays
Stas 6/7/2007 1:27:00 PM

Hi.

I'm playing video from a slow HTTP source, and have frequent buffering. I
tried the following:

1) SetLiveSource(False), SetBufferingTime(60*10000000) - prevents buffering
but causes a slowly growing delay in stream, up to minutes.

2) SetLiveSource(True), SetSyncTolerance(60*1000),
SetBufferingTime(5*10000000) - resolves the delay but causes frequent
buffering.

I need both to prevent the buffering and minimize the delay as soon as
possible.

Any help will be greatly appreciated!
Stas.
Re: URGENT: Slow source with delays
"Chris P." <msdn[ at ]chrisnet.net> 6/7/2007 6:23:02 PM
On Thu, 7 Jun 2007 06:27:00 -0700, Stas wrote:

[Quoted Text]
> I'm playing video from a slow HTTP source, and have frequent buffering. I
> tried the following:
>
> 1) SetLiveSource(False), SetBufferingTime(60*10000000) - prevents buffering
> but causes a slowly growing delay in stream, up to minutes.
>
> 2) SetLiveSource(True), SetSyncTolerance(60*1000),
> SetBufferingTime(5*10000000) - resolves the delay but causes frequent
> buffering.
>
> I need both to prevent the buffering and minimize the delay as soon as
> possible.

What are you trying to achieve here exactly? If there isn't enough
bandwidth for the stream then the stream will stall and rebuffer. If the
source is live and there isn't enough bandwidth it will do the same
behaviour, but it will eventually go to a stop state.

Is the source live?

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
Re: URGENT: Slow source with delays
Stas 6/9/2007 6:49:02 PM
Hi Chris.

Let me explain:

The source provides access to live WMV video via HTTP link. I built a small
application based on NetWrite, which reads the video from HTTP link and
pushes the video to a publish point.

It works ok, except for random delays in reading samples from HTTP, which I
have no way to prevent. When this delay occurs, it's basically translates to
the publishing point, as the users begin seeing stalls and buffering messages.

I think the publishing point buffer simply depleted for these users, as
restarting the video payer will start the playback a little earlier (will
playback some portion again), and then it will continue fine, until the next
stall.

Regards,
Stas.

[Quoted Text]
> What are you trying to achieve here exactly? If there isn't enough
> bandwidth for the stream then the stream will stall and rebuffer. If the
> source is live and there isn't enough bandwidth it will do the same
> behaviour, but it will eventually go to a stop state.
>
> Is the source live?
>
> --
> http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]
>
Re: URGENT: Slow source with delays
"Chris P." <msdn[ at ]chrisnet.net> 6/10/2007 2:54:15 PM
On Sat, 9 Jun 2007 11:49:02 -0700, Stas wrote:

[Quoted Text]
> The source provides access to live WMV video via HTTP link. I built a small
> application based on NetWrite, which reads the video from HTTP link and
> pushes the video to a publish point.
>
> It works ok, except for random delays in reading samples from HTTP, which I
> have no way to prevent. When this delay occurs, it's basically translates to
> the publishing point, as the users begin seeing stalls and buffering messages.
>
> I think the publishing point buffer simply depleted for these users, as
> restarting the video payer will start the playback a little earlier (will
> playback some portion again), and then it will continue fine, until the next
> stall.

If there is enough bandwidth to receive the HTTP stream 90% of the time
then the best thing is going to be to increase buffering by a significant
margin. You could attempt to do this at the publishing point or at your
application. It would be far more difficult to do in the application but
it could potentially work better but would require parsing the stream
enough to read the timestamps.

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
Re: URGENT: Slow source with delays
Stas 6/11/2007 8:34:02 AM
Hi Chris.

I'd like to try the first option first. How it's possible to increase
publish point buffer? I looked through the settings and found only the
enable/disable option.

Stas.

[Quoted Text]
> If there is enough bandwidth to receive the HTTP stream 90% of the time
> then the best thing is going to be to increase buffering by a significant
> margin. You could attempt to do this at the publishing point or at your
> application. It would be far more difficult to do in the application but
> it could potentially work better but would require parsing the stream
> enough to read the timestamps.
>
> --
> http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]
>
Re: URGENT: Slow source with delays
"Chris P." <msdn[ at ]chrisnet.net> 6/11/2007 3:28:13 PM
On Mon, 11 Jun 2007 01:34:02 -0700, Stas wrote:

[Quoted Text]
> I'd like to try the first option first. How it's possible to increase
> publish point buffer? I looked through the settings and found only the
> enable/disable option.

I thought you could with IWMSBroadcastPublishingPoint, but looking at that
more closely you actually cannot - only setting the buffering style.

It might be worth trying to gather some statistical data around when
problems occur with IWMSPublishingPointCurrentCounters and
IWMSPublishingPointPeakCounters.

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
Re: URGENT: Slow source with delays
Stas 6/12/2007 9:47:00 AM
Hi.

[Quoted Text]
> It might be worth trying to gather some statistical data around when
> problems occur with IWMSPublishingPointCurrentCounters and
> IWMSPublishingPointPeakCounters.


I think the problem is on reader side, rather then on the publishing point
side, but I will gather some data nevertheless.


About the solution, if it's impossible to increase the publishing point
buffer, what is the best way to increase the buffer on application side? I
tried doing it via SetBufferingTime() function, but then a growing delay
problem eventually appears, where the stream is 5+ minutes late then the
source.

The other way I read about is to create user allocate buffers and then
manage them manually. Is that what you meant in your advice? Also, what you
meant by timestamps parsing?

Regards,
Stas.
Re: URGENT: Slow source with delays
"Chris P." <msdn[ at ]chrisnet.net> 6/12/2007 12:34:49 PM
On Tue, 12 Jun 2007 02:47:00 -0700, Stas wrote:

[Quoted Text]
> I think the problem is on reader side, rather then on the publishing point
> side, but I will gather some data nevertheless.
>
> About the solution, if it's impossible to increase the publishing point
> buffer, what is the best way to increase the buffer on application side? I
> tried doing it via SetBufferingTime() function, but then a growing delay
> problem eventually appears, where the stream is 5+ minutes late then the
> source.
>
> The other way I read about is to create user allocate buffers and then
> manage them manually. Is that what you meant in your advice? Also, what you
> meant by timestamps parsing?

From your original description I was under the impression that the problem
was at the publishing point, i.e. the publishing point was not receiving
the data quickly enough from the encoder.

If the problem is on the client side I would expect the behaviour to be a
little different. I.e. the client would be falling behind in the stream,
from what you describe the client is reaching the end of the stream and the
publishing point has no more data to offer. But then when you set the
buffer with SetBufferingTime() the stream is late, which seems
contradictory to the first piece.

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
Re: URGENT: Slow source with delays
Stas 6/12/2007 6:19:03 PM
By "reader" I meant the IWMReader object, reading from the HTTP source.

The problem apparently is in the application that I build, based on NetWrite
example. Reminder: it reads from the HTTP source, and pushes the received
samples to a publish point.

Regarding the SetBufferingTime(), I forgot to mention that I must to set
SetLiveSource(FALSE), otherwise the stalls became very frequent. It's like
the buffering and the live setting are conflicting between themselves.

Turning off the live setting apparently causes the IWMReader to accumulate
very large buffer, which causes these delays.

Regards,
Stas.

[Quoted Text]
> From your original description I was under the impression that the problem
> was at the publishing point, i.e. the publishing point was not receiving
> the data quickly enough from the encoder.
>
> If the problem is on the client side I would expect the behaviour to be a
> little different. I.e. the client would be falling behind in the stream,
> from what you describe the client is reaching the end of the stream and the
> publishing point has no more data to offer. But then when you set the
> buffer with SetBufferingTime() the stream is late, which seems
> contradictory to the first piece.
>
> --
> http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]
>
Re: URGENT: Slow source with delays
"Chris P." <msdn[ at ]chrisnet.net> 6/12/2007 6:47:18 PM
On Tue, 12 Jun 2007 11:19:03 -0700, Stas wrote:

[Quoted Text]
> The problem apparently is in the application that I build, based on NetWrite
> example. Reminder: it reads from the HTTP source, and pushes the received
> samples to a publish point.
>
> Regarding the SetBufferingTime(), I forgot to mention that I must to set
> SetLiveSource(FALSE), otherwise the stalls became very frequent. It's like
> the buffering and the live setting are conflicting between themselves.
>
> Turning off the live setting apparently causes the IWMReader to accumulate
> very large buffer, which causes these delays.

I think you have to keep the live mode on and then see if there is a way to
correct the timestamps. It could be that the timestamps for the samples
you are sending to the publishing point are wrong or late or some such.

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen