Introduction to PCM file format __ Audio and video

Source: Internet
Author: User
PCM file: Analog audio signal via analog-to-digital conversion (A/D transform) directly formed binary sequence, the file has no additional file headers and file end flags. The Windows Convert tool converts files in PCM audio format to files in Microsoft WAV format. Brief introduction of pulse coded modulation PCM file format


Digital audio, in fact, is to digitize the sound. The most common way is to modulate PCM via pulse encoding (PULSE code modulation). The principle of operation is as follows. First we consider the sound passing through the microphone and converting it into a series of signals of voltage changes, as shown in Figure I. The horizontal coordinates of this picture are seconds, and the longitudinal coordinates are the voltage size. The way to convert such a signal to the PCM format is to use three parameters to represent the sound, which are:Number of channelsnumber of bits sampledAndSampling Frequency

Sample frequency:The sampling frequency, the number of times a sound sample is obtained per second. The higher the sampling frequency, the better the sound quality and the more realistic the sound reduction, but at the same time it accounts for more resources. Because the resolution of the human ear is very limited, too high frequency can not be distinguished. In the 16-bit sound card has 22KHz, 44KHz and other levels, of which 22KHz equivalent to the quality of ordinary FM broadcast, 44KHZ is the equivalent of CD quality, the current frequency of common sampling is not more than 48KHz.

number of sample bits:That is, sample value or sample value (that is, quantify the sample amplitude). It is used to measure the sound fluctuation of a parameter, it can be said that the resolution of the sound card. The larger the number, the higher the resolution, and the greater the ability to emit sound.
 
Number of channelsVery well understood, there is mono and stereo, mono sound can only use a horn audible (some also processed into two speakers output the same sound), stereo PCM can make two speakers are audible (general left and right channel division), more can feel the space effect.

The following diagram is used to see the concept of sample number and sampling frequency. Let's take a look at these pictures. The black curve in the figure is the PCM file recorded in the natural sound waves, the red curve is a PCM file output of sound waves, the horizontal axis is the sampling frequency; The ordinate is the number of sampling digits. The lattices in these graphs are gradually encrypted from left to right, first increasing the density of the horizontal axis and then increasing the ordinate density. Obviously, the smaller the unit of the horizontal axis, the smaller the interval between the two sampling moments, the more conducive to maintaining the original sound of the real situation, in other words, the greater the frequency of sampling the more guaranteed quality; Similarly, when the ordinate unit smaller is more conducive to the improvement of sound quality, that is, the larger the number of samples the better.

The number of sampling digits in the computer is typically 8 digits and 16 digits, but there is a point please note that 8 is not said to divide the ordinate into 8, but divided into 2 of 8 times, 256 copies; similarly 16 is to divide the ordinate into 2 16 times 65,536, while the sampling frequency is usually 11025HZ (11KHz), 22050HZ (22KHz), 44100Hz (44KHz) three kinds.

Sample Point T1 T2 T3 T4 T5 T6 T7 ... T16 T17 T18 T19 T20
Amplitude value 0011 0101 0111 1001 1011 1101 1110 ... 0110 0110 0101 0011 0000


          So, now we can get the formula for the capacity of the PCM file:
Storage = (Sampling frequency * sampling bits * Channel) * Time/8 (in bytes)

For example, the standard sampling frequency for digital laser discs (Cd-da, Red Book standard) is 44.lkHz, the sampling digit is 16 bits, the stereo (2 channel), can broadcast the frequency up to 22kHz sound almost without distortion, This is also the highest frequency sound that human beings can hear. Laser Disc One minute the amount of storage required for music is:
(44.1*1000*l6*2) *60/8=10,584,000 (bytes) =10.584mbytes
This number is the memory of the PCM sound file in the disk space on the hard disk.

The format of the computer audio file determines the quality of its sound, in daily life, telephones, radios, etc. are analog audio signals, that is, there is no concept of sampling frequency and number of bits, we can compare this:
           44khz,16bit's voice is called: CD quality;
          22KHz, 16Bit sound effect is similar to stereo (FM Stereo) broadcast, called: Broadcast quality;
          11kHz, 8Bit Sound, called: telephone quality.
          Microsoft's WAV files are one of the PCM codes.

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.