0

Hello I am sure this has been answered before, but I cant find the correct search terms to find it.

I would like to run a command in a sub process and check the output, but I dont want to see it in the terminal window.

I want to check a file with ffprobe and return the response in a way where I can see...

if "video" in ffprobe_output:
    print ("True")
else:
    print ("False")

But while hiding it from printing in the console.

martineau
  • 119,623
  • 25
  • 170
  • 301
Chris
  • 985
  • 2
  • 7
  • 17
  • 2
    Use this as a template (it's for FFMPEG as well), just pipe out `stderr` as well: [Python capture subprocess output](https://stackoverflow.com/questions/36364956/python-capture-subprocess-output) – zwer May 20 '21 at 01:43
  • Thanks. I got it working – Chris May 20 '21 at 12:22

0 Answers0