A simple bash shell script to show MPD album art in the terminal.
In Ver 2.0+, it will now download the album from musicbrainz using wget automatically.
- V1.0 First commit
- V2.0 Added
Download From Internetfrom musicbrainz usingwget. - V2.1 Optimize the code
- V2.2 Optimize the code, Added search by fingerprint and search method priorit.
- V3.0 Optimize the code, Added new search method priorit (OPTIONS=4) and Searching score.
- V4.0 Added password support for
mpc, added support for systemd (no more relied onncmpcpp). - V5.0 Refactored core logic into modular functions, improved embedded album art extraction with ffmpeg, enhanced fallback mechanisms, streamlined API calls for MusicBrainz and AcoustID, and fixed PID handling for album viewer updates.
- Embedded Album Art in Music File
- Cover Art in Album Directory
- Online Album Art (if
DOWNLOAD_FROM_INTERNETenable) - Backup Album Art (Optional)
- Exit if No Cover Art Available
mpcncmpcpp(If not using Systemd)ffmpegimagemagickimg2sixel/kittywget(If using download from internet option)fpcalc(If using fingerprint method search for download from internet option)
Simply put the mpd-album-art.sh and mpd-album-art-bg.sh to the .mpd directory.
Choose one for the trigger point (Trigger mpd-album-art-bg.sh when song has changed)
- (Recommend) If using systemd for trigger point, put the mpd-album-art.service into
/home/USER/.config/systemd/user/and runsystemctl --user start mpd-album-art.service,systemctl --user enable mpd-album-art.serviceif want it to autostart eveytime you login. - If using ncmcpp for trigger point, add the code below to the ncmpcpp
configto make it execute the script each time the song changes.
execute_on_song_change = "~/.ncmpcpp/mpd-album-art-bg.sh > /dev/null 2>&1 &"
Simply run the album.sh in any terminal which supports img2sixel.
- Backup album: To use a backup album, set the BACKUP_ALBUM variable in
mpd-album-art-bg.shto the backup image full path. - Album size: To change the album display size, change the ALBUM_SIZE variable in
mpd-album-art-bg.shto the px you want. It will automatically centers the album art and fills any remaining space with transparency (alpha channel) when the album art is smaller than the target display (ALBUM_SIZE) size. - Download from internet: By default it's enabled, to disable change DOWNLOAD_FROM_INTERNET variable in
mpd-album-art-bg.shto another number. - Download from internet search method priority (Default is 2): 1-4
- Use Case 1, if not found use Case 2
- Use Case 2, if not found use Case 1
- Only use Case 1
- Only use Case 2
- Case 1: Search via album name, artist name and the release date
- Case 2: Search via fingerprint (AcoustID)
- Recommend to use mode 2 or 4 if installed
fpcalc, since fingerprint usually gets a more precise result.
- Download from internet Searching score (Default is 90) 0-100, only entries with a score equal to or higher than the selected value will be considered. The "searching score" represents a numerical value indicating how closely an entry matches the search query. (this is only for Case 1)

