Disable ffmpeg logging and ignore stderr

This commit is contained in:
qeled
2015-12-11 20:17:01 +03:00
committed by Amish Shah
parent 506b425ca0
commit d8af1a49ae
2 changed files with 4 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ var AudioEncoder = (function () {
var self = this;
return new Promise(function (resolve, reject) {
var enc = _child_process2["default"].spawn(self.getCommand(), ['-i', "-", '-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1']);
var enc = _child_process2["default"].spawn(self.getCommand(), ['-loglevel', '0', '-i', '-', '-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1'], { stdio: ['pipe', 'pipe', 'ignore'] });
stream.pipe(enc.stdin);

View File

@@ -45,12 +45,13 @@ export default class AudioEncoder {
var self = this;
return new Promise((resolve, reject) => {
var enc = cpoc.spawn(self.getCommand(), [
'-i', "-",
'-loglevel', '0',
'-i', '-',
'-f', 's16le',
'-ar', '48000',
'-ac', 2,
'pipe:1'
]);
], {stdio: ['pipe', 'pipe', 'ignore']});
stream.pipe(enc.stdin);