Karthik M Karthik M - 2 months ago 12x
Python Question

Using subprocess in python with multiple values and same argument

This is my command

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

In the output file i can get only genre, subprocess sends only the last "-itags" value.Anyway to make this work?



According to their documentation the parameter should be passed like this

-itags tag1[:tag2]

So you may try to do it like so

subprocess.call(["wine","MP4Box.exe","-add",outputdir+"tmp.m4a","-itags","name=a:artist=b" ...