File tree 1 file changed +22
-6
lines changed
1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -431,15 +431,17 @@ module.exports = function(proto) {
431
431
return emitEnd ( err ) ;
432
432
}
433
433
434
+ const options = Object . assign ( {
435
+ captureStdout : ! outputStream ,
436
+ niceness : self . options . niceness ,
437
+ cwd : self . options . cwd ,
438
+ windowsHide : true
439
+ } , self . options . processOptions || { } ) ;
440
+
434
441
// Run ffmpeg
435
442
self . _spawnFfmpeg (
436
443
args ,
437
- {
438
- captureStdout : ! outputStream ,
439
- niceness : self . options . niceness ,
440
- cwd : self . options . cwd ,
441
- windowsHide : true
442
- } ,
444
+ options ,
443
445
444
446
function processCB ( ffmpegProc , stdoutRing , stderrRing ) {
445
447
self . ffmpegProc = ffmpegProc ;
@@ -640,6 +642,20 @@ module.exports = function(proto) {
640
642
return this ;
641
643
} ;
642
644
645
+ /**
646
+ * Add process options to spawn
647
+ *
648
+ * @method FfmpegCommand#withProcessOptions
649
+ * @category Processing
650
+ *
651
+ * @see [child_process.spawn](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)
652
+ * @return FfmpegCommand
653
+ */
654
+ proto . withProcessOptions = function ( options ) {
655
+ options = options || { } ;
656
+ this . options . processOptions = options ;
657
+ return this ;
658
+ } ;
643
659
644
660
/**
645
661
* Kill current ffmpeg process, if any
You can’t perform that action at this time.
0 commit comments