Skip to main content

Overview

TagQt provides comprehensive metadata editing capabilities through the MetadataHandler class, supporting multiple audio formats including MP3, FLAC, OGG, M4A, and WAV files.

Supported Formats

TagQt uses the mutagen library to handle various audio formats:
  • MP3 - ID3 tags (Easy ID3 and full ID3)
  • FLAC - Vorbis comments
  • OGG - Vorbis comments
  • M4A/MP4 - iTunes-style atoms
  • WAV - ID3 tags

Standard Metadata Fields

The following fields are available for editing in the sidebar:

Basic Tags

  • Title - Track title (title)
  • Artist - Track artist (artist)
  • Album - Album name (album)
  • Album Artist - Album artist (albumartist)
  • Year - Release date (date)
  • Genre - Music genre (genre)

Track Info

  • Track Number - Track position (tracknumber)
  • Disc Number - Disc position (discnumber)
  • Track Total - Total tracks (FLAC/OGG: TRACKTOTAL)
  • Disc Total - Total discs (FLAC/OGG: DISCTOTAL)

Extended Metadata

  • BPM - Beats per minute (bpm)
  • Initial Key - Musical key (initialkey)
  • ISRC - International Standard Recording Code (isrc)
  • Publisher - Record label (organization)
  • Comment - Free-form comment (comment)

Media Content

  • Lyrics - Song lyrics (embedded)
  • Cover Art - Album artwork (embedded)

Single File Editing

When a single file is selected, the sidebar displays all metadata fields for editing:
# From tagqt/ui/main.py - Loading metadata into sidebar
def populate_sidebar(self):
    if not self.metadata:
        return
    
    self.sidebar.title_edit.setText(self.metadata.title)
    self.sidebar.artist_edit.setText(self.metadata.artist)
    self.sidebar.album_edit.setText(self.metadata.album)
    self.sidebar.album_artist_edit.setText(self.metadata.album_artist)
    self.sidebar.year_edit.setText(self.metadata.year)
    self.sidebar.genre_edit.setText(self.metadata.genre)

Saving Changes

Save changes using Ctrl+S or the Save button:
# From tagqt/ui/main.py - Single file save
self.metadata.title = self.sidebar.title_edit.text()
self.metadata.artist = self.sidebar.artist_edit.text()
self.metadata.album = self.sidebar.album_edit.text()
# ... other fields ...

self.metadata.save()
When saving, TagQt automatically saves cover art to cover.jpg in the same directory if cover art exists in the file.

Format-Specific Handling

Disc Numbers (FLAC/OGG)

For FLAC and OGG formats, disc numbers support the number/total format:
# From tagqt/core/tags.py
@disc_number.setter
def disc_number(self, value):
    if self.audio and isinstance(self.audio, (FLAC, OggVorbis)) and value and '/' in str(value):
        try:
            num, total = str(value).split('/')
            self.set_tag('discnumber', num)
            self.audio['DISCTOTAL'] = [str(total)]
            return
        except ValueError:
            pass
    self.set_tag('discnumber', value)

Track Totals

FLAC and OGG files support the TRACKTOTAL field:
# From tagqt/core/tags.py
@track_total.setter
def track_total(self, value):
    if self.audio and isinstance(self.audio, (FLAC, OggVorbis)):
        if value:
            self.audio['TRACKTOTAL'] = [str(value)]
        elif 'TRACKTOTAL' in self.audio:
            del self.audio['TRACKTOTAL']

File Information

The sidebar displays read-only file information:

Bitrate

Audio bitrate in kbps

Sample Rate

Sample rate in kHz

File Size

File size in MB
# From tagqt/core/tags.py - File properties
@property
def bitrate(self):
    try:
        if self.audio and hasattr(self.audio, 'info') and hasattr(self.audio.info, 'bitrate'):
            return int(self.audio.info.bitrate / 1000) # kbps
    except Exception:
        pass
    return 0

@property
def filesize(self):
    try:
        size_bytes = os.path.getsize(self.filepath)
        return round(size_bytes / (1024 * 1024), 2) # MB
    except Exception:
        pass
    return 0.0

Keyboard Shortcuts

  • Ctrl+S - Save changes
  • Ctrl+O - Open folder
  • Escape - Exit global edit mode

Next Steps

Batch Operations

Learn about editing multiple files at once

Auto-Tagging

Automatically fetch metadata from MusicBrainz

Build docs developers (and LLMs) love