Reputation: 31
When we want to mux audio and video into OutputContext, we must convert the time_base of AVPacekt. What I confused is why the time_base of output AVStream is (1, 90000)? For some historical reasons or another?
Upvotes: 1
Views: 390
Reputation: 31209
Streaming video codecs typically use a 90 Khz
(1 / 90000
) clock rate, or a higher frequency that is backwards compatible with this one, like the 27 MHz = 300 * 90 Khz
clock in MPEG-2
.
For MPEG-1
the value was chosen in accordance with a digital video standard recommendation from the 80's called the ITU-R
(ex CCIR
) 601
which was suitable for use with the 625/50 Hz
and 525/60 Hz
modes used in PAL
/NTSC
analogue broadcasts.
Using the sampling frequency for luminance (Y
) of 13.5 Mhz
from the aforementioned guideline they decided to use a 13.5 Mhz / 150 = 90 Khz
value which provided a good enough accuracy for decoding/presentation timestamps.
Source: Fundamentals and Evolution of MPEG-2 Systems: Paving the MPEG Road, Jan Van der Meer
Upvotes: 2