[FFmpeg-devel] PTS/DTS inaccuracy in PES

Michael Niedermayer michaelni
Tue Jan 6 15:57:01 CET 2009


On Tue, Jan 06, 2009 at 08:44:57AM +0200, Tomer Barletz wrote:
> Hi Michael,
> 
> On Mon, Jan 5, 2009 at 8:25 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > 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 ...
[...]
> >From your message, I understand that MPEG-2 video is supported.
> But yet, I see the same results when wrapping it in a PES.

well, you should elaborate on what exactly is wrong and provide some
test sample or if its reproduceabel with any pick one already on mphq
so we have the same sample ...


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- 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/20090106/d4d7c9fa/attachment.pgp>



More information about the ffmpeg-devel mailing list