1

这是我的命令

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”值。无论如何要让这个工作?

谢谢

4

2 回答 2

1
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"
])

文档

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

于 2016-07-30T12:02:55.340 回答
0

根据他们的文档,参数应该像这样传递

-itags 标签1 [:标签2]

所以你可以尝试这样做

subprocess.call(["wine","MP4Box.exe","-add",outputdir+"tmp.m4a","-itags","name=a:artist=b" ...
于 2016-07-30T12:02:19.527 回答