0

当通过 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)
4

1 回答 1

0

知道了。虽然在命令行上它有效。drawtext 中缺少子进程命令“C\:/Windows/Fonts/arial.ttf”。现在它适用于这些变化。

于 2012-07-19T05:24:13.207 回答