[FFmpeg-user] PTS resolution

Mark Filipak (ffmpeg) markfilipak at bog.us
Tue Feb 23 08:20:02 EET 2021


On 2021-02-23 01:08, Mark Filipak (ffmpeg) wrote:
> On 2021-02-23 00:41, Carl Zwanzig wrote:
-snip-
>> ... 'Presentation time stamps have a resolution of 90kHz", so at 29.97fps the PTSs should be 
>> 3003.003... apart. Since they're whole numbers, that would be 3003, 6006, etc with an extra +1 
>> every 333 frames.
> 
> Are those MPEG SCR counts or ffmpeg TB counts? Let's see...
> 1001/30000 = 33.3[6..]ms.
> 1/90000 = 0.011[1..]ms.
> 33.3[6..]/0.011[1..] = 3003 (exactly), so you are a little bit off.

You know, MPEG uses a 90KHz SCR (27MHz/300) for a good reason. The reason is so that all valid frame 
rates (e.g. 30fps v. 30/1.001fps) come out as whole integers (not fractional).

The question is: What does ffmpeg use as its TB in the decoder and pipeline?


More information about the ffmpeg-user mailing list