diff options
| -rw-r--r-- | src/core.py | 8 | ||||
| -rw-r--r-- | src/video_thread.py | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/core.py b/src/core.py index d72760d..3f0a6ad 100644 --- a/src/core.py +++ b/src/core.py @@ -527,20 +527,20 @@ class Core: ] if extraAudio: unwantedVideoStreams = [] - for compNo, params in enumerate(extraAudio): + for streamNo, params in enumerate(extraAudio): extraInputFile, params = params ffmpegCommand.extend([ '-i', extraInputFile ]) if 'map' in params and params['map'] == '-v': # a video stream to remove - unwantedVideoStreams.append(compNo + 1) + unwantedVideoStreams.append(streamNo + 1) if unwantedVideoStreams: ffmpegCommand.extend(['-map', '0']) - for compNo in unwantedVideoStreams: + for streamNo in unwantedVideoStreams: ffmpegCommand.extend([ - '-map', '-%s:v' % str(compNo) + '-map', '-%s:v' % str(streamNo) ]) ffmpegCommand.extend([ '-filter_complex', diff --git a/src/video_thread.py b/src/video_thread.py index 9ce9cc8..b0562db 100644 --- a/src/video_thread.py +++ b/src/video_thread.py @@ -54,18 +54,18 @@ class Worker(QtCore.QObject): audioI = self.compositeQueue.get() bgI = int(audioI / self.sampleSize) frame = None - for compNo, comp in reversed(list(enumerate(self.components))): - if compNo in self.staticComponents: - if self.staticComponents[compNo] is None: + layerNo = len(self.components) - compNo + if layerNo in self.staticComponents: + if self.staticComponents[layerNo] is None: # this layer was merged into a following layer continue # static component if frame is None: # bottom-most layer - frame = self.staticComponents[compNo] + frame = self.staticComponents[layerNo] else: frame = Image.alpha_composite( - frame, self.staticComponents[compNo] + frame, self.staticComponents[layerNo] ) else: # animated component |
