0

I want to run command

ffmpeg -i movie.mp4 -vf scale=224:224 movie_224.mp4

to resize video using python language.

I have code for it:

import subprocess
sys_cmd = ["ffmpeg", "-i", "movie.mp4", "-vf", "scale=224:224", movie_224.mp4]
subprocess.check_call(sys_cmd, stdout=subprocess.DEVNULL)

I don't know why I am getting std output even if I have given the argument subprocess.DEVNULL.

2
  • Can it be that you are receiving stderr output? Commented Jul 31, 2018 at 10:59
  • No. It is regular ffmpeg output. Commented Jul 31, 2018 at 11:09

1 Answer 1

1

Tested it. For some reason it goes to stderr output. To fix it run this command

subprocess.check_call(sys_cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.