当在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)
明白了。虽然在命令行上有效。子进程命令'C\:/Windows/Fonts/宋体.ttf'在drawtext中丢失。目前,它正在适应这些变化。在
相关问题 更多 >
编程相关推荐