0

I have a fews of songs in a folder which I would like to add the metadata items of artist, title, genre and album to. I would like to take the metadata info for the title and artist from the file name itself.

For Example: I have a song file named Melvv - Glide.mp3. I would like to take the name of the artist Melvv and the title of the song Glide from the file name and add it as MetaData. For the Album and Genre, I'll add this in myself.

  1. Is there a way I can do this in the Linux environment via bash or python?
  2. Is there a way this can be done in the Windows environment?
That Brazilian Guy
  • 6,834
  • 10
  • 64
  • 102
  • There are plenty tools that can do this for you, both for windows and linux. Did you try googling for it? Search for `ID3 MP3 editor` – LPChip Nov 18 '14 at 23:08
  • 1
    I know you added “This is quite custom and is no duplicate.” to your original question, but honestly this is a common question. An answer provided here is good. There is also a similar tool called “EasyTAG” for Linux here. http://superuser.com/a/398730/167207 – Giacomo1968 Nov 18 '14 at 23:14
  • Also see: [Auto-tagging MP3s](http://superuser.com/questions/95425/auto-tagging-mp3s), this is probably the best dupe overall. – Ƭᴇcʜιᴇ007 Nov 19 '14 at 01:32
  • @JakeGould The question you pointed to is Linux only. – Franck Dernoncourt Nov 19 '14 at 01:47
  • @Ƭᴇcʜιᴇ007 The first question you pointed to is CLI only, the second is much broader (tags are not taken from filenames necessarily) – Franck Dernoncourt Nov 19 '14 at 01:48
  • @FranckDernoncourt The original poster clearly asks, “Is there a way I can do this in the Linux environment via bash or python?” So the question I am linking to clearly satisfies that question. – Giacomo1968 Nov 19 '14 at 03:14
  • My point is only part of his question is a duplicate. – Franck Dernoncourt Nov 19 '14 at 03:26
  • @FranckDernoncourt The broader one is the better one, since it's not tied to a specific OS. As for "tags are not taken from filenames necessarily", that still includes taking names from the file names; which most of the utilities listed can do. It's strange to me that you find it's not a good match, since the #2 answer suggests the same software you did in this one. – Ƭᴇcʜιᴇ007 Nov 19 '14 at 14:11

3 Answers3

1

I do something like this, although I'm not adding in the same information (all I'm adding is album art.)

You need the package eyeD3.

For my particular use, I use the following command line (I incorporate it into a bash script, you could certainly use python):

eyeD3 --genre= --to-v2.3 --no-tagging-time-frame --remove-comments --add-image=$BASEPATH/$RELPATH/folder.jpg:OTHER:folder.jpg $SONG.mp3"

Here I'm removing any existing genre setting, making sure the format is ID3v2.3, removing comments, and adding album art. I've previously ensured that the source directory of every album contains a file called folder.jpg which contains the album art. eyeD3 supports all the metadata you want at the command line, you can customize it all you like.

for i in *.mp3; do
  SONG=`basename "$i" .mp3`
  ARTIST=`echo "$SONG" | awk -F " - " '{print $1}'`
  TITLE=`echo "$SONG" | awk -F " - " '{print $2}'`
  eyeD3 --artist "$ARTIST" --title "$TITLE" "$SONG.mp3"
done
nnsense
  • 103
  • 5
unkilbeeg
  • 456
  • 4
  • 9
0

On Windows you can use Mp3tag: free, batch process, and tagging following the filename.

enter image description here

Franck Dernoncourt
  • 20,384
  • 48
  • 186
  • 322
0

This is typical work I used to do using Foobar2000. Works good enough under Wine.

Open the files into Foobar2000, open the context menu and look for "Tagging", "Manage Scripts". Then look for action "Guess values from filenames".

As guessing pattern took something like "%artist%\%album%\%tracknumber% - %title%", if for exmaple your files (named with number, space, dash, space, and title) are in folders for each album which themselves are in folders for each artist.

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
Peter
  • 76
  • 1
  • 5