
Web Audio and Video Introduction Series: Audio and Video Basics

Since the 21st century, with the continuous improvement of network infrastructure, the popularization of 3G, 4G and even now 5G networks, the Internet has completely changed our lives.

In the past, to watch a movie at home, you needed to buy a DVD and a player. Now you can directly open the browser and go to major video websites to watch it, and there are very rich video resources for you to choose from. . At the same time, many application scenarios have emerged: teleconferencing, telemedicine, online education, etc. Many developers have also started developing their own real-time audio and video applications on the web platform. For this reason, I would like to share a series of contents related to the development of real-time audio and video on the web side, and learn with you. In this chapter, I will share some basic knowledge of audio and video. The level is limited. Welcome to point out bugs or make suggestions!
Audio
Sound that can be heard by the human ear can be called audio, and we often use this word to describe a recorded and playable sound. Next, I will introduce some important concepts related to audio. Includes sample rate, bit rate, and common audio encoding. These are the things we need to know to produce, store and transmit audio.
Sampling rate
Sample rate (also called sample rate or sample rate) defines the number of samples per second taken from a continuous signal to form a discrete signal, and is expressed in hertz (Hz). The inverse of the sample rate is called the sample period or sample time, which is the time interval between samples. Be careful not to confuse sample rate with bit rate (also known as “bit rate”). (taken from Wikipedia)
In simple terms, the most intuitive effect of sample rate on our listening to audio is the “clarity” or “degree of reduction” of the audio. In theory, the higher the sampling frequency during recording, the closer the frequency of the described sound wave is to the original sound, the more it can restore the original appearance of the sound, and the closer the listening experience is to hearing the sound in the original sound. place. However, the sampling rate that the human ear can generally distinguish also has an upper limit. After the sampling rate reaches the threshold that the human ear can distinguish, it is difficult for the human ear to hear the difference no matter how high the sampling rate is. is.
In general, the recording device determines an upper limit on the audio sample rate. In real life, making a phone call and playing a piece of high-definition music can reflect the difference in sampling rate. We can clearly hear that high-definition music is more “clear” and restores sound better. This is because the sample rate of telephone microphones is generally 8000 Hertz around, and a piece of music is recorded in a professional recording studio with specialized recording equipment, and the sample rate is usually in the tens of thousands of hertz.








/CBR-vs-VBR-069b3b5e6d554d53841e7e525092d25b.jpg)
