ffmpeg子进程问题

时间:2012-07-06 12:34:06

标签: python ffmpeg subprocess

通过maya中的python脚本编辑器尝试时,这很好用。如何确保即使在通过脚本运行时也能成功运行

oneImage = "D:/imagesequence/dpx/brn_055.0000.jpg"
firstImage = "c:/users/nishith/appdata/local/temp/firstImage.jpg"
thumbnai = "c\:/users/nishith/appdata/local/temp/thumbnail.jpg"

paramf = "movie='%s' [watermark]; [in][watermark] overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/3[water];[water] drawtext=fontsize=32:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text='shotName':x=(w)/2:y=(h)-50,drawtext=fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text='Notes \:':x=(w)/5:y=(h)-90,drawtext=fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text='Frame Range \:':x=(w)/5:y=(h)-130,drawtext=fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text='Lens \:':x=(w)/5:y=(h)-170,drawtext=fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text='Undistortion \:':x=(w)/5:y=(h)-210,drawtext=fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text='Image Sequence \:':x=(w)/5:y=(h)-250,drawtext=fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text='Date \:':x=(w)/5:y=(h)-290,drawtext=fontsize=28:fontcolor=White:fontfile=/Windows/Fonts/arial.ttf:text='Element Name \:':x=(w)/5:y=(h)-330,drawtext=fontfile=/Windows/Fonts/arial.ttf:text='FIREWORKS':x=130:y=200:fontsize=54:fontcolor=White[out]" % thumbnai

d = subprocess.check_call(["ffmpeg", "-threads", "8", "-i", firstImage , "-vf", paramf , oneImage], shell=True)

1 个答案:

答案 0 :(得分:0)

得到了它。虽然在命令行上它工作。 drawtext中缺少子进程命令'C \:/ Windows / Fonts / arial.ttf'。现在,它处理了变化。

相关问题