[dvblast-devel] PATCH: Avoid jitter in RTP timestamps

Marian Ďurkovič md at bts.sk
Tue Sep 29 17:48:54 CEST 2009


Hi Christophe,

On Tue, Sep 29, 2009 at 12:37:29AM +0200, Christophe Massiot wrote:
> I have taken a long time to review this patch. This is because it 
> seems fundamentally wrong, when calculating a reference clock, to 
> increase the jitter of the incoming PCRs. Taking them in the output 
> adds delay due to scheduling and packetization by the DVB layer.

I actually looked at this from another perspective:

- IP packet containing PCR should have RTPts exactly computed from that PCR
- for IP packets without a PCR, we could at best estimate RTPts, since
  the required timing info is not available

Based on the above, I haven't considered i_ref_wallclock to be a true 
reference clock for the TS, but just a reference point in output.c, which
helps to estimate RTPts for subsequent IP packets. Therefore, taking wallclock
references and computing deltas from them is best done at the same place
(output.c) as this in fact eliminates jitter you mentioned above. 

> However the problem you raised is real ; I have thought of ways to 
> fix it otherwise, but couldn't find a satisfying alternative. It 
> would probably involve rewriting the PCRs in the packets, which leads 
> to other problems such as VBV violation.

I believe it's much more important to keep the original PCRs than to have
perfect RTP timestamps, since the former are used for decoding while the
latter just for jitter calculations. In fact, before we switched to DVBlast
in August this year, we were still using VLS for DVB streaming just because
it kept the original MPEG-TS almost unaltered. I'd definitely prefer DVBlast
to continue this attitude, since timing generated on broadcast-grade equipment
is supposedly better than anything we could produce on a PC.


     With kind regards,

           M.


More information about the dvblast-devel mailing list