ffmpeg-python icon indicating copy to clipboard operation
ffmpeg-python copied to clipboard

Request: Add option to suppress terminal creation for use with .pyw

Open nhansendev opened this issue 2 years ago • 1 comments

When running ffmpeg.probe (and probably other commands) subprocess.Popen will attempt to open a new terminal when .pyw is used. The intent with .pyw is that the program will run without any terminals appearing, so this is undesirable.

The fix I found is simply including creationflags=subprocess.CREATE_NO_WINDOW in the Popen command like so:

p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=subprocess.CREATE_NO_WINDOW)

Assuming there are use-cases where the terminal appearing is desirable, could a kwarg be added to turn them on/off, please?

nhansendev avatar Nov 21 '23 22:11 nhansendev

+1

exislow avatar Nov 11 '24 11:11 exislow