我一直使用这个命令行来创建一个比特率: 32kBit /s,采样率: 22050 Hz的mp3:
"lame -b 32 --resample 22050 input.wav output.mp3"现在我想使用SoxSharp,它有一个mp3选项并使用libmp3lame.dll,所以我想它应该可以工作。
但是,我无法计算出正确的参数。
下面列出了mp3输出的可用参数。
Using nSox As Sox = New Sox("d:\dev\projects\sox-14-4-0\sox.exe")
nSox.Output.Type = FileType.MP3
nSox.Output.SampleRate = I guess that would be 22050 in my case?
nSox.Output.Channels = 1 'yep, I want mono
nSox.Output.Encoding = // not sure what to make of it
nSox.Output.SampleSize = // not sure what to make of it
nSox.Output.ByteOrder = // I guess I shouldn't touch that
nSox.Output.ReverseBits = // I guess I shouldn't touch that
nSox.Output.Compression = // absolutely not sure what I should choose here
nSox.Process("input.wav", "output.mp3")
End Using有人知道我应该在哪里插入我的"32“吗?在我的例子中,.SampleRate = 22050是否正确??如果我操作正确,Windows文件属性对话框不会给我任何真正的提示,Audacity会将音频转换为我的项目格式。
非常感谢你的帮助!
发布于 2018-08-28 13:53:33
研究一下SoxSharp的源代码,它甚至不能处理最基本的开箱即用的lame命令。基本上,所有内容都必须放在"CustomArguments“属性中。
https://stackoverflow.com/questions/52046247
复制相似问题