이미지를 영상변환, 영상파일과 음악파일 합성 ffmpeg 명령 실행 파이썬 소스를 공유합니다
def call_ffmpeg():
datetime.today()
today = datetime.today().strftime("%Y%m%d")
subprocess.call('ffmpeg -f image2 -r 1/6 -i /home/ubuntu/images/coronastep/card_%d.png -vcodec mpeg4 -y /home/ubuntu/video/coronastep/merge_{}.mp4'.format(today), shell=True)
def merge_ffmpeg():
datetime.today()
today = datetime.today().strftime("%Y%m%d")
subprocess.call('ffmpeg -y -i /home/ubuntu/video/coronastep/merge_{}.mp4 -i /home/ubuntu/sound/After_You.mp3 -t 96 -c:v copy -c:a aac -strict experimental /home/ubuntu/video/coronastep/complated.mp4'.format(today), shell=True)
댓글