amr编码格式
1.amr codec種類
amr一般是指amr-nb,即8kHz采樣,有8種比特率的編解碼算法。另外有amr-wb,即16kHz采樣,9種比特率的編碼算法。由于amr-wb采樣率高,所以復(fù)雜度大概是amr的兩倍。amr和amr-wb都屬于speech codec,對(duì)audio的編碼效果并不好,為了提高對(duì)audio的編碼效果,出現(xiàn)了amr-wb+。amr-wb+可以支持更高的采樣率,對(duì)speech和audio采用不同的編碼算法,對(duì)speech采用ACELP編碼,對(duì)audio采用變換編碼。amr-wb+在低比特率上對(duì)audio的編碼效果與he aac+相當(dāng)。amr-wb+包含amr-wb,但復(fù)雜度更高。
2.amr-nb
The AMR codec is a multi-mode codec that supports 8 narrow band speech encoding modes with bit rates between 4.75 and 12.2 kbps. The sampling frequency used in AMR is 8000 Hz and the speech encoding is performed on 20 ms speech frames. Therefore, each encoded AMR speech frame represents 160 samples of the original speech.
amr-nb支持8種比特率,分別是4.75, 5.15, 5.9, 6.7, 7.4, 7.95, 10.2, 12.2kbps。
amr-nb的采樣率為8000Hz,即每秒采樣8000次,也就是采樣8000個(gè)samples。每一幀的間隔是20ms,所以1秒采樣50幀數(shù)據(jù)。所以每一幀數(shù)據(jù)包含8000 / 50 = 160個(gè)samples。
3.amr-wb
Similar to AMR, the AMR-WB codec is also a multi-mode speech codec. AMR-WB supports 9 wide band speech coding modes with respective bit rates ranging from 6.6 to 23.85 kbps. The sampling frequency used in AMR-WB is 16000 Hz and the speech processing is performed on 20 ms frames. This means that each AMR-WB encoded frame represents 320 speech samples.
AMR-WB支持9種比特率,分別是6.6, 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05, 23.85kbps。
amr-nb的采樣率為16000Hz,即每秒采樣16000次,也就是采樣16000個(gè)samples。每一幀的間隔是20ms,所以1秒采樣50幀數(shù)據(jù)。所以每一幀數(shù)據(jù)包含16000 / 50 = 320個(gè)samples。
音頻數(shù)據(jù)幀大小的計(jì)算:amr 一幀對(duì)應(yīng)20ms,那么一秒有50幀的音頻數(shù)據(jù).由于比特率不同,每幀的數(shù)據(jù)大小也不同.如果比特率是12.2kbs.那么每秒采樣的音頻數(shù)據(jù)位數(shù)為:12200 / 50 = 244bit = 30.5byte,取整為31字節(jié).取整要四舍五入,再加上一個(gè)字節(jié)的幀頭,這樣數(shù)據(jù)幀的大小為32字節(jié).
錄制5s 的amr音頻大約需要 32 x 50 x 5 = 8KB (一幀32字節(jié),一秒50幀)
總結(jié)
- 上一篇: ecstore mysql_ECStor
- 下一篇: Telerik Test Studio