Find the answer to your Linux question:
Results 1 to 3 of 3
I have a largish collection of mp3 files produced several years ago on Windows which I've now migrated to Linux. They all have ID3v2 tags, but quite a few have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    6

    Info needed on ID3v2 tagging on Linux please


    I have a largish collection of mp3 files produced several years ago on Windows which I've now migrated to Linux. They all have ID3v2 tags, but quite a few have non-standard "genre" values - for example "Brass" and "Flamenco" - which aren't in the ID3v2 standard.

    I thought nothing of this at the time. When I tagged the files, the genre was derived by parsing the file path, so it was determined by whatever I happened to call the directory. However, I now discover that ID3v2 stores the genre as a single byte indicating an entry in a pre-defined list of genres. (That was a bit of a surprise, as the notion that the world can only have 256 musical genres seems a trifle dumb, but never mind.)

    This means I no longer understand how these "non-standard" values are possible, yet if I open one of these files in amarok, it correctly shows the genre as "Brass" or "Flamenco". So does my portable mp3 player. I have no idea how it's being stored, but presumably in a non-standard way.

    The problem is, I can't find a way of inserting these non-standard genre values into mp3 files on Linux. I'm trying to trans-code from flac to mp3 at the moment via lame, but lame won't accept non-standard genres so it refuses to encode the file.

    Can anyone help with this? Does anyone understand how these genres might be getting stored and whether there's a linux application (ideally a command line one) that'll let me set any genre value that I want, in a way that things like amarok will understand? Also, are there any tools that'll let me analyse what's actually in an mp3 file (a bit like metaflac for flac files, maybe)?

    TIA for any help or information.

  2. #2
    Just Joined!
    Join Date
    Mar 2008
    Posts
    6

    Problem solved (probably)

    I think I've found the solution to this. I can't find it documented anywhere, so in case anyone else has the same problem I fixed it using the Linux "id3v2" program.

    The documentation for this says the genre has to be given as an integer, but I found that if you give it a string (any string you like) it sets the genre value to 255 and writes the string into the ID3v2 "TCON" (Content Type) frame. Music players then seem able to read this string back and interpret it as the "genre".

    I guess that's what other tagging systems are doing as well. It would be nice if lame did likewise.

  3. #3
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by plus one View Post
    I think I've found the solution to this. I can't find it documented anywhere, so in case anyone else has the same problem I fixed it using the Linux "id3v2" program.

    The documentation for this says the genre has to be given as an integer, but I found that if you give it a string (any string you like) it sets the genre value to 255 and writes the string into the ID3v2 "TCON" (Content Type) frame. Music players then seem able to read this string back and interpret it as the "genre".

    I guess that's what other tagging systems are doing as well. It would be nice if lame did likewise.
    It's indeed a stupid design decision, which was probably made by any short sighted person. Any sane mind can easily tell how 1 bytes is not enough to code all the music styles, and new styles arise every day, so, to think that a static list of predefined values is enough is not smart either.

    In fact, the id3v2 docs includes 80 styles:
    id3v2.4.0-frames - ID3.org

    Fortunately, most programmers ignore the standards when they are utterly stupid, and most players will read the tags correctly.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •