Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Soundirok cover art
#12
(04-21-2019, 10:17 PM)JST1963 Wrote:
(04-21-2019, 08:35 PM)Tenbagger Wrote: I wrote a short bash script to extract embedded covers into their respective folders. I'll post it here if I can locate it...

Thx for the clear answer. And yes, please, I would love to try that script.
I had my library as a flat list but as soon as I found out cover art wasn't working in that sort of setup, I put all the songs back in a folder structure "drive:\Artist\Album\Song.ext".
Didn't do it manually but I did it with a lil (very basic) routine I wrote in (die hard programmers, cover your ears now!!!) in Excel using VBA.

J
Please find my script below. Some comments that might be of interest:

Album art is extracted using ffmpeg, which is installed as a part of moOde. My collection has been built using iTunes with Apple Lossless (ALAC). From what I can see, ffmpeg will only extract .jpg from media files. (This was a not much of a problem in my collection.)  

Code:
#!/bin/bash
#
# Script must be run from the folder containing subfolders for the artists,
# again containing subfolders for albums, and eventually containing .m4a-files with album art embedded.
#
# Album art in .jpg-format from the first .m4a-file in each folder is extracted.
#
IFS=$'\n'
for ARTIST in ./*
do
       ARTN=$(echo $ARTIST | cut -d'/' -f2)
       if [ -d "$ARTIST" ]
       then
               printf "Checking artist:\t${ARTN}\n"
               for ALBUM in ${ARTIST}/*
               do
                       ALBN=$(echo $ALBUM | cut -d'/' -f3)
                       if [ -d "$ALBUM" ]
                       then
                               FIRST=$(ls $ALBUM/*.m4a | head -1)
                               printf "Extracting .jpg from:\t${ALBN}\n"
                               ffmpeg -y -i $FIRST ${ALBUM}/Folder.jpg
                       else
                               printf "Not album:\t\t${ALBN}\n"
                       fi
               done
       else
               printf "Not artist:\t${ARTN}\n"
       fi
done
Enjoy the music!
Reply


Messages In This Thread
Soundirok cover art - by Tkr001 - 04-18-2019, 10:37 AM
RE: Soundirok cover art - by kit1cat - 04-18-2019, 11:47 AM
RE: Soundirok cover art - by duke.g - 04-18-2019, 08:51 PM
RE: Soundirok cover art - by Tkr001 - 04-18-2019, 11:40 PM
RE: Soundirok cover art - by Tenbagger - 04-20-2019, 06:07 PM
RE: Soundirok cover art - by JST1963 - 04-20-2019, 08:38 PM
RE: Soundirok cover art - by CallMeMike - 04-21-2019, 06:17 AM
RE: Soundirok cover art - by JST1963 - 04-21-2019, 10:44 AM
RE: Soundirok cover art - by CallMeMike - 04-22-2019, 06:05 AM
RE: Soundirok cover art - by Tenbagger - 04-21-2019, 08:35 PM
RE: Soundirok cover art - by JST1963 - 04-21-2019, 10:17 PM
RE: Soundirok cover art - by Tenbagger - 04-23-2019, 03:46 PM
RE: Soundirok cover art - by kit1cat - 04-26-2019, 10:37 AM
RE: Soundirok cover art - by TookaFace - 04-26-2019, 10:51 AM
RE: Soundirok cover art - by kit1cat - 04-26-2019, 11:12 AM

Forum Jump: