计算mp3帧的以毫秒为单位的长度 [英] Calculating the length of MP3 Frames in milliseconds
问题描述
可以说以字节为单位的MP3帧长为104:如何获取以毫秒为单位?有没有什么公式什么的做到这一点?
解决方案我用不同的方法来计算的MP3文件的每一帧的时间
浮法frameTime的= totalTimeMillisec / totalFrames;
您将获得在以毫秒为单位的轨迹每一帧的总时间... 之后,我做了,我得到了各地的52毫秒......这是类似于马克·希思说。
不管怎样谢谢大家的解决方案。
Lets say one MP3 Frame length in bytes is 104: how to get that in milliseconds? Is there any formula or something to do that?
I used different approach to calculate the time of every frame in the mp3 file.. assuming that all frames have same size in the file.. so I just get the total time of the mp3 file in milliseconds.. then calculate total frames in the file and finally divide the total time by total frames.. so the formula would look like:
float frameTime = totalTimeMillisec / totalFrames;
you will get the total time of every frame in the track in milliseconds.. after I done that I got around 52 milliseconds... and that was similar to what Mark Heath said..
anyway thanks everybody for the solutions..
这篇关于计算mp3帧的以毫秒为单位的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!