diff --git a/ffmpeg/_run.py b/ffmpeg/_run.py index c9cbb7c..bebf178 100644 --- a/ffmpeg/_run.py +++ b/ffmpeg/_run.py @@ -199,6 +199,7 @@ def run_async( pipe_stderr=False, quiet=False, overwrite_output=False, + cwd=None ): """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 stderr_stream = subprocess.PIPE if pipe_stderr or quiet else None 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, quiet=False, overwrite_output=False, + cwd=None ): """Invoke ffmpeg for the supplied node graph. @@ -318,6 +321,7 @@ def run( pipe_stderr=capture_stderr, quiet=quiet, overwrite_output=overwrite_output, + cwd ) out, err = process.communicate(input) retcode = process.poll()