Music Library Cleanup and Merging

From Pikes' Wiki
Revision as of 21:58, 26 December 2014 by DocGyver (talk | contribs) (→‎Tools)
Jump to navigation Jump to search

Process

File Name issues

  • Find all files with missing extensions
    • find <folder> ! -type d -regex "[^.]+"
      replace "<folder>" with directory to search. It cannot contain or be "." due to the regex used. This will find files with no "." in their name.
  • Find all files with MP3 and make them mp3 (confirm options for "rename" they change from OS to OS)
    • find <folder> -name "*.MP3" -exec rename MP3 mp3 "{}" \;
  • Find files that are DRM protected and remove them or the protection
#!/bin/bash
if /tmp/mplayer/mplayer.exe -ao dummy -identify "$1" 2>&1 | egrep -i -q -s "encumbered with drm"
then
        echo $1;
fi
  • Find files with special or unicode characters and fix
find . -name "*[$(/bin/echo -e '\201')-$(/bin/echo -e '\377')]*" | tee /tmp/filelist.log
  • Examples
    • \302\264 becomes apostrophe
    • \342\200\231
    • \241\257
    • \242\245
    • \222

Tagging

  • Save "contextual" meta data like folders

Folders may represent compilations or playlists which were created artificially due to a lack of support by the library/player/etc. This contextual information should be saved prior to any file renaming and possibly before any tag corrections.

  • Find full and mostly complete albums and verify tags
  • Rename these tracks to new folder structure
    • OST/Various Artists
      • X:\_Stage\pass1\V\Various Artists\%album%\$num(%track%,2) - %artist% - %title%
    • Single Artist Albums
      • X:\_Stage\pass1\$left(%artist%,1)\%artist%\%album%\$num(%track%,2) - %title%
  • Incomplete Albums/"singles"
      • X:\_Stage\pass1\$left(%artist%,1)\%artist%\_Singles\%title%

File Format/codec/bitrate Issues

  • Convert wma to MP3 with same quality and transfer tags
    • Load all tracks into MP3TAG and sort first by bitrate and then by encoding.
    • Go to the bottom and select all wma with bitrate set (missing bitrate most likely means a damaged file)
    • Open Xrecode
    • Drag from MP3TAG to Xrecode all selected tracks
    • Select mp3 output
    • Select encoding rate
    • (optional) Select tracks in MP3TAG by bitrate and choose encoding rate in Xrecode based on source
  • Use MP3Tag to normalize track numbers to 2 digits.
    This will help in fixing tags using Jaikoz in a later step
  • Open Folder in Jaikoz
    • sort by track number then subfolder
    • open

Tools

  • MP3Tag is for bulk changing of tags and file renaming. It can look up tags online but Picard tends to be better.
  • MusicBrainz picard for tagging based on audio fingerprint.
  • Replay Gain is a technology for audio level normalization.
  • xrecode$$ is a tool for recoding to different formats that supports moving of tags.