"Scott" wrote in message news:cae0c71aggq6mhv8d...@4ax.com...
>So if the system is perfect how come the sound and vision are
>sometimes out of sync? Are you saying it has to be a problem with the
>broadcast not the receiver?
I think no system is ever perfect and lip sync errors can creep in almost
anywhere along the broadcast chain. My experience is that the coding and
multiplexing are now fairly reliable and a lot of effort has been put in to
understand and check all parts of the play-out and transmission chain.
However it can certainly go wrong and I understand that my old post that
Richard pointed to earlier turned out to be just such an occurrence.
However if the problem appears to go away with a power cycle, or just a
channel reselection of the receiver, then I believe that this probably
indicates some sort of issue in the receiver although it might, in rare
cases, be the receiver performance being challenged by some poor
configuration at the broadcaster.
The synchronisation of different service components is quite complex. It
takes a lot longer to code or decode the video than, say, either the audio
and subtitles components. The coder should be configured to make all the
components available to the receiver just before they are needed but it is
not all that easy because some frames of the video are sent out of order.
These are bidirectional frames that reference earlier or later frames for
improved codec performance. This implies that the decoder has to perform
some complex buffering to store component elements until they need to be
output.
As Richard has indicated the synchronisation is handled with some time
stamping. Samples of a 33bit counter running at 90khz (the 27MHz video
program clock divided by 300), called the Program Clock Reference, or PCR,
are embedded in the digital stream and this is used to synchronise a clock
in the coder and decoders. Values of this clock, set a little in the future
to allow for transmission and decode delays, are sent with each component to
say when the decoder should output that component. These are the
Presentation Time Stamps, or PTS. For the video there is also a Decoding
Time Stamp, or DTS, which tell the decoder when it needs to decode and store
a frame to be used as reference for an out-of-sequence but earlier presented
frame.
Normally this works very well but it is relying on the receiver to maintain
synchronisation of its buffers. I'm no expert in the design of receivers
but it seems that something, possibly impulsive interference, can interrupt
the stream enough for the receiver to loose track of its buffer
synchronisation without forcing it to fully reacquire the signal and relock
its timing.
There are other scenarios. For example it is possible that the broadcaster
has not configured his coders correctly and, say, the audio is being coded
early without any compensation for the much longer video coding time, then
although the audio has the correct time-stamps it might require more
buffering than is available in the decoder. The decoder then has no way of
maintaining synchronisation and from experience will just fall back to
output the components as soon as they are available.
These problems are always exceedingly difficult to diagnose and fix and
usually involve getting knowledgeable people to test the entire end-to-end
chain which of course might cross a few contract boundaries.
Apologies for such a long explanation, which I hope makes sense. I also
ought to point out that I have not been involved in this for over three
years since I retired in 2008 :).
Glyn