I have this ffmpeg command:
ffmpeg -y -i 6.mp4 -vf scale=1280:-2,setsar=1:1 -c:v libx264 -c:a copy 720p.mp4
and I want to implement it via python code. for this I used subprocess function and I use the following code for this:
subprocess.call(['ffmpeg.exe','-y','-i', pname1,'-vf','scale=','1280:-2','setsar=','1:1','-c:v', 'libx264', '-c:a', 'copy', pname2])
pname1 and pname2 are the names of input and output files. this program is running without any error, but it produces nothing. do you know what is the problem?
check=Trueif you aren't going to store and inspect the returned object. Also, if you don't setstdout=subprocess.PIPEandstderr=subprocess.PIPEyou can't see what output was written from Python and thus need to inspect whatever stdout and stderr was inherited from the Python process itself.