来自 mp3 帧长的公式 [英] Formula from mp3 Frame Length

查看:86
本文介绍了来自 mp3 帧长的公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究 mp3 解码器,确定 mp3 帧长度(以字节为单位)的公式是

I am working on an mp3 decoder, the formula to determine the length, in bytes, of an mp3 frame is

FrameSize = 144 * BitRate / (SampleRate + Padding)

我找不到任何解释144"代表什么的地方.

I can't find anywhere that explains what the '144' represents.

有人知道吗?

推荐答案

144 代表总 bytes-per-frame.

  • MP3 文件通常编码为 MPEG-1 第 3 层.

  • MP3 files are generally encoded as MPEG-1 Layer 3.

在第 3 层类型中每帧有 1152 个样本.

There are 1152 samples per frame in type Layer 3.

1152 个样本/每字节 8 位 = 总共 144 个字节.

1152 samples / 8 bits-per-byte = 144 bytes total.

采用帧大小(以字节为单位)的公式:

Taking the formula for frame size (in bytes):

帧大小 = 144 * 比特率/(采样率 + 填充)

FrameSize = 144 * BitRate / (SampleRate + Padding)

我们可以看到(对于 192 比特率 @ 44.1 khz 的 MP3):

We can see (for MP3 with 192 bitrate @ 44.1 khz):

144 * 192/(44.1 + 0) = 每音频帧 626 字节(小数部分被忽略).

这篇关于来自 mp3 帧长的公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆