[FFmpeg-user] PTS resolution

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


On 2021-02-23 00:41, Carl Zwanzig wrote:
-snip-
> If you're starting with mpeg-ps or -ts, ...

There's no such thing as PTS in mpeg-ts. The transport stream sets the SCR (System Clock Reference) 
(aka TB) but the PTSs are in the presentation stream, stored as integer ticks of the SCR.

I've been told (at doom9.org) that MKV (which is a TS) stores PTSs but I find that hard to believe.

>... '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.

> Jim says: The PTS resolution is slightly under 1/30,000 second.
> 
> That suggests ffmpeg is only using 1/3 the resolution available to the mpeg formats, of am I 
> misunderstanding something? (I don't have time to dive into the code at the moment.)
> 
> 
> There's also some interesting stuff at
> http://dranger.com/ffmpeg/tutorial05.html
> http://cseweb.ucsd.edu/classes/sp03/cse228/ (old, but should be useful)
> 
> and
> "Understanding Timelines within MPEG Standards" (looks technically intense)
> https://ir.cwi.nl/pub/23650/23650B.pdf
> which I'll read in the next few days.
> 
> Later,
> 
> 
> z!
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


-- 
In the 1970s, a year at Ohio State Univ = 1 month of minimum wage earnings.
In the 2020s, a year at Ohio State Univ = 1+ year of minimum wage earnings.
In the 1970s, most jobs were manufacturing, corporate taxes were fair.
In the 2020s, most jobs are service, corporate taxes are nearly nonexistent.
The U.S. standard of living has plummeted; the wealth gap is now a canyon.
In the future, robots will supply the ultimate in slave labor.
The coming crisis is here. Beam me up, Scotty!


More information about the ffmpeg-user mailing list