About definition for terms of audio codec -


When I was reading the coca audio queue document, I found several words in the audio codec Is defined in the structure.

Here are the conditions: 1. 1. Sample rate 2. Packet 3. 3. Frame 4. Channels

I have sample rate and < Know about the code> channel . Why was I confused by two others? What do the other two words mean?

In addition to this, you can answer this question by example. For example, I have a dual-channel PCM-16 source with a sample rate of 44.1kHz, which means that 2 * 44100 = 88200 bytes are PCM data per second. But about packet and frames

Thank you in advance!

You are already familiar with the sample rate definition. The sampling frequency or sampling rate, FS, is defined as the number of samples obtained in a second (samples per second), thus for the sampling rate of FS = 1 / T and 44100 Hz, you have 44100 samples per sample. Seconds (per audio channel).

The number of frames per second in the video is the same concept as the number of samples per second in the audio. Frame for our eyes, our ear samples extra Infos

If you have a 16-bit depth stereo PCM, then that means you have 16 * 44100 * 2 = 1411200 bits per second = & gt; ~ 172 kb per second = & gt; Approximately 10MB per minute.

For definitions from Apple:

  Sample: A number representing the value of an audio channel at one point at the same time. Frame: Group of one or more samples, with a sample for each channel, represents the audio on all channels at the same point on time. Packet: A group of one or more frames represents the smallest encoding unit of audio format, and audio for all channels in a small amount.   

As you can see, there is a subtle difference between audio and video frame ideas. You have stereo audio 44.1 KHz: 88200 samples and 44100 frames in a second.

Many frames in the compressed format packet such as MP3 and AAC packs (these packets can be written in MP3 files for example, they can be interfaced efficiently with video content). You understand that dealing with large packets helps to identify bit patterns for better coding efficiency.

MP3, for example, uses 1152 frames of packets, which is the basic nuclear unit of MP3 stream. PCM audio is just a series of samples, so it can be split into different frames, and there really is no packet size in it.

You can do 1024 (or 960) for AAC frames per packet. It has been described in Apple Document:

Pack of audio data In the number of frames for uncompressed audio, the value is 1. For variable bit-rate formats, the value is a fixed number, such as 1024 for AAC. For variables, a variable number of packet frames, such as Ogg Vorbis, set this field to 0.

In a MPEG-based file format, a packet is referred to as data frame (not being in conjunction with the previous audio frame hold). For more information on the subject, see Brad's comment.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -