cmd = "ffmpeg -i {} -vf \"scale=720:-1,pad=720:750:(720-iw)/2:(720-ih)/2:black,crop=720:720:iw/2-(720/2):ih/2-(720/2)\" -y {} ".format(self.video_path+file, self.video_clean_path+file+"_crop.mp4")
横屏转竖屏 竖屏转横屏
参考
ffmpeg -i input.mp4 -vf ‘scale=-1:720,pad=1280:720:(1280-iw)/2:0:black’ -c:v libx264 -crf 21 -preset veryfast -aspect 16:9 -c:a copy -f mp4 output.mp4 -y