Reputation: 880
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
.
Upvotes: 0
Views: 559
Reputation: 11881
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)
Upvotes: 1