The relationship between RTP timestamp and frame rate and clock frequency

Source: Internet
Author: User
The RTP timestamp is calculated at clock rate to represent the time.

RTP timestamp represents the time per frame, since one frame (such as I-frame) may be divided into multiple RTP packets, so that multiple RTP timestamp of the same frame are equal. (The frame can be distinguished by the last RTP marker flag per frame, but the most reliable method is to view the same RTP timestamp package as the same frame.) )

Increment of RTP timestamp between two frames = clock frequency/frame rate

Where the clock frequency can be obtained from the SDP, such as:

M=video 2834 RTP/AVP 96
a=rtpmap:96 h264/90000

Its clock frequency is 90000 (usually the clock frequency of the video), if the video frame rate is 25fps, then the RTP timestamp increment value between adjacent frames = 90000/25 = 3600.

In addition, usually the audio clock frequency is generally 8000.

The calculation relationship between RTP timestamp and the playback time NPT can be found in how to calculate the NPT time by RTP timestamp during RTSP playback (http://blog.csdn.net/jasonhwang/article/details/7316168).

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.