About timestamp issues in RTP

Source: Internet
Author: User

About timestamp issues in RTP

Timestamp unit: The unit in which the timestamp is calculated is not a unit of seconds, but a unit that is replaced by the sampling frequency, so that the purpose is to be more precise in the timestamp unit. For example, if an audio sample frequency is 8000HZ, we can set the timestamp unit to 1/8000.
Timestamp increment: The time difference (in timestamp units) between adjacent two RTP packets.

How do I set the increment between timestamps?
According to the time stamp unit, 1 seconds according to the timestamp unit is 8000, then a second if you can play 20 frames, that is, send 30 frames (frame rate), then you can find the time difference between two adjacent frames, that is, timestamp increment, then it is obvious that 8000/ 20, then this timestamp increment is 400.
An example of most of the online examples are: MPEG, 20ms per frame, sample frequency 8000Hz, set timestamp unit 1/8000, and 160 increments between each package
How do you understand it here? It is easy to see that the increment is directly 8000 multiplied with 20ms results, we can know that the time between two frames is 20ms, that is, 0.02s, this unit is measured in seconds, then we have to use time-stamp units to indicate that is 8000*0.02=160. So the timestamp increment is 160.

Why do you usually use 90000 as the video sampling frequency?
90k is the time scale for video synchronization (timescale), which is 90k clock ticks per second. Why use 90k? At present, the frame rate of video is mainly 25fps, 29.97fps, 30fps and so on, and 90k is just a multiple of them, so it adopts 90k. (Note: This is not quite right, 27KMHZ, 300 divide)

About timestamp issues in RTP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.