Audio and video learning

Now so popular audio and video, as a professional development program audio and video Yuan, how can I understand it, it embarked on a study of audio and video. For audio and video codecs for ios There are two main frame codecs FFmpeg and open later ios8 Apple VideoToolBox, FFmpeg codec is based on CPU, commonly known as soft-coded, and VideoToolBox is codec-based GPU, commonly known as hard-coded . Here is my main apple open VideoToolBox. Day small to give us audio and video

As a developer, there is a learning atmosphere with a circle of exchange is particularly important this is one of my iOS exchange group: 687 528 266, click on the link to join a group chat [iOS] Software Development Learning Exchange: https://jq.qq.com/ ? _wv = 1027 & k = 5wrTEZx whether you are white or Daniel welcome to enter, sharing BAT, a inside test questions, interview experience, technical discussions, to share learning and growing together!
Terminology
1. Low bit rate (Low Bit Rate): and the like MPEG2 and MPEG4 ASP compression technique compared to the same video quality, the amount of data using H.264 compression techniques, only the MPEG2 1/8, MPEG4 1 / 3.

2. The high-quality images: H.264 can provide continuous, smooth, high-quality images (DVD quality)

3. Fault-tolerant capability: H.264 provides the necessary tools to solve in an unstable network prone to packet loss and other errors.

4. Network adaptability: H.264 provides a network abstraction layer (Network Abstraction Layer), so that the file can be easily H.264 is transmitted on different networks (e.g. Internet, CDMA, GPRS, WCDMA, CDMA2000, etc.).

The high compression ratio, the compression ratio of H.264 staggering 102: 1.

A. The audio foundation review

Produces 1.1 sound

Relative to the video, this phenomenon can be observed. The audio in the learning process, they lack the space to imagine. But if starting from the principle, would not be so difficult.

What sound?

A sound wave, generated by the vibration of the object
3 1.2 acoustic wave element

Three elements of the acoustic wave, frequency, amplitude, waveform representative of the scale of frequency, amplitude representative of loudness, tone waveform represents.

The higher the frequency, the shorter the wavelength, while longer wavelength is a low-frequency sound, so Such sound around obstacles easier, less energy decay. Sound will spread farther.
Loudness, that is, the amount of energy feedback beat the desktop with a different intensity, size of the sound conversion is bound to happen. in life, we describe the loudness in decibels of sound.

Referring to FIG sound dB
== == Tips

DB (decibel), is a measure of sound intensity units, in dB, by the American inventor Alexander Graham Bell, named after the long-term acceptance of 50 db of noise at night, easily lead to cardiovascular disease;.... 55 db, will have a negative impact on children's learning; 60 db, people woke up; 70 db, the incidence of myocardial infarction increased by about 30%; more than 110 db, can lead to permanent hearing damage.

Voice, at the same frequency and loudness, different sounds emitted by an object is not the same, such as the piano and the voice zither completely different shape of the waveform determines timbre of the sound, because different waveforms generated by the different media. Will produce not the same sound.
1.3 sound propagation

The occurrence of sound from vibrating. Human speech, after vocal cords vibrate from the sound, reflecting the local area through the oral cavity, cranial cavity, etc., spread to others through the air in the ear. This is the process we are talking to hear.
Propagation of sound ., through the air, liquid, fixing the different propagation medium, may affect the sound propagation velocity.
sound-absorbing cotton: sense noisy sound reflections generated by the sound absorbing material may be used in selecting the attenuation of the reflected energy incident sound source, so that the original sound . fidelity will be used, such as sound-absorbing material on the studio wall
insulation: the main solution to reduce the transmitted energy penetrating sound sense of the main space of noisy, cotton insulation material can attenuate the incident sound so as to achieve a quiet state of body space, such as KTV wall. will be installed on the insulation wool material.
two digital audio

2.1 digitize the analog signal

Process the analog signal into a digital signal, respectively, sampling, quantization and coding.

Audio Sample

Model signal is sampled, sampling can be understood as the signal digitized on the time axis.

And, according to Nestor Theorem (sampling theorem), the frequency higher than the frequency of the sound at least twice the maximum sound sampled. This process is called AD conversion.

For example, the aforementioned high-quality audio signal whose frequency range is 20Hz-20KHz. The sampling frequency of 44.1KHz generally. This ensures that the sound reaches 20KHz sampling can also be digitized and the digitized sound after processing, sound quality is also not reduced .44.1KHZ, refers to the time one second is sampled 44100

Nyquist Theorem (sampling theorem) data

Quantization

Quantization, refers to the signal amplitude shaft digitized Simply put, is the data sound waveform is the number of bits of binary data, usually do units with 'bit. Such as 16-bit binary signal representative of a sampled sound which the range [-32768, 32767]. a total of 65536 values. as 16bit, 24bit. 16bit quantization levels recorded sound data is the binary number 16, and therefore, an important indicator of the quantization step is digital sound quality. We describe digital sound quality, usually described as 24bit (quantization level), 48KHz sampling, such as quality standard music CD is 16bit, 44.1KHz sampling.

Sound quantification

Since each quantization is a sampling, the sampling sound so much, how will the data be stored?

III. Coding

3.1 What is coding?

Certain format data recording sampling and quantization.

There are many audio coding format, usually bare of said audio data is pulse code modulation means (PCM) data.

If you want to describe a PCM data, you need from several directions as follows:

Vectorized format (sampleFormat)

Sampling rate (the sampleRate)

Number of channels (Channel)
3.2 encoded articles

Here I was mainly learning for me to do a video documenting coding, a technique is to look only to write, do not know to check:

  1. Raytheon audio and video Basics

  2. The basic principles of audio and video

3. the H264 (I frame determination Introduction and the NAL)

4. The mobile broadcast technology optimization experience second opening

Must read through all this video codecs have a rough idea, and an idea of the keywords stream / rate / bit rate / frame rate / resolution / high-definition difference

5. [how to quickly develop a complete broadcast iOS app (principle articles) ( http://www.cnblogs.com/Amoyios/p/5832953.html )

Armed with some basic knowledge of theory with practice it is, the code link address audio and video codec codes
above are purely theoretical but now into the real code analysis according to blog

1. The use of hard-coded H.264 VideoToolbox

2. VideoToolBox use the basic functions

Now so popular audio and video, as a professional development program audio and video Yuan, how can I understand it, it embarked on a study of audio and video. For audio and video codecs for ios There are two main frame codecs FFmpeg and open later ios8 Apple VideoToolBox, FFmpeg codec is based on CPU, commonly known as soft-coded, and VideoToolBox is codec-based GPU, commonly known as hard-coded . Here is my main apple open VideoToolBox. Day small to give us audio and video

Guess you like

Origin blog.csdn.net/shanshenyuyou/article/details/90440968