AMR File Format:
AMR( AdaptiveMultiRate ) is an audio format which is extensively used in mobile devices in various applications ranging from normal audio player/recorder to VoIP kind of applications. AMR can be further categorized as
1) AMR-NB( NarrowBand )
2) AMR-WB( WideBand )
But in general terms, AMR refers to AMR-NB. The AMR file format (*.amr) has the following structure:
Each AMR file consists of a 6-byte header that identifies the file as AMR audio. This header is always set to: 0x23, 0x21, 0x41, 0x4D, 0x52, 0x0A. This is common across all AMR-NB files. If the header is not as it should be, the file is probably corrupted and should not be used.
From here( ie. from the 7th byte ) the AMR file consists of a whole number of packed frames of audio (into bandwidth inefficient, octet-aligned mode ). These frames each constitute 20ms of audio. Each frame can be encoded using any of the valid AMR-NB modes (0-7, 8 SID in DTX mode). Because the frames can be encoded at different rates, this method of encoding is called Adaptive Multi-Rate(AMR).
Each frame can be encoded using one of 8 varying levels of compression using various bitrates(AMR modes 0-7). Following are the various AMR modes and their corresponding bitrates:
Each frame consists of a 1-byte header, then the rest of the frame is audio data. The entire frame is fed into the AMR decoder (header too). The frame size can be deduced from the frame header.
The 2nd bit through 5th bit (counting the most significant bit as the first bit) comprise the CMR (Codec Mode Request), values 0-7 being valid for AMR. The top bit of the CMR can actually be ignored, though it is used when AMR forms RTP payloads. The lower 3-bits of the header are reserved and are not used. Viewing the header from most significant bit to least significant bit, the encoding is XCCCCXXX, where Xs are reserved (typically 0) and the Cs are the CMR.
Frame size of AMR modes in bytes (including the header byte) are shown below:
1. 概述
现在很多智能手机都支持多媒体功能,特别是音频和视频播放功能,而AMR文件格式是手机端普遍支持的音频文件格式。
AMR,全称是:Adaptive Multi-Rate,自适应多速率,是一种音频编码文件格式,专用于有效地压缩语音频率。
AMR音频主要用于移动设备的音频压缩,压缩比非常高,但是音质比较差,主要用于语音类的音频压缩,不适合对音质要求较高的音乐类音频的压缩。
下面是两个AMR示范文件,一个是新闻类,一个是歌曲,可以听出来,音乐类压缩成AMR格式后,音质大大降低。
编号 |
文件名 |
文件长度 |
时长 |
1 |
h.amr (歌曲) |
409KB |
04:21 |
2 |
zbc1217.amr< |