gpt4 book ai didi

python - 在 python 中使用具有多个值和相同参数的子进程

转载 作者:太空宇宙 更新时间:2023-11-03 16:18:46 25 4
gpt4 key购买 nike

这是我的命令

subprocess.call(["wine","MP4Box.exe","-add",outputdir+"tmp.m4a","-itags",'name=a',"-itags", "artist=b","-itags", "album_artist=c","-itags", "album=d","-itags", "created=2034","-itags", "genre=e","-new", "tmp23.m4a"])

在输出文件中,我只能获取流派,子进程仅发送最后一个“-itags”值。有什么方法可以实现此功能吗?

谢谢

最佳答案

outputdir = "output"

subprocess.call([
"wine", "MP4Box.exe", "-add", outputdir + "/tmp.m4a",
"-itags", "name={name}:artist={artist}:album_artist={album_artist}:album={album}:created={created}:genre={genre}".format(
name="a",
artist="b",
album_artist="c",
album="d",
created=2034,
genre="e"
),
"-new", "tmp23.m4a"
])

来自docs

请注意,标签不能包含 : 字符,因为这会破坏命令。

关于python - 在 python 中使用具有多个值和相同参数的子进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38673624/

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