[FFmpeg-devel] PTS/DTS inaccuracy in PES

Michael Niedermayer michaelni
Mon Jan 5 19:25:50 CET 2009


On Mon, Jan 05, 2009 at 06:15:57PM +0200, Tomer Barletz wrote:
> Hi  everyone,
> Lately I've been working on the TS muxer from the gsoc repository, in
> order to fix some PCR timing issues.
> I've submitted a patch to fix these issues, and the output TS looks
> nice and accurate now.
> 
> However, I'm currently experiencing some problems with the (video) PES
> PTS/DTS accuracy.
> After analysing the PES, I can see significant irregularities with the
> stream - the PTS and DTS values looks correct at first, but they will
> lose accuracy exponentially very soon.
> 
> I've started to look at the code, and figured that the location where
> these values are calculated is at
> libavformat/utils.c::compute_pkt_fields; but this method is quite
> difficult to understand, specifically the blocks starting at 837, and
> 877 (I don't want to paste the code here, since it's pretty long).
> Can someone please shed some light on this?

compute_pkt_fields() is used on the demuxer side, not the muxer.

Also keep in mind H264 in MPEG-* is not supported. We are lacking
correct timestamp interpolation as described in H.222 & 264!
So if your problems are with H264 (you didnt say which codec) then
the problem is near certainly there.
If it is H264, the fix is to fix the AVParser for H.264 and
compute_pkt_fields() in the way its decribed in H.222/264 ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090105/10468f6b/attachment.pgp>



More information about the ffmpeg-devel mailing list