[FFmpeg-user] PTS resolution
Mark Filipak (ffmpeg)
markfilipak at bog.us
Tue Feb 23 09:10:55 EET 2021
On 2021-02-23 01:38, Carl Zwanzig wrote:
>
> You missed mentioning the program clock reference (PCR) of the -ts. -And- many references to PTS
> directly say that it's contained in a -ts (which if the -ts contains a -ps, is correct).
The answers are in a GIF illustration (not text) in the H.262 spec, so searching the PDF doesn't
find any hits. From the GIF,
In the encoder:
STC (System Time Clock) is 27MHz.
PTC is (STC counter value)+(fixed buffer delay) that's written into the PS at the start of each
frame. [1]
PCR (Program Clock Reference) is (STC counter value) that's written into the TS (in the muxer) every
100ms.
In the decoder:
STC (System Time Clock) is 27MHz.
There are no counters in the decoder. There's a STC-PTS comparator to signal new frames and a
STC-PCR comparator to control the STC's phase lock loop.
[1] Why the GIF leaves out the by-300 PTS divider is a mystery, but I know it exists (i.e., PTS
resolution = 1/(27MHz/300).
>
>
>> The question is: What does ffmpeg use as its TB in the decoder and
>> pipeline?
>
> Read the source code? It's going to be in there somewhere.
But I don't like SPAM! -- I don't read 'C'.
More information about the ffmpeg-user
mailing list