Fixed ffmpeg/avconv confusions

This commit is contained in:
hydrabolt
2015-11-08 16:40:40 +00:00
parent 36e40d1b35
commit ad536445d9
3 changed files with 6 additions and 4 deletions

View File

@@ -49,6 +49,7 @@ var AudioEncoder = (function () {
var p = cpoc.spawnSync(choice);
if (!p.error) {
console.log("found " + choice);
this.choice = choice;
return choice;
}
@@ -97,7 +98,7 @@ var AudioEncoder = (function () {
var self = this;
return new Promise(function (resolve, reject) {
var enc = cpoc.spawn("ffmpeg", ["-f", "s16le", "-ar", "48000", "-ac", "1", // this can be 2 but there's no point, discord makes it mono on playback, wasted bandwidth.
var enc = cpoc.spawn(self.getChoice(), ["-f", "s16le", "-ar", "48000", "-ac", "1", // this can be 2 but there's no point, discord makes it mono on playback, wasted bandwidth.
"-af", "volume=1", "pipe:1", "-i", file]);
enc.stdout.once("readable", function () {