diff --git a/lib/node/video.js b/lib/node/video.js index 1598157..f4bee02 100755 --- a/lib/node/video.js +++ b/lib/node/video.js @@ -25,7 +25,7 @@ class FFVideo extends FFImage { * @private */ addInput(command) { - const { loop, delay } = this.conf; + const { loop, delay, startTime } = this.conf; if (loop) { const num = isNumber(loop) ? isNumber(loop) : -1; @@ -34,6 +34,7 @@ class FFVideo extends FFImage { command.addInput(this.getPath()); } if (delay) command.inputOption('-itsoffset', delay); + if (startTime) command.inputOption('-ss', startTime); } addOutput(command) { @@ -50,6 +51,10 @@ class FFVideo extends FFImage { this.conf.delay = delay; } + setStartTime(startTime) { + this.conf.startTime = startTime; + } + isReady() { return new Promise(resolve => resolve()); }