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
  • 112,593
  • 23
  • 157
  • 280
Chris
  • 703
  • 6
  • 13
  • 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