I hope this isn't outside the scope of the forum, but I'll try.
In python, with exiftool installed, I can pull an MP3's binary image out, calling subprocess, e.g.
`proc = subprocess.Popen(['exiftool', '-Picture', '-b', sys.argv[1]],
stdout=subprocess.PIPE)
output = proc.stdout.read()
with open('out_pic.jpg', 'wb') as out_file:
out_file.write(output)`
...and with PyExifTool installed, I can pull metadata, e.g.
`with exiftool.ExifTool() as et:
make = et.get_metadata(sys.argv[1])['ID3:Artist']
print(make)`
I could, but would rather not, use the subprocess way, of pulling the image, if I can do it with PyExifTool. But I haven't had any luck with something like:
`binary_string = et.execute('-Picture', '-b', sys.argv[1])`
or other variations, including when it erred out, telling me that the arguments needed to be byte strings, and trying things like et.execute(byte('-Picture', 'utf-8'),..., where it stopped complaining, but gave me the result of b''.
If anyone has some guidance, especially if you've done this before, I'd appreciate the help.
Thanks in advance!
https://stackoverflow.com/questions/44940062/python-getting-binary-data-with-pyexiftool
P.S. Mods, if this needs to be moved to a more appropriate section, please feel free.
Thanks
I am guessing that PyExifTool will run a sub-process anyway, so I would think that the first way you did it should be fine.
- Phil