[streaming] Re: TS Discontinuities
Dermot McGahon
dermot at dspsrv.com
Tue Jun 21 14:33:24 CEST 2005
On Tue, 21 Jun 2005 12:33:46 +0100, James Yates
<james.yates at packetvision.com> wrote:
> When you start streaming, it is likely you will get a few
> discontinuities reported. A continuity counter is maintained for every
> PID which is incremented everytime a TS packet with a payload is sent.
> This is a 4 bit number so is in the range 0 to 0xF, it then wraps back
> to 0.
> The discontinuities at the beginning happen as LIBDVBPSI has to assume
> every count is at 0 although in practice they could be at any number in
> the valid range.
It might be possible to not expect zero but use the first value received
instead. Not a big deal though.
> Once the stream is playing, any discontinuity error
> reported will be as the result of losing a real packet, thus tieing in
> with you atrifacts on screen, probably missing or green blocks.
Yes, mostly green blocks.
> The warning shows you the countuer value received and what VLC is
> expecting, so for the first output it got 0 but was expecting 15 so you
> can say that it dropped 1 packet on that PID.
Ok.
> As for TS packets in UDP, TS packets are placed in UDP packets in their
> stream order, so 1 udp packet contains 7 TS packets but not necessarily
> from the same PID. Countintuity counter is only valid for a packet that
> contains a payload and also not for NULL packets (PID 0x1FFF).
Ah. Very helpful. I wasn't taking either null packets or the interleaved
streams into account.
> Have you used ethereal. Great programme for looking at this sort of
> thing. Can sniff the network and look at the stream. Also has a MPEG2
> plugin which will be very handy for you.
Will set it up. Don't want to interfere too much with the client. It's
fairly cpu bound as it is. We might use tethereal instead and do the
analysis off-line.
I needed to know what to look for however and you have been very helpful
in that regard. Thank you.
> As I understand it, there should be no packet reordering in UDP. The
> problems you are seeing are due to dropping UDP packets which on a
> network, particularly on wireless will happen.
We have a wired network. We have seen this when a unit inadvertently has
a duplicate IP address but also at other times.
Dermot.
--
--
This is the streaming mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://www.videolan.org/support/lists.html
More information about the streaming
mailing list