[Libav-user] Help to understand PTS, DTS, timebase
Leandro Moreira
leandro.ribeiro.moreira at gmail.com
Tue Nov 14 02:27:51 EET 2017
Thanks, Carl!!!
> PTS 0 1 2 3 (when it needs to be present, order)
> DTS 0 3 1 1(when it needs to be decoded)
Yes =(, you're right, it was supposed to be DTS 0 3 1 2 (assuming 0 is an
I-Frame, 1 and 2 were a B-Frames that depend on 3 and 3 is P-Frame).
This whole example is fictional in order for me to understand it better.
> As such, this is definitely not correct, raw H.264 streams do
> produce timestamps (that unfortunately can be wrong with
> FFmpeg).
Are these timestamps on the NAL SEI? In general, does the player
relies mostly on timing/sync info stored on codec rather than on
containers? How about the other CODECs like VP9?
Do you know how people decide what time base to use or how to increase PTS
each frame?
On Mon, Nov 13, 2017 at 10:11 PM Carl Eugen Hoyos <ceffmpeg at gmail.com>
wrote:
> 2017-11-14 0:07 GMT+01:00 Leandro Moreira <
> leandro.ribeiro.moreira at gmail.com>:
>
> > PTS 0 1 2 3 (when it needs to be present, order)
> > DTS 0 3 1 1(when it needs to be decoded)
>
> This is either wrong or misleading (or both):
> Every frame needs its own dts and dts cannot
> be equal for different frames.
>
> > (can be different due to B frames
> > and their need to know the future beforehand)
> >
> > PTS_TIME FRAME_N x TIMEBASE (when it needs to be played, a value that we
> can
> > use in some sorta way into seconds)
>
> > First of all, I assume that this information about when you will play a
> > frame nth is in the container, not on the codec, right?
>
> As such, this is definitely not correct, raw H.264 streams do
> produce timestamps (that unfortunately can be wrong with
> FFmpeg).
>
> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171114/5a76e0e3/attachment.html>
More information about the Libav-user
mailing list