On Oct 15, 2009, at 3:07 PM, Baptiste Coudurier wrote:

OK, so it looks like the packet PTS coming from FFMPEG are in respect to
the time_base numerator. This is different than Quicktime and
Libquicktime, but understandable. It also isn't what's implied in the
docs or in the tutorials, IMHO.

So, for those coming after:

PTS_in_timescaleunits = packet_pts * time_base.num


A timebase in FFmpeg is a rational. So if you timebase is 100/2997, you will have 0, 1, 2, 3, 4, etc...

if your timebase is 1/2997, you will have 0, 100, 200.

Anything wrong in the docs which might imply otherwise ?

I found them ambivalent, based on other peoples interpretation of the same phrase (from source comments):

pkt->pts, pkt->dts and pkt->duration are always set to correct
 * values in AVStream.time_base units

In Quicktime and libquicktime at least 'in timebase units' implies that they are in ticks. It's a semantic difference in what that phrase means. Those other systems do use rationals as well, of course, but they don't include the frame number in the timebase. What confused me was when some timescales (apparently) behaved one way, some another.

So, not wrong per se, but a little clarification would improve it, especially since it's a bit different.

Bruce
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to