Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 7e3e3d4

Browse files
authored
Merge pull request #943 from 8ai/8ai-patch-1
Hide console window on windows
2 parents 89e1548 + 712a117 commit 7e3e3d4

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/ffprobe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ module.exports = function(proto) {
152152

153153
// Spawn ffprobe
154154
var src = input.isStream ? 'pipe:0' : input.source;
155-
var ffprobe = spawn(path, ['-show_streams', '-show_format'].concat(options, src));
155+
var ffprobe = spawn(path, ['-show_streams', '-show_format'].concat(options, src), {windowsHide: true});
156156

157157
if (input.isStream) {
158158
// Skip errors on stdin. These get thrown when ffprobe is complete and

lib/processor.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,9 @@ module.exports = function(proto) {
439439
{
440440
captureStdout: !outputStream,
441441
niceness: self.options.niceness,
442-
cwd: self.options.cwd
443-
},
442+
cwd: self.options.cwd,
443+
windowsHide: true
444+
},
444445

445446
function processCB(ffmpegProc, stdoutRing, stderrRing) {
446447
self.ffmpegProc = ffmpegProc;
@@ -557,7 +558,7 @@ module.exports = function(proto) {
557558
async.each(
558559
flvmeta,
559560
function(output, cb) {
560-
spawn(flvtool, ['-U', output.target])
561+
spawn(flvtool, ['-U', output.target], {windowsHide: true})
561562
.on('error', function(err) {
562563
cb(new Error('Error running ' + flvtool + ' on ' + output.target + ': ' + err.message));
563564
})
@@ -618,7 +619,7 @@ module.exports = function(proto) {
618619
if (this.ffmpegProc) {
619620
var logger = this.logger;
620621
var pid = this.ffmpegProc.pid;
621-
var renice = spawn('renice', [niceness, '-p', pid]);
622+
var renice = spawn('renice', [niceness, '-p', pid], {windowsHide: true});
622623

623624
renice.on('error', function(err) {
624625
logger.warn('could not renice process ' + pid + ': ' + err.message);

0 commit comments

Comments
 (0)