aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authortassaron2017-07-13 14:46:22 -0400
committertassaron2017-07-13 14:46:22 -0400
commitb7931572a73d408dceecc4b17b784a0338e0e35b (patch)
tree7f55cf08da0094698d53074c72f474206026d464 /src/components
parent8811b699a9c2d6b78af1e2a332d3031aef73aec4 (diff)
added option to include audio from Video components
Diffstat (limited to 'src/components')
-rw-r--r--src/components/video.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/components/video.py b/src/components/video.py
index 49bd145..53487b1 100644
--- a/src/components/video.py
+++ b/src/components/video.py
@@ -143,7 +143,6 @@ class Component(Component):
super().update()
def previewRender(self, previewWorker):
- self.videoFormats = previewWorker.core.videoFormats
width = int(previewWorker.core.settings.value('outputWidth'))
height = int(previewWorker.core.settings.value('outputHeight'))
self.updateChunksize(width, height)
@@ -156,8 +155,7 @@ class Component(Component):
def properties(self):
props = []
if self.useAudio:
- # props.append('audio')
- pass
+ props.append('audio')
if self.videoPath and not os.path.exists(self.videoPath):
props.append('error')
return props
@@ -168,7 +166,7 @@ class Component(Component):
"layer %s does not exist!" % str(self.compPos)
def audio(self):
- return (self.videoPath, {})
+ return (self.videoPath, {'map': '-v'})
def preFrameRender(self, **kwargs):
super().preFrameRender(**kwargs)
@@ -216,7 +214,7 @@ class Component(Component):
imgDir = self.settings.value("componentDir", os.path.expanduser("~"))
filename, _ = QtWidgets.QFileDialog.getOpenFileName(
self.page, "Choose Video",
- imgDir, "Video Files (%s)" % " ".join(self.videoFormats)
+ imgDir, "Video Files (%s)" % " ".join(self.core.videoFormats)
)
if filename:
self.settings.setValue("componentDir", os.path.dirname(filename))