aboutsummaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authortassaron2017-07-15 13:13:53 -0400
committertassaron2017-07-15 13:13:53 -0400
commitbcb8f27c2e4434d2296dcd66bf279b76ee0d0a4f (patch)
tree2a7f9df3eebbae8da4317516f84dfe7490b5d36a /src/core.py
parent62ab09e3f36dcaf6c1a4680dc6c4d048fb2e165c (diff)
use -t on inputs so ffmpeg knows when to stop filters
+ better feedback in cmd mode
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py
index 55bf261..4c12209 100644
--- a/src/core.py
+++ b/src/core.py
@@ -464,10 +464,11 @@ class Core:
except sp.CalledProcessError:
return "avconv"
- def createFfmpegCommand(self, inputFile, outputFile):
+ def createFfmpegCommand(self, inputFile, outputFile, duration):
'''
Constructs the major ffmpeg command used to export the video
'''
+ duration = str(duration)
# Test if user has libfdk_aac
encoders = toolkit.checkOutput(
@@ -516,10 +517,12 @@ class Core:
),
'-pix_fmt', 'rgba',
'-r', self.settings.value('outputFrameRate'),
+ '-t', duration,
'-i', '-', # the video input comes from a pipe
'-an', # the video input has no sound
# INPUT SOUND
+ '-t', duration,
'-i', inputFile
]
@@ -532,6 +535,7 @@ class Core:
for streamNo, params in enumerate(extraAudio):
extraInputFile, params = params
ffmpegCommand.extend([
+ '-t', duration,
'-i', extraInputFile
])
if 'map' in params and params['map'] == '-v':
@@ -632,7 +636,7 @@ class Core:
completeAudioArrayCopy[:len(completeAudioArray)] = completeAudioArray
completeAudioArray = completeAudioArrayCopy
- return completeAudioArray
+ return (completeAudioArray, duration)
def newVideoWorker(self, loader, audioFile, outputPath):
self.videoThread = QtCore.QThread(loader)