修剪记录器波形开头的位
我有一个 flash 10.1 应用程序,可以让我在没有媒体服务器的情况下将麦克风输入录制到 wav 中,并将其保存到 Amazon S3 存储桶中。
我有另一个进程在服务器上运行,它从该存储桶获取 wavs,使用 LAME 转换为 mp3 并将它们放入另一个存储桶中。这一切都工作正常,但在转换 wav > 时mp3,我的声音中添加了大约 0.1 秒左右的静音。
在所使用的应用程序中,完美同步至关重要,因此我需要修剪掉这一点。如果我必须将其从原始波形中修剪掉,那也没关系,我不希望在第一秒内发生任何重要的事情。
解决这个问题的最佳方法是什么?我正在使用 Adobe 的 WavWriter
将 ByteArray 转换为正确的波形。有没有一种方法可以轻松地从 ByteArray 中删除前几个样本而不会使结构无效?
或者,是否有一个好的服务器端工具可以在通过 LAME 运行之前使用它来修剪 wav,或者我可以给出 LAME 的参数?或者,我什至可以在转换后将 mp3 中的声音修剪掉吗?
谢谢!
I've got a flash 10.1 app that lets me record microphone input to a wav without a media server, which I am saving to an Amazon S3 bucket.
I have another process running on a server which gets wavs from this bucket, converts to mp3 using LAME and puts them into another bucket. This all works fine, but in converting wav > mp3, about 0.1sec or so of silence is added to my sound.
In the application this are being used in, perfect sync is critical, so I need to trim off that little bit. If I have to trim it off the original waveform that is okay, I don't expect anything important to happen in that first fraction of a second.
What is the best way to go about this? I am using Adobe's WavWriter
to convert by ByteArray into a proper waveform. Is there a way I can easily trim off the first few samples from my ByteArray without invalidating the structure?
Alternatively, is there a good server-side tool I can use to trim the wav before running it through LAME, or an argument I can give LAME? Or, could I even trim that sound off the mp3 after it has been converted?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题在于 MP3 格式本身。 MP3要求文件是一定倍数的长度,LAME在静音中添加了满足这个标准。
有一个解决方法,请查看Andre Michelle 的这篇文章
The problem is with the MP3 format itself. MP3 requires files to be a certain multiple of length, and LAME adds in the silence to meet this standard.
There is a workaround, check out this post by Andre Michelle
保存后,我能够使用 mp3splt 服务器端来缩小差距
I was able to trim the gap off with mp3splt server-side after saving