Java转码和操作mp3文件
我正在寻找一个java库来有效/快速地转码和操作mp3文件。 我正在开发一个复杂的流媒体服务器,它混合音乐并具有一些其他功能以允许用户彼此交互。 例如,推荐功能应该淡出发送用户到推荐接收者的流。
所有功能现已实现,并且使用 UPnP-AV 设备运行良好。 下一步不会像我现在那样简单地切换曲目。 歌曲之间应该是平滑的淡入淡出。
对此有何建议? Mayby java 不是处理声音的正确解决方案。 如果您知道进行音频转码和操作的更好方法,请告诉我。
(需要转码,因为并非所有音频源都可以用作 mp3,但在内部我只使用 MP3)
I am looking for a java library to efficently/fast transcodig and manipulation mp3 files. I am working on a sophisticated streaming server that mixes music and has some other functions to allow to users to interact with each other. A recommendation functonallity for example should fade over the stream of the sending user to the reciever of the recommendation.
All the fuctionallity is implemented right now and works well using UPnP-AV devices. The next step would be not to simply switch the tracks like I do it now. It should be a smooth fade between songs.
Any suggestions on that? Mayby java is not the right solution to work with sound. If you know a better way to do transcoding and manipuation of audio let me know.
(Transcoding is needed because not all audio sources are available as mp3 but internally I do work only with MP3)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最好的 MP3 编码器之一是 LAME。 有一个名为 LAMEOnJ 的 Java API 包装器,但它需要 JNIEasy 许可证,其免费版本有每 5 天重新下载一次。 坦率地说,我不知道为什么您想要在内部使用 MP3 而不是 WAV 文件; 这可能会需要更多的工作。 另外,还有专利问题。
总之,您最好使用 Java 声音 API。 有一个很好的开源软件包,名为 Tritonus。 Tritonus 仅支持 Linux 上的完整 API(特别是声音输出),但它们有一些有用的插件 可在任何平台上工作(包括 MP3 编码器,其质量我无法评价)。
One of the best MP3 encoders out there is LAME. There is an API wrapper for Java called LAMEOnJ, but it requires a JNIEasy license, the free version of which has to be redownloaded every 5 days. Frankly, I don't know why you'd want to work with MP3 internally as opposed to WAV files; it's probably going to be more work. Plus, there's the patent thing.
All around, you're probably better off working with the Java Sound API. There's a good open source package out there called Tritonus. Tritonus only supports the full API (specifically, sound output) on Linux, but they have some useful plugins that work on any platform (including an MP3 encoder, the quality of which I can't speak to).
或者使用 Xuggler 解码或编码 MP3 文件。 它在幕后使用 LAME,是开源 (LGPL) 且免费的,可以在 Mac、Windows 和 Linux 上运行。
Or use Xuggler to decode or encode MP3 files. It uses LAME under the covers, is open-source (LGPL) and free, and runs on Mac, Windows and Linux.