ffmpeg子进程issu

2024-09-28 22:04:12 发布

您现在位置:Python中文网/ 问答频道 /正文

当在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)

Tags: text脚本windowsfontsttfjpgwhiteoverlay