bad PTS after 3-5 hours of http streaming

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
drus
Blank Cone
Blank Cone
Posts: 32
Joined: 27 Oct 2005 08:03
Contact:

bad PTS after 3-5 hours of http streaming

Postby drus » 13 Nov 2006 08:33

hello

i'm trying to make server-client streaming of audio. server and client have windows xp sp2
i'm using vlc-0.8.4a and vlc-0.8.5. but the situation is the same with both versions.
so, i use wxwidgets interface, but i'll try to write server mrl:

Code: Select all

vlc dshow://:dshow-vdev="none":dshow-adev="NVIDIA(R) nForce(TM) Audio":dshow-size="" --sout='#transcode{acodec=mpga,ab=192,channels=2}:duplicate{dst=std{access=http,mux=ts,dst=:1234}}'
the client mrl is simple:

Code: Select all

vlc http://192.168.0.5:1234
so, at first it works well, the only messages are:
main audio output warning: buffer is 40739 in advance, triggering downsampling
main audio output warning: resampling stopped after 9533078 usec (drift: 51)
main audio output warning: buffer is 40005 in advance, triggering downsampling
main audio output warning: resampling stopped after 9639512 usec (drift: -135)

but after few hours of streaming the sound disappear, cpu load is 100% on client-side. and in the log i've got messages like:
main audio output warning: PTS is out of range (4674343), dropping buffer

on server there are no critical mistakes, the stream is going, if i reconnect client, it works fine again, but only 3-5 hours

can anybody help with it? why such things appear?

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 13 Nov 2006 23:29

Answer. Don't use HTTP. It's not a streaming protocol. it's a file protocol.

RTSP or UDP/MPEG2TS are the only protocols that I recommend for streaming.
Don't use PMs for support questions.

drus
Blank Cone
Blank Cone
Posts: 32
Joined: 27 Oct 2005 08:03
Contact:

Postby drus » 14 Nov 2006 07:25

thank you for answer :) i'll try today this variant.
but one more question:
yesterday i made the same server-client streaming, but i used linux server (vlc-0.8.4a), and windows client (vlc-0.8.4a). on server side i used v4l module. all other parameters were the same. today i've got no error messages on client side, but it worked all night.
there is a supposition that windows have not accurate system clock.
what do you think about it?

thank you :)

md
Blank Cone
Blank Cone
Posts: 66
Joined: 28 Jun 2005 11:03

Postby md » 14 Nov 2006 11:40

As The DJ pointed out, HTTP is not the way to go. The problem is that you have two independent freerunning clocks which after some time unavoidably create buffer underruns or overruns.

I'd recommend using MPEG2-TS over RTP which is the most robust implementation.

(BTW, I'm afraid with live555 library the clocksynchro algorithm is disabled and as such it's subject to the same problems as HTTP)

drus
Blank Cone
Blank Cone
Posts: 32
Joined: 27 Oct 2005 08:03
Contact:

Postby drus » 14 Nov 2006 12:27

As The DJ pointed out, HTTP is not the way to go. The problem is that you have two independent freerunning clocks which after some time unavoidably create buffer underruns or overruns.

I'd recommend using MPEG2-TS over RTP which is the most robust implementation.

(BTW, I'm afraid with live555 library the clocksynchro algorithm is disabled and as such it's subject to the same problems as HTTP)
hm. but if problem is in freerunning clocks on two different computers, than how can streaming protocol influence it?
how i can enable live555 in windows? i remember such library in linux, but i don't know it's functions.

md
Blank Cone
Blank Cone
Posts: 66
Joined: 28 Jun 2005 11:03

Postby md » 14 Nov 2006 13:34

The difference is in transport layer. HTTP uses TCP, while RTP uses UDP.

UDP is much less complicated than TCP and simply delivers the packet to the application as soon as it's received. This is an advantage, because by comparing the time when UDP packets were received with the timestamps inside the MPEG2 TS you can compute the clock difference and compensate the drift.

Live555 in included in windows versions - but it is not used for MPEG2 TS container.

drus
Blank Cone
Blank Cone
Posts: 32
Joined: 27 Oct 2005 08:03
Contact:

Postby drus » 16 Nov 2006 12:13

Answer. Don't use HTTP. It's not a streaming protocol. it's a file protocol.

RTSP or UDP/MPEG2TS are the only protocols that I recommend for streaming.
it really works even in windows, thank you ^_^
because by comparing the time when UDP packets were received with the timestamps inside the MPEG2 TS you can compute the clock difference and compensate the drift.

Live555 in included in windows versions - but it is not used for MPEG2 TS container.
does it mean that some other muxer will work fine with http? for example asf.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 11 guests