[FFmpeg-devel] [SPAM] Re: Floating point dts, pts
jonathan at castus.tv
Mon Jan 23 08:37:04 CET 2012
You're assuming that floating point is 100% accurate. It's not, for the
same reasons a pocket calculator is not 100% accurate about the value of
If you need floating point, then do it in your program as (double)pts /
AVstream.rate.denominator. It's actually a lot more accurate if FFMPEG
uses rationals for timestamps and framerates. It's also how common file
formats like QuickTime and AVI represent frame rates.
> It will be great to have AVPacket dts and pts in floating point. For example for 30 fps we will have dts 0, 33.3333, 66.6666, ....
> This will make the frame period accurate and also we do not have to dither the dts from 33,33,34,33,33,34,...
> Any opinions?
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel