The frame rate calculation of MPEG4 code stream

Source: Internet
Author: User

MPEG4 the standard protocol.

The Vop_time_increment_resolution in the Vol head and the Vop_time_increment in the VOP head together determine the frame rate used by the code stream.

The Vop_time_increment_resolution in the Vol header, indicating the time resolution of the vop_time_increment. Its value actually represents the number of intervals 1 seconds are divided into.

The vop_time_increment in the VOP header, which is defined in vol 1/vop_time_increment_resolution seconds, gives the current VOP precise time based on Modulo_time_base. It has a value range of [0,vop_time_increment_resolution].

For simple calculations, the real-time frame rate of the bitstream should be equal to vop_time_increment_resolution/(the difference of each vop_time_increment).


The Fixed_vop_rate in vol indicates whether all VOP are encoded with a fixed frame rate. It is set to 1 only if any two consecutive VOP display intervals are constants.

Fixed_vop_time_increment: This code word describes the length of time between two vop in the display sequence, determined by vop_time_increment_resolution, equal to its reciprocal.

In this case, the fixed frame rate of the bitstream is given by Vop_time_increment_resolution/fixed_vop_time_increment.


For modulo_time_base in VoP, it consists of a 0 and a number of 1 immediately following it, each 1 representing 1 seconds. One 1 more behind each 1s,0.

The time in the gov header is shown as a benchmark.


The following are examples of standards.


When there is VLC receiving stream, the frame rate shows inconsistent with the actual frame rate.

Using Elecardstreameye to analyze the stream of frame rate 30, using VLC to receive is 60 or 30000.

It should be because VLC, when decoding, only cares about the value of vop_time_increment_resolution, not the value of vop_time_increment.


In practical applications, there are problems:

The frame rate is set at 25 frames, and the time in Gov is calculated as 25 frames in 1 seconds.

But the increment of vop_time_increment_resolution and Vop_time_increment is 60 and 2 respectively, is equal to 30 frames, the actual code rate is also controlled by 30 frames.

This needs to be modified from the beginning of the code.

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.