[FFmpeg-devel] PTS/DTS inaccuracy in PES
Tomer Barletz
barletz
Tue Jan 6 07:44:57 CET 2009
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 ...
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> I am the wisest man alive, for I know one thing, and that is that I know
> nothing. -- Socrates
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFJYlCuYR7HhwQLD6sRAl+XAJ9aE2j4D/snGtdGeVgYXvspCmRd7wCdFk8n
> QS7Ng/Jjo4r3pdWtIJP1H/Y=
> =yKlH
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
>From your message, I understand that MPEG-2 video is supported.
But yet, I see the same results when wrapping it in a PES.
I should also mention that I can play the video correctly using ffplay
or mplayer, but not with VLC or an IP STB.
More information about the ffmpeg-devel
mailing list