FFmpeg Base Library (ii) audio format

Source: Internet
Author: User
Tags file size id3 tag advantage

1.2.1 Common formats
Common audio formats are: CD format, WAVE (*. WAV), AIFF, AU, MP3, MIDI, WMA, RealAudio, VQF, Oggvorbis,
AAC, APE.

CD
The audio quality of the CD format is relatively high. So to speak the audio format, CD is naturally the leading pioneer. In most playback software, the "hit
Open file Type ", you can see the *.CDA format, which is the CD track. Standard CD format is 44.1K sampling frequency, rate 88k/
Seconds, the 16-bit quantization bit, because the CD track can be said to be approximately lossless, so its sound is basically loyal to the soundtrack, so if you are a tone
The CD is your first choice if you are an enthusiast. It will make you feel the sounds of nature. CD discs can be played in CD player, and can be used in all kinds of computer
Playback software to replay. A CD audio file is a *.CDA file, which is just an index information that does not really contain the sound information, so do not
On the length of CD music, the ". cda file" Seen on the computer is 44 bytes long. Note: You cannot directly copy the. cda file in CD format to
On your hard disk, you will need to use a track software like the EAC to convert a CD-formatted file to WAV, which is a conversion process if the optical drive
And the EAC's parameters are set properly, it can be said that basically lossless capture audio. It is recommended that you use this method.

WAVE
WAVE (*. WAV) is a sound file format developed by Microsoft Corporation that conforms to the Piffresource Interchange File format specification,
The Audio information resource that is used to save the Windows platform, supported by the Windows platform and its applications. “ *. WAV "format support
MSADPCM, CCITT A Law and other compression algorithms, support a variety of audio bits, sampling frequency and channels, standard format WAV files and CDs
Format, also 44.1K sampling frequency, rate 88k/seconds, 16 bit quantization bit, see, WAV Format sound file quality and CD phase
Poor, but also the current PC widely popular sound file format, almost all audio editing software are "know" WAV format.
AIFF
AIFF (Audio Interchange File format) format and AU format, they are very similar to WAV, in most of the audio editing software
They are also supported in several common music formats.
AIFF is an abbreviation for the Audio Interchange file format. is an audio file format developed by Apple, which is the MACINTOSH platform and its
Supported by the program, LiveAudio also supports AIFF format in the NETSCAPE browser. So everyone is not common. AIFF is Apple Apple Computer
The standard audio format above is part of the QuickTime technology. This format is characterized by the fact that the format itself is independent of the meaning of the data and therefore
Microsoft's favor, and accordingly developed the WAV format. AIFF is a very good file format, but since it is a lattice on an Apple computer
The PC platform has not been very popular. However, since Apple computers are used in the multimedia production and publishing industry, almost all
Both audio editing software and playback software support the AIFF format in more or less. As long as the Apple computer is still there, AIFF will always have a place. Because
AIFF's containment features, so it supports many compression techniques.

AU
Audio file is a digital audio format introduced by SUN Corporation. The AU file was originally a digital sound file under the UNIX operating system. Because
Earlier WEB servers on the Internet were primarily UNIX-based, so the files in AU format are also commonly used in today's Internet
Sound file format.
MPEG
MPEG is an acronym for the dynamic Image Expert group. This expert group was founded in 1988 and is dedicated to creating video and audio compression standards for CDs.
MPEG audio files refer to the sound portion of the MPEG standard, which is the MPEG audio layer. The current music format on the INTERNET is MP3 most often
See. Although it is a lossy compression, its greatest advantage is that it has a high compression ratio with minimal sound distortion. MPEG contains formats including:
MPEG-1, MPEG-2, Mpeg-layer3, MPEG-4
MP3
The MP3 format was born in Germany in the 80 's, so-called MP3 refers to the audio portion of the MPEG standard, which is the MPEG audio layer.
According to the compression quality and the different encoding processing is divided into 3 layers, corresponding to the ". Mp1"/". MP2"/"*.mp3" of the 3 sound files. Need to remind big
Home Note is: MPEG audio file compression is a lossy compression, MPEG3 audio encoding with 10:1~12:1 high compression rate, while
Basically keep the low audio part undistorted, but sacrificing the quality of the 12KHz to 16KHz high audio in the sound file in exchange for the size of the file, the
Music files of the same length, stored in. mp3 format, generally only 1/10 of. wav files, and sound quality is secondary to the audio in CD format or WAV format
File. Because of its small file size and good sound quality, so at the beginning of its inception there is no other audio format can rival, thus the *.mp3 format
Provide good conditions for development. Until now, this format is still rage, and the status as the mainstream audio format is hard to shake. But the tree is a big recruit
Wind, MP3 Music copyright issues have been unable to find a solution, because MP3 no copyright protection technology, plainly speaking is who can use.
There are many sampling frequencies for compressed music in MP3 format, which can be used to save space with 64Kbps or less sampling frequency, or 320Kbps
To achieve a very high sound quality. With the MP3 encoder with Fraunhofer IIS Mpeg Lyaer3 (now the most effective encoder) MusicMatch

Jukebox
6.0 encode a 3-minute song at 128Kbps and get 2.82MB of MP3 file. Using the default CBR (fixed sampling frequency) technology
A song can be sampled at a fixed frequency, while a VBR (variable sampling frequency) can increase the frequency of sampling when the music is "busy" to obtain higher
Sound quality, but the resulting MP3 file may not play on some players. Set the VBR level to the sound quality of the previous CBR file
Basically, the generated VBR MP3 file is 2.9MB.
MP3 is the most user-lossy digital audio format to be used in the 2008. It is the full name of MPEG (MPEG:
Movingpictureexpertsgroup) AudioLayer-3, when it first appeared, its coding technique was not perfect, it was more like a coding standard framework, left to people
To perfect. The early MP3 encoding used a fixed encoding rate (CBR), and the 128KBPS saw that it was represented by a 128KBPS solid
Fixed data rate encoding-you can increase this encoding rate, up to 320KBPS, the sound quality will be better, naturally, the size of the file will increase correspondingly.
Because the MP3 encoding method is open, it can be compressed by selecting different acoustic principles on the basis of this standard framework, so
The Xing company soon introduced a variable encoding rate (VBR). Its principle is to use the complex part of a song with a high bitrate code, Jane
Single part with low bitrate code, in this way, further achieve the unity of quality and volume. Of course, the VBR algorithm of the early Xing encoder is
The sound quality is far from the CBR (fixed bitrate). However, this algorithm indicates a direction, and other developers have introduced their own VBR algorithm,
So that the effect has been improved. It is now well-known that the LAME is the best, it perfectly implements the VBR algorithm, and it is completely free software,
and the development team composed of enthusiasts has been constantly developing and perfecting.
On the basis of VBR, LAME more developed ABR algorithm. ABR (averagebitrate) average bit rate, which is an interpolation of VBR
Parameters. LAME this encoding pattern for CBR's poor file volume ratio and variable VBR generation file size. ABR in the specified
File size, with every 50 frames (30 frames about 1 seconds) for a segment, low frequency and insensitive frequencies using relatively low flow rates, high frequency and large dynamic performance when used
High flow, which can be used as a tradeoff for VBR and CBR.
Soon after the advent of the MP3, with this higher compression than 12:1 and better sound quality to create a new field of music, but the openness of MP3 is the most
Inevitably led to the dispute over copyright, in such a context, the document is smaller, better sound quality, but also to effectively protect the copyright of the MP4 should be shipped
and was born. MP3 and MP4 In fact there is no inevitable connection, first MP3 is a kind of audio compression international technical standards, and MP4 is a
The name of the trademark.

MPEG-4
The MPEG-4 standard is a video compression standard for multimedia applications published by the International Movement Imaging Expert Group in October 2000. It uses a
Object-based compression coding technology, the video sequence is analyzed before encoding, the individual video objects are segmented from the original image, and then respectively
The shape information, motion information, texture information of each video object are coded separately, and the motion prediction and motion compensation are better than MPEG-2 to remove the connected
The time redundancy between the continued frames. The core is content-based scale variability (content-basedscalability), which assigns priority to individual objects in the image
High spatial and temporal resolution of objects that are not very important, such as the background of a monitoring system, at a lower resolution,
Not even shown. Therefore, it has the ability of adaptive resource allocation, and can achieve high quality and low rate image communication and video transmission. MPEG-4 with its high quality
and low transmission rate have been widely used in network multimedia, video conferencing and multimedia monitoring and other image transmission systems. Most of the Chinese and foreign
Mature MPEG-4 applications are PC-based client and server models that are not used on embedded systems and most embedded
MPEG-4 decoding system mostly uses the commercial embedded operating system, such as WINDOWSCE, VxWorks, etc., the cost is high, the flexibility is poor. such as an embedded
Linux as the operating system is not only easy to develop, and can save costs, and can be cut according to the actual situation, occupy less resources, flexibility, network
Good network performance and wider application range.

MIDI

MIDI (musical Instrument digital Interface) format is used by people who often play music, MIDI allows digital synthesizers and other devices to cross
Exchange data. The MID file format is inherited by MIDI. The MID file is not a recorded sound, but rather a record of the sound, and then tells
A set of instructions for how the sound card reproduces music. Such a MIDI file only uses about 5~10KB for every 1 minutes of music. The MID file is primarily used for raw
Musical instruments, amateur performances of pop songs, game tracks and electronic greeting cards. The effect of the mid file replay depends entirely on the sound card's grade: Mid-grid
The greatest use of the formula is in the field of computer composition. *.mid files can be written with the composer software, or through the MIDI port of the sound card to play the external sequencer
The music is entered into the computer and made into a *.mid file.

WMA
The WMA (Windows Media Audio) format is a heavyweight player from Microsoft, with a strong background and better quality than the MP3 format, much more than
RA format, which is the same as the VQF format developed by the Japanese YAMAHA company, is to reduce the data flow but to maintain the sound quality method to achieve than MP3 pressure
With a higher shrinkage rate, the compression rate of WMA can generally reach around 1:18, and another advantage of WMA is that content providers can use DRM
(Digital rights Management) scenarios such as Windows Media rights Manager 7 add anti-copy protection. This built-in copyright protection technology
Can limit the playing time and the number of plays and even play the machine and so on, this is a pirated mess of the music company is a gospel, and another
External WMA also supports audio streaming (stream) technology, suitable for online playback on the network, as Microsoft's pioneering network music pioneers can be said to be technology-led
First, the Thunder is strong, more convenient is not like MP3 need to install additional players, while the Windows operating system and Windows Media Player
Seamless bundle allows you to play WMA music directly as soon as you install the Windows operating system, and the new version of Windows Media Player7.0 is
Added the ability to convert CD discs directly to WMA sound format, and WMA is the default encoding in the new operating system Windows XP
Format, you know Netscape encounter, now "Wolf" came again. WMA This format allows you to adjust the sound quality while recording. Same format,
Good sound quality can be comparable to CD, high compression rate can be used for webcasts. Although the Internet is not very popular now, but in Microsoft's large-scale promotion
has been more and more site recognition and support, in the field of network music *.mp3, in the network broadcast, also is the partition of Real
Lay the world. As a result, almost all audio formats feel the pressure of the WMA format.
Microsoft has officially announced that the WMA format is extremely protective and can even limit the number of playback machines, playback times and
Copyright protection capabilities. It should be said that the introduction of WMA is to MP3 no copyright restrictions on the shortcomings of the--ordinary users may welcome this
Format, but as the copyright owner of the record company, they prefer the hard copy of the music compression technology, and Microsoft's WMA to take care of
The needs of these record companies.
In addition to copyright protection, WMA has been deepened in compression ratios, with the goal of making the file volume smaller in the same sound conditions (when
However, only in the case of MP3 below 192KBPS bit rate is effective, in fact, when using LAME algorithm compression MP3 format, higher than 192KBPS
The reflection is that the MP3 sound better than WMA).

RealAudio
RealAudio is mainly used for online music appreciation on the Internet, and now most users are still using 56Kbps or lower rate modems,
So the typical playback is not the best sound quality. Some download sites will prompt you to choose the best Real file based on your Modem rate. The text of real
There are several main formats: RA (RealAudio), RM (RealMedia, RealAudio G2), RMX (RealAudio Secured), and
More. These formats are characterized by varying the quality of the sound depending on the bandwidth of the network, ensuring that most people hear a smooth sound, making the band
More affluent listeners get better sound.
Recently, with the general improvement of network bandwidth, Real company is introducing the format of CD quality for network broadcast. And if your RealPlayer
The software cannot handle this format, it will remind you to download a free upgrade package. Many music sites provide a listening version of the song in the Real format.
Now the latest version is RealPlayer 9.0, the 39th issue of the computer newspaper RealPlayer 9.0 also made a detailed introduction, here no longer repeat.

VQF
Yamaha Another format is *.VQF, its core is to reduce the data flow but to maintain the sound quality method to achieve a higher compression ratio, VQF audio
The compression ratio is nearly one-fold higher than the standard MPEG audio compression rate, which can reach about 18:1 or higher. That means putting a 4-minute song (WAV
file) to MP3, about 4MB of hard disk space, and the same song, if you use VQF Audio compression technology, it only needs
About 2MB of hard disk space. As a result, MP3 and RA are not VQF opponents in terms of audio compression ratios. VQF files after compression in the same situation
Smaller than MP3 small 30%~50%, more convenient for online communication, while excellent sound quality, close to CD quality (16-bit 44.1kHz stereo). Can say technology
is also very advanced, but due to poor publicity, this format is difficult to find. *.VQF can be played with the Yamaha player. At the same time Yamaha also mentioned
Software for converting from. wav files to. vqf files. This document lacks features plus a lack of publicity.
When the VQF at 44KHz, 80kbit/s audio sampling rate compression music, its sound quality is better than 44KHz, 128kbit/s MP3, when VQF to 44KHz,
96KBIT/S's frequency compression, its sound quality is almost equal to 44KHz, 256kbit/s MP3. Audio files that have been SOUNDVQ compressed are played back
When the test is heard, almost no one can hear the difference between it and the original audio file.

VQF audio file formats
Playback VQF requires a computer to be configured for only Pentium 75 or higher, of course, if you use a Pentium 100 or above machine, VQF can run more
and excellent. In fact, the CPU requirement for playback VQF is only about 5~10% higher than Mp3.
VQF-TWINVQ technology, although developed by NTT and YAMAHA, is free of charge for their application software. Just NTT and YAMAHA.
The source code for VQF is not published.

The

oggvorbis
Oggvorbis is a new audio compression format, similar to an existing music format such as MP3. But a little different is that it is completely free, open
and without patent restrictions. Vorbis is the name of this audio compression mechanism, and OGG is the name of the program, which intends to design a fully
Open multimedia system. The plan now only achieves the oggvorbis part. The
Oggvorbis file has an extension of *. OGG. The design format of this file is very advanced. This file format can be continuously sized and improved with the
sound quality without affecting the old encoder or player. The
VORBIS uses lossy compression, but the same bit rate (bitrate) encoded OGG
sounds better than MP3 by using more advanced acoustic models to reduce losses. In addition, there is a reason that the MP3 format is protected by patents. If you want to use the MP3 format to publish your own
work, you will need to pay royalties to Fraunhofer (the company that invented MP3). And VORBIS has no such problem at all.
for fans, the significant benefit of using OGG files is that you can get superior sound quality with smaller files. Moreover, since Ogg is completely
open and free, the production of Ogg files will not be subject to any patent restrictions, and it is expected that a large number of encoders and players can be obtained. This is why MP3
Encoders are so small and mostly commercial software, because Fraunhofer charge royalties. Vorbis uses a mathematical principle that is completely different from the MP3
, so the challenges of compressing music are different. The same bit rate encoded Vorbis and MP3 files have the same sound quality. The

The

Vorbis has a well-designed, flexible annotation that avoids cumbersome operations like the ID3 tag of MP3 files; Vorbis also has bit rate scaling:
You can adjust the bit rate of a file without recoding it. Vorbis files can be divided into small chunks and edited with sample granularity, Vorbis supports multiple channels,
Vorbis files can be logically connected, and so on.
Amr
Amr full Adaptive multi-rate, adaptive multi-rate encoding, mainly used for mobile device audio, compression compared to larger, but relative to other
compression format quality is poor, because more for the voice, call, the effect is very good.
Category
1. AMR: Also known as AMR-NB, compared to the following WB, the Voice bandwidth range: 300-3400hz, 8KHz sampling
2. Amr-wb:amr wideband,
Voice bandwidth range: 50-7000hz 16KHz sampling
"AMR-WB" is all called "Adaptive Multi-rate-wideband", or "adaptive multi-rate wideband encoding", sampling frequency 16kHz is a
Broadband speech coding standard, also known as the G722.2 Standard, adopted by the ISO-T and 3GPP. AMR-WB provides a voice band
wide reach of 50~7000hz, the user can subjectively feel the voice than before the more natural, comfortable and easy to distinguish.
compared to this, now GSM EFR (enhenced full rate, enhanced total speed encoding) sampling frequency of 8kHz, voice bandwidth of 200~
3400Hz. The advantage of the
AMR-WB for narrowband GSM (full Speed Channel 16k, GMSK) is that it can be used from 6.6kb/s, 8.85kb/s and 12.65kb/s three codec
codes, when the network is busy c/i deterioration, the encoder can automatically adjust the encoding mode, thereby enhancing Qos. In this application, the AMR-WB immunity is better than that of the
Amr-nb. The
AMR-WB applies to edge, 3G to fully demonstrate its advantages. Sufficient transmission bandwidth guarantee AMR-WB can be used from 6.6kb/s to 23.85kb/s
Nine kinds of encoding, voice quality beyond PSTN fixed telephone.

1.2.2 comparison
as a standard for digital music file formats, the WAV format is too large to be used very easily. So, in general, we compress it
to MP3 or WMA format. Compression methods include lossless compression, lossy compression, and compositing compression. Mpeg,jpeg is a hybrid compression, if the compression of the
contraction of the data back, the data is actually not the same. Of course, the human ear is indistinguishable. Therefore, if the MP3, OGG format from the compressed form of the
State to restore back, there will be a loss. However, the APE format retains its original sound without loss, even if it is restored. Therefore, the APE can be compressed and restored without compromising the
high quality. Under the premise of completely maintaining the sound quality, the APE's compression capacity has been properly reduced. Take one of the most common 38MBWAV
files for example, compressed into APE format is about 25MB, less than the beginning of 13MB. And MP3 capacity is growing today, 25M song
is not a big monster. In 1GB MP3 can put 4 CD, that is more than 40 songs, is enough. The
MP3 supported formats are MP3 and WMA. MP3 because it is lossy compression, so the sampling rate, is generally 44.1KHZ. In addition, there is bit rate,
that is, data flow, generally 8-320kbps. In MP3 encoding, also see if it supports variable bit rate (VBR), now out of the MP3 machine most of the
is supported, which can reduce the volume of valid files. WMA is an audio format that is pushed by Microsoft, and is relatively smaller than the MP3 volume.

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.