andrewrk / andrewrk/node-sox

Transcode mp3 to ogg failes

未关闭
#5 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
62
派生
22
PR 合并指标
30 天内没有已合并 PR

描述

While trying to transcode a mp3 file to ogg using the following code...

```
var job = sox.transcode('src.mp3', 'dest.ogg', {
sampleRate: 44100,
format: 'ogg',
channelCount: 2,
bitRate: 192 * 1024,
compressionQuality: -1
});
```

I get the following error...

```
{ [Error: sox returned nonzero exit code: 2]
code: 2,
stdout: '',
stderr: 'sox FAIL formats: can\'t open output file `dest.ogg\': Vorbis compression quality nust be between -1 and 10\n',
args:
[ '--guard',
'--magic',
'--show-progress',
'src.mp3',
'-r',
44100,
'-t',
'ogg',
'-C',
191,
'-c',
2,
'dest.ogg' ] }
```

Which is due to the following code...

```
'-C', Math.round(self.options.bitRate / 1024) +
self.options.compressionQuality,
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。