Apr-15-2017, 12:19 PM
os.system('ffmpeg -i file_path -r 30 -s 1280x720 -c:v libx264 -crf 23 -ac 1 file_path2')You need to replace file_path and file_path2 with actual values of file_path and file_path2 variables. Use some sort of string formating or variable substition, as snippsat posted. And you should follow his other advice too -
os.system()
is deprecated, use subprocess
. Checking if your file ends with ".MTS" and replacing it with ".mp4" for output file is good idea too.