mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-08-17 17:50:00 +08:00
Merge pull request #6 from Depaulicious/patch-2
Allow arguments to be manually passed to ffmpeg/run wrappers
This commit is contained in:
commit
236dae617f
@ -104,7 +104,11 @@ def get_args(node):
|
|||||||
@operator(node_classes={OutputNode, GlobalNode})
|
@operator(node_classes={OutputNode, GlobalNode})
|
||||||
def run(node, cmd='ffmpeg'):
|
def run(node, cmd='ffmpeg'):
|
||||||
"""Run ffmpeg on node graph."""
|
"""Run ffmpeg on node graph."""
|
||||||
args = [cmd] + node.get_args()
|
if isinstance(cmd, basestring):
|
||||||
|
args = [cmd]
|
||||||
|
elif type(cmd) != list:
|
||||||
|
args = list(cmd)
|
||||||
|
args += node.get_args()
|
||||||
_subprocess.check_call(args)
|
_subprocess.check_call(args)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user