This commit is contained in:
olari
2019-04-13 22:28:43 +03:00
commit cbf6cd3f07
19 changed files with 1066 additions and 0 deletions

16
python/extract_cover_flac.py Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# extracts cover from flac audio file
from mutagen.flac import FLAC, Picture
song = "cover.flac"
var = FLAC(song)
pics = var.pictures
print (pics)
for p in pics:
if p.type == 3: #front cover
print("\nfound front cover")
with open("cover.jpg", "wb") as f:
f.write(p.data)