Filetypes Music

From wikinotes


tags

Formats and Tagtypes
Format Tag Type CLI info CLI editor
.mp3
id3 tags
id3info <file>
id3tag
.ogg
vorbis tags
vorbiscomment -l <file>
vorbiscomment
.flac
vorbis tags
metaflac --list <file>
metaflac
Tag Editors
kid3 Fantastic tag editor. Tag by folder, by music fingerprint.
Rhythmbox ReTag by tag. (Entire genre, artist, etc.)
id3 Primary mp3 tag editor
vorbis-tools Primary ogg tag editor
flac Primary flac tag editor

Tag-Editing Tools

### CLI (best for diagnosing problems, scripting)
sudo pacman -S vorbis-tools		## flac/ogg tags
sudo pacman -S id3					## id3 tags

### Graphical
sudo pacman -S kid3					## this is best for specific directories (and uses the correct tags for flac/mp3 etc)
sudo pacman -S rhythmbox			## this is best for renaming entire genres.

I found found problem-solving with CLI tools significantly more useful than graphical tools. They are generally designed for people who know what they are doing, and more detailed information is presented. They also tend to be more current and consistent over time. I never would have solved my issues with MPD's faulty genres had it not been for the command line tools.


MPD genre problem

Simple Problem Resolution In the end, my conversion from mp3 to flac did work, but my vifm-trash file was still within my mpd library. These files with the faulty tags were causing more issues. To get around this, simply create nonsense genre tags with id3tag, then rewrite the tag using kid3.

for f in *.mp3; do id3tag --genre='Ska' $f; done			## correct tags on all .mp3 files in folder
																			 # (this does not work properly, but completely clears all existing tags)

kid3																		## use kid3 to enter the correct tag


Detailed Problem Resolution I was experiencing an issue with MPD where certain songs were being listed as the genre '(21)'. This is because of the way that id3v1 tags stored genre. Originally, genres were restricted to a specific subset. These are listed in Appendix A According to the id3 documentation, the id3 flag TCON (content type) can be backwards compatible with the original list of genres by specifying the genre's ID-number enclosed in brackets. In this case, '(21)' is Ska. The last piece of information required to understand the nature of the problem is that an MP3 file can contain both id3v1 and id3v2 tags at the same time. Having both of these can also cause problems with certain music players, it is best to use only id3v2 tags. In order to fix this, you simply need to:

  • replace (21) with 'Ska' in the tag itself.
  • remove the id3v1 tag (otherwise the song will appear under two categories in MPD)


## Query Tag
id3info    01-slightly_stoopid-intro-kg.mp3

*** Tag information for 01-slightly_stoopid-intro-kg.mp3
=== TIT2 (Title/songname/content description): Intro
=== TPE1 (Lead performer(s)/Soloist(s)): Slightly Stoopid
=== TALB (Album/Movie/Show title): Closer to the Sun
=== TYER (Year): 2005
=== TRCK (Track number/Position in set): 1
=== TCON (Content type): (21)
*** mp3 info
MPEG1/layer III
Bitrate: 128KBps
Frequency: 44KHz


## Set Tag
for f in *.mp3; do id3tag --genre='Ska' $f; done			## correct tags on all .mp3 files in folder

Audio Conversion

ape/cue

sudo pacman -S sox bchunk ffmpeg cuetools

ffmpeg -i cd.ape output.wav									## extract to single .wav
bchunk -w output.wav cd.cue  <file_basename>				## split into separate .wav files
for f in *.wav; do; sox "$f" "${f%.*}.flac" ; done		## convert all wavs to .flac files
cuetag.sh file.cue *.mp3										## copy tag info from .cue