(turn) video bitrate, frame rate and resolution of the connection and difference

Source: Internet
Author: User

video bitrate, frame rate and resolution exactly which one affects the sharpness of the movie

Code rate: affect the volume, proportional to the volume: the larger the rate, the larger the volume, the smaller the rate, the smaller the volume.

The bitrate is the number of data bits transmitted per unit of time when data is transferred, typically in Kbps, or thousands per second. That is, the sampling rate (not equal to the sampling rate, the sampling rate is Hz, indicating the number of samples per second), the higher the sampling rate in unit time, the higher the precision, the more processed files are closer to the original file, but the file volume and sampling rate is proportional to the So almost all of the coding format is about how to use the lowest bit rate to achieve the least distortion, around this core derived from CBR (fixed code rate) and VBR (variable rate), "bit rate" is the distortion, the higher the rate of the more clear, the other is the picture rough and more mosaic.

Below is the sample rate of a WAV file to calculate the bitrate and file size, the file information displayed 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: Affect the smoothness of the screen, and the flow of the picture is proportional: the greater the frame rate, the more smooth the picture, the smaller the frame rate, the more the screen has a sense of beating. If the code rate is a variable, then the frame rate will also affect the volume, the higher the frame rate, the more screen per second, the need for the higher bit rate, the larger the volume.

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, proportional to the image size: the higher the resolution, the larger the image; the lower the resolution, the smaller the image.

Definition

In the case of a certain rate, the resolution is inversely proportional to the definition: the higher the resolution, the less clear the image, the lower the resolution, the clearer the image.
In the case of certain resolution, the code rate is proportional to the definition, the higher the code rate, the clearer the image, 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 CIF resolution of the image. According to the usual, 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 the lower bitrate will not affect the image quality, but will have an impact on 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, such as 29.97,
Notice that in the AVISTREAMINFO structure, the attributes are represented by integer variables, so decimals can only
Divide by two integers, which requires two integers (dwrate and Dwscale) to get the playback rate.
For example, the rate is 29.97, so you can use dwrate=2997,dwscale=100 to get
If the rate is 29.9, then you can use dwrate=299,dwscale=10 to get

The AVI file contains header information such as Avimainheader,avistreamheader, which has the following fields: Start, Length, scale, and rate, as described in the information:

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 bydwrateand Dwscale. 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 au Dio 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, so this file video frame rate is 25/1=25, available: Video duration: 4500/25=180 seconds. These few figures are easy to understand.

2.Audio avistreamheader:length=2812, scale=16000, rate=2, first see confused, read data repeatedly, careful analysis only understand: for PCM Audio, The nblockalign is equal to Dwsamplesize, 2, and each audio sample is two bytes, the size of each audio frame is 1024B, and Dwrate/dwscale is the sample rate: 16000/2=8000, therefore, the audio duration:

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

Transferred from: http://blog.csdn.net/ameyume/article/details/7308504

(turn) video bitrate, frame rate and resolution of the connection and difference

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.