mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-04-05 04:22:51 +08:00
Added parameter to set ffmpeg's working directory
This commit is contained in:
parent
4cb7d26f55
commit
96fb3ff050
@ -199,6 +199,7 @@ def run_async(
|
|||||||
pipe_stderr=False,
|
pipe_stderr=False,
|
||||||
quiet=False,
|
quiet=False,
|
||||||
overwrite_output=False,
|
overwrite_output=False,
|
||||||
|
cwd=None
|
||||||
):
|
):
|
||||||
"""Asynchronously invoke ffmpeg for the supplied node graph.
|
"""Asynchronously invoke ffmpeg for the supplied node graph.
|
||||||
|
|
||||||
@ -282,7 +283,8 @@ def run_async(
|
|||||||
stdout_stream = subprocess.PIPE if pipe_stdout or quiet else None
|
stdout_stream = subprocess.PIPE if pipe_stdout or quiet else None
|
||||||
stderr_stream = subprocess.PIPE if pipe_stderr or quiet else None
|
stderr_stream = subprocess.PIPE if pipe_stderr or quiet else None
|
||||||
return subprocess.Popen(
|
return subprocess.Popen(
|
||||||
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream
|
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream,
|
||||||
|
cwd=cwd
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -295,6 +297,7 @@ def run(
|
|||||||
input=None,
|
input=None,
|
||||||
quiet=False,
|
quiet=False,
|
||||||
overwrite_output=False,
|
overwrite_output=False,
|
||||||
|
cwd=None
|
||||||
):
|
):
|
||||||
"""Invoke ffmpeg for the supplied node graph.
|
"""Invoke ffmpeg for the supplied node graph.
|
||||||
|
|
||||||
@ -318,6 +321,7 @@ def run(
|
|||||||
pipe_stderr=capture_stderr,
|
pipe_stderr=capture_stderr,
|
||||||
quiet=quiet,
|
quiet=quiet,
|
||||||
overwrite_output=overwrite_output,
|
overwrite_output=overwrite_output,
|
||||||
|
cwd
|
||||||
)
|
)
|
||||||
out, err = process.communicate(input)
|
out, err = process.communicate(input)
|
||||||
retcode = process.poll()
|
retcode = process.poll()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user