1

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?

1 Answer 1

2

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

2
  • majority of video codecs --> doesn't appear to be default for most codecs or containers. Not for MP4/MOV/MKV..etc
    – Gyan
    Apr 14, 2017 at 12:11
  • @Mulvya I was thinking streaming codecs, but you're right it's misleading.
    – aergistal
    Apr 14, 2017 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.