Video bitrate, which is linked to the difference between frame rate and resolution

Source: Internet
Author: User

Video bit rate, which frame rate and resolution affects the transparency of the film


Rate: The amount, and proportional to the volume: a larger rate. Large size. A smaller speed. A smaller volume.

The rate is the transmission of data bits per unit of time, in general, we use thousands per second in units Kbps. Sampling rate (not equivalent to the sample rate, the sample rate is the unit of Hz, indicating the number of samples per second). The greater the sampling rate per unit time, the higher the accuracy. The closer the file is to the original file, the larger the file size is proportional to the sampling rate. So almost all of the coding format is focused on how to use the lowest bit rate to achieve the least distortion, around the core derived from CBR (fixed rate) and VBR (variable bitrate). "Bit rate" is the distortion, the higher the rate of the more clear. Conversely, the picture is coarse and multi-mosaic.


The following is the sample rate of a WAV file to calculate the code rate and file size. The file information shown through the MediaInfo tool is as follows:

Profile

Full Name: Audio\wav\adele-rolling_in_the_deep.wav

File format: Wave

File size: 38.3 MiB

Length: 3 minutes 47 seconds

Average blend bitrate: 1 411 Kbps

Audio

id:0

File format: PCM

Format settings, Endianness:little

Encoding Settings Id:1

Encoding Setup ID/hint information: Microsoft

Length: 3 minutes 47 seconds

Code rate: 1 411.2 Kbps

Channel: 2 channel

Sample rate: 44.1 KHz

Bit depth: 16 bits

Size: 38.3 MiB (100%)

1. Code Rate Calculation formula:

bitrate = Sample rate x-bit depth X-Channel

So, the bitrate of the above file = 44.1Khz x 16 bit x 2 channel = 1411.2 Kbps

2. File size = bitrate x duration = 1411.2 Kbps x (3 x + +) s = 1411.2Kbps x 227s

=38102.4 Kb

38102.4 kb/1024 kb/m = 37.2M

Approximately equals the MediaInfo tool displays a file size of 38.3M.

Note: This calculation formula is valid for uncompressed WAV format files, not for compressed files such as MP3.


Frame rate: Affects the smoothness of the screen, proportional to the smoothness of the picture: the greater the frame rate. The more smooth the picture. The smaller the frame rate. The more the screen has a sense of beating. Assuming the code rate is a variable, the frame rate also affects the volume, and the higher the frame rate, the more images per second. The higher the required code rate. The larger the volume is.

The frame rate is the number of frames in a picture transmitted in 1 seconds, or it can be understood that the graphics processor can refresh several times per second,


Resolution: Affects the image size. is proportional to the image size: the higher the resolution, the larger the image, and the lower the resolution the smaller the image.


Definition

In the case of a certain rate of code. Resolution is inversely proportional to sharpness: the higher the resolution, the less clear the image, the lower the resolution, and the clearer the image.
In the case of certain resolution, the code rate is proportional to the definition. The higher the bitrate, the clearer the image, and the lower the bitrate, the less clear the image.

Bandwidth, frame rate

For example, the transmission of the image on the ADSL line, the upstream bandwidth is only 512Kbps, but to transmit 4-way CIF resolution of the image. According to the conventional, CIF resolution recommended code rate is 512Kbps, then according to this calculation can only be transmitted all the way, reducing the bitrate will inevitably affect the image quality. In order to ensure image quality, it is necessary to reduce the frame rate, so that even reducing the bitrate will not affect the image quality, but it will affect the image coherence.


avi frame rate dwscale,dwrateTransferred from: http://yixiangongzhu.blog.163.com/blog/static/19736320320111123111753465/

MSDN says Dwrate/dwscale is the playback rate.
The number of frames played per second in the video may not be integers. For example, it could be 29.97.
Notice in the AVISTREAMINFO structure. So the attributes are all represented by integer variables, so decimals can only
is divided by two integers, which requires two integers (dwrate and Dwscale) to get the playback rate.
For example, the rate is 29.97. Then you can use dwrate=2997,dwscale=100 to get
Suppose the rate is 29.9. Then you can use dwrate=299,dwscale=10 to get

In the AVI file includes Avimainheader,avistreamheader and other header information, which has the following fields: Start, Length, scale, rate, the information is described:

In Avimainheader:

The dwstart and dwlength fields specify the starting time of the AVI file and the length of the file. The units is defined bydwrate andDwscale. The dwstart field is usually set to zero.

The dwscale and dwrate fields is used to specify, the general time scale, the file would use. In the addition to the time scale, the each stream can has its own time scale. The time scale in samples per second are determined by dividing dwrate by Dwscale.

In Avistreamheader:

Dwscale is used together with dwrate to specify the time scale, the this stream would use.

Dividing dwrate by Dwscale gives the number of samples per second.

For video streams, this rate should is the frame rate.

For audio streams, this is should correspond to the time needed fornblockalign bytes of audio, which for PCM Audio simply reduces to the sample rate.

To understand, let's take an actual AVI file to analyze:

1.Video avistreamheader:length=4500, scale=1, rate=25. Therefore, the video frame rate for this file is 25/1=25 and available: Video duration: 4500/25=180 seconds.

These few numbers are easy to understand.

2.Audio avistreamheader:length=2812, scale=16000, rate=2, first look at confused, repeated reading data, careful analysis only clear: for PCM Audio, nBlockAlign is equal to dwsamplesize. For 2, and for each audio sample it is two bytes, each audio frame size 1024B, and Dwrate/dwscale is the sample rate: 16000/2=8000, therefore, the audio duration:

(2812 * 1024/2)/(16000/2) = 179.968 second.




Video bitrate, which is linked to the difference between frame rate and resolution

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.