gpt4 book ai didi

python - ffmpeg 子进程问题

转载 作者:行者123 更新时间:2023-12-04 23:30:57 29 4
gpt4 key购买 nike

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

最佳答案

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

关于python - ffmpeg 子进程问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11362292/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com