Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ffmpeg/_probe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import sys
import subprocess
from ._run import Error
from ._utils import convert_kwargs_to_cmd_line_args
Expand All @@ -17,7 +18,11 @@ def probe(filename, cmd='ffprobe', timeout=None, **kwargs):
args += convert_kwargs_to_cmd_line_args(kwargs)
args += [filename]

p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
creation_flags = 0
if sys.platform == "win32":
creation_flags = subprocess.CREATE_NO_WINDOW

p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=creation_flags)
communicate_kwargs = {}
if timeout is not None:
communicate_kwargs['timeout'] = timeout
Expand Down
7 changes: 7 additions & 0 deletions ffmpeg/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import copy
import operator
import subprocess
import sys

from ._ffmpeg import input, output
from .nodes import (
Expand Down Expand Up @@ -284,6 +285,11 @@ def run_async(
stdin_stream = subprocess.PIPE if pipe_stdin else None
stdout_stream = subprocess.PIPE if pipe_stdout else None
stderr_stream = subprocess.PIPE if pipe_stderr else None

creation_flags = 0
if sys.platform == "win32":
creation_flags = subprocess.CREATE_NO_WINDOW

if quiet:
stderr_stream = subprocess.STDOUT
stdout_stream = subprocess.DEVNULL
Expand All @@ -293,6 +299,7 @@ def run_async(
stdout=stdout_stream,
stderr=stderr_stream,
cwd=cwd,
creationflags=creation_flags,
)


Expand Down