[FFmpeg-devel] [SPAM] Re: Floating point dts, pts

Jonathan Campbell 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 
1/3.

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?
>
> Chanchal
>   		 	   		
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



More information about the ffmpeg-devel mailing list