8000 Added parameter to set ffmpeg's working directory · Powercoder64/ffmpeg-python@96fb3ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 96fb3ff

Browse files
committed
Added parameter to set ffmpeg's working directory
1 parent 4cb7d26 commit 96fb3ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ffmpeg/_run.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def run_async(
199199
pipe_stderr=False,
200200
quiet=False,
201201
overwrite_output=False,
202+
cwd=None
202203
):
203204
"""Asynchronously invoke ffmpeg for the supplied node graph.
204205
@@ -282,7 +283,8 @@ def run_async(
282283
stdout_stream = subprocess.PIPE if pipe_stdout or quiet else None
283284
stderr_stream = subprocess.PIPE if pipe_stderr or quiet else None
284285
return subprocess.Popen(
285-
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream
286+
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream,
287+
cwd=cwd
286288
)
287289

288290

@@ -295,6 +297,7 @@ def run(
295297
input=None,
296298
quiet=False,
297299
overwrite_output=False,
300+
cwd=None
298301
):
299302
"""Invoke ffmpeg for the supplied node graph.
300303
@@ -318,6 +321,7 @@ def run(
318321
pipe_stderr=capture_stderr,
319322
quiet=quiet,
320323
overwrite_output=overwrite_output,
324+
cwd
321325
)
322326
out, err = process.communicate(input)
323327
retcode = process.poll()

0 commit comments

Comments
 (0)
0