I was trying to learn the basics of Python during the last months and I found many answers on stackoverflow. But now it's time to ask my first question because I can not find anything helpful.
I have a FLAC audio file and want to extract the front cover and save it to the hard disk using python 3.x. I read the documentation of mutagen, audiotools, eyeD3 ... but I still can not figure out where and how the information is stored.
Could anyone provide a code snippet, please?
Thank you very much.
from mutagen.flac import FLAC, Picture
song = "Anathema - Empty.flac"
var = FLAC(song)
pics = var.pictures
print (pics)
for p in pics:
if p.type == 3:
print("\nfound front cover")
# how can I save the picture???
Here's my solution. Thank you very much for your help!