java代码mp3转ogg,Java-将ogg转换为mp3

这篇博客探讨了一位开发者如何在Java程序中实现从OGG文件到MP3的转换。他们寻找合适的库,如jorbis解码器和lameOnJ编码器,并计划在转换完成后设置文件标签。内容涵盖了使用外部执行文件、利用库进行处理以及可能的管道技术来避免中间文件存储。

I'm writing a Java program and I'd like to convert a ogg file into mp3 file.

I've spend a lot of time trying to find a good library to do that, but without success for the moment.

I think I'll need a ogg decoder (jorbis ?) and a mp3 encoder (lameOnJ ?).

Moreover, once the conversion is done, I need to set some tags in the file (artist/track tag, etc).

This is a windows and OS X app.

Could you give me any hint about how to process, with examples if possible.

Thanks

解决方案

You have lots of choices, and it depends on how much effort you want to put in, and what constraints you have regarding the execution platform.

Many developers would simply make System.exec() calls to external decode/encode/label executables, writing the intermediate files to disk. This is slightly clunky, but once it's set up properly, it works.

A more sophisticated

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值