Hacker News new | past | comments | ask | show | jobs | submit login
Beets – Command-line music manager and auto-tagger (github.com/sampsyo)
263 points by dewey on March 3, 2014 | hide | past | favorite | 115 comments



I have no problem being the 15th person to say "Beets is awesome!" In addition to the quality of the program sampsyo is a great maintainer. Quick to comment on issues and is usually available on IRC. Beets + the archive.org API for the Etree music collection would be awesome.

Tip: If you are about to import all of your music you and you have enough space you can save some of the tedium by doing a quiet import initially:

  1. Optional: `$ cp -r ~/Music ~/ImportMusic ; mv ~/Music ~/Music.orig`
  2. enable whatever plugins you want (atleast: chroma fromfilename fetchart)
  3. Set up config
   
    directory: ~/Music
    import:
      move: yes
      quiet_fallback: skip
      log:    ~/.beets/imported-beets.log

  4. `$ beet import -q ~/ImportMusic`
This will take a little while depending on how big your collection is. When that is finished the only things left in ImportMusic will be the things beets need some help identifying. This part requires time and a little input from you so plan on being near your $TERM

  5. `$ beet import ~/ImportMusic`
Keeping the backup copy of Music is probably not needed but I like to play it safe.

tldr: No matter how you want to import do the quiet+skip import initially.

ADDENDUM: A similar program for pdf/epub/mobi --boox-- would be awesome. If Calibre worked half as well and was developed by someone half as nice as sampsyo the UI would almost be tolerable.


Responding to the addendum; does anyone know of a good "personal digital asset/content management" tool to store and organize this data as well? There is camlistore [0] but I think it's too low level for general use. Someone needs to build something on top of it. I want the ultimate collection management! =)

[0]: https://camlistore.org/


Would LOVE a beets for books!


I use Beets to tag and organize all the music I and my roommmates download. We feed just-completed media downloads into a version of FileBot[1]'s universal media filer[2] that delegates music sorting to the beets executable. Beets handles indexing music much more cleanly than the other solutions I tried, especially in a shared server environment.

I've uploaded our media management scripts to GitHub here[3]. Note that there is some minor rude language in a few scripts ;)

[1]: http://www.filebot.net/

[2]: http://filebot.net/scripts/amc.groovy

[3]: https://github.com/justjake/media-tools


I would have been all over this if I hadn't of deleted my mp3 collection a few years ago and now just use Spotify. I was pretty OCD in terms of managing my mp3 collection, so dumping it all and using a streaming service is a welcome life simplification.


Music is way too important in my life to temporarily rent it from some company that may or may not be around or even have the same content available in a few years.


Well said. I've been meticulously maintaining a single audio collection for years now; sometimes I wonder why I do it. But what you said sums it up nicely.


Google Music has an "upload your own music" feature (up to 10k songs free! That's 500 CDs and for anyone who isn't in the music making profession I can't imagine needing more). It ends up being a sort of dropbox-like mechanism (you can download as many times to your phone, only 3 times to your computer though).

In case of failure of Google I still have a decent amount of music on my phone and I do have the stuff on my phone. In the (much more) likely case of drive failure I can get my music again (I could even circumvent the download limit through a Google->phone->PC thing but that would be a pain).

I think it's important not to overestimate your personal capacity to not lose things compared to companies like Google (especially considering that I am not aware of many companies that fell off the face of the earth in less than 24 hours for you to lose all your data)

edit: google music player on android is pretty annoying though (just slightly better than the stock player from old android). The fact that you need a data connection to play a random mix of your music startles me.


The minute Google converts one of my flacs to 320kbps mp3s the file is lost. I don't want to circumvent anything in order to have access to my data. Why does it startle you? When you don't pay for something you are the product. I would be more surprised if google gave you all this great music and did not expect anything in return.


>The minute Google converts one of my flacs to 320kbps mp3s the file is lost. Only lost if the file is lost on your end too.

>I don't want to circumvent anything in order to have access to my data.

If you're an audiophile/actually doing things with the raw files, then this is not for you, but for most people (read: 99% of people) the diff between 320kbps mp3 and flacs is not there.

> Why does it startle you? When you don't pay for something you are the product. I would be more surprised if google gave you all this great music and did not expect anything in return.

Sure, I don't care about sending my music usage stats(hell I already do it publicly with last.fm) but at least have an option when my data connection is down.


The difference will exist at some point in the future when I want to convert those flacs/mp3s to a new lossy format for some reason (e.g. when the only place you can buy an mp3 player is in an antique shop). Then when my great grandson wants to listen to my music, and you can't even buy a player for whatever that format was.


The link that started this discussion is about an open source CLI based music manager. Beets boasts about its numerous features that work with mpd. We have not been talking about music management for the 99% for a while now.


Your description of Google Music makes it sound awful and completely unusable.

It does take a bit of effort to manage my own music collection, but I feel like I am well protected against data loss by having it synced between a NAS, external server, and Crash Plan. 90% of my listening is done via the external server running Subsonic, using both the web interface and the excellent mobile app iSub. I also try to always pick up a vinyl at live shows since they are big and nice to look at (and occasionally listen to), and usually come with a free mp3 download.

There are no limits on how many times I can access my music files. I can access them any way that I please, from pretty much any device, forever. I couldn't have it any other way with my music collection.


and its more work. Obviously your solution is more durable (mainly due to owning all the pieces), but then again your solution is also more durable than something like Dropbox.

This is a halfway solution for people who are not necessarily good at backups. And I get to listen to the music on the web interface or on my phone (which is basically all I care about). Maybe I'm an awful person, but I greatly prefer this to the USB/SD card shenanigans of yore.


Last time I uploaded my own music, it replaced all of the "explicit" songs with the censored songs, it really tuned me off to the product.


Many people who aren't professional music anything listen to music during working hours. Thats ~ 2000 hours a year. Your 500 cds, ~ 500 hours. I think you sorely lack imagination.


I was kind of the same, but the realization that I was a media hoarder came when I was designing a media server for myself where I could access my media anywhere -- and the thought struck me that I was essentially just rebuilding a lot of the on-demand paid services out there, just with less media.

Been using Google Music ever since.


You can always rent and buy.

I'd be nervous buying DRM'd content from a supplier that may not be around in the future. But renting I could care less - unless I paid for years upfront - but you generally don't do that.


…until Spotify dies or is replaced with something better. I haven't found a single way to manage a music library because I don't have a single music library. It's kind of crappy having it spread across MP3s, FLACs, and various music services :/


Try Clementine, it has both a local library and integration of Google Music, Spotify, Grooveshark, etc.


I always dismissed this because it said amarok in every description. I just noticed it does not depend on kde-runtime. Someone needs to do this for rkward.


Why is Amarok something you would dismiss it on?

Sure, they butchered it up in version 2.0 and above, but I've always felt version 1.4 was probably the best library manager I've used.


I dismiss amarok and rkward for the same reason: a dependency on kde-runtime. This is just a philosophical decision that the kde community made that I disagree with. Why does rkward, a stats program, need to have the phonon-backend-vlc video or libkntlm dependencies? An RDF daemon or kio-audiocd (i don't have a CD drive)? I use awesome as a window manager, so I do not have KDE/GNOME installed. However i can and sometimes will install most "gnome" apps because they do not have a dependency on gnome-core. For comparison:

Clementine vs Amarok

  # apt-get --no-install-recommends install clementine
  ...
  The following NEW packages will be installed:
    clementine libechonest2.1 libftgl2 liblastfm1 libprojectm2 libprotobuf8
    libqjson0 libqt4-opengl libqxt-core0 libqxt-gui0 projectm-data
    ttf-dejavu-core
  0 upgraded, 12 newly installed, 0 to remove and 19 not upgraded.
  Need to get 6,715 kB of archives.
  After this operation, 28.1 MB of additional disk space will be used.

  # apt-get --no-install-recommends install amarok
  ...
  The following NEW packages will be installed:
    amarok amarok-common amarok-utils kate-data katepart kde-runtime
    kde-runtime-data kdelibs-bin kdelibs5-data kdelibs5-plugins kdoctools
    libattica0.4 libdbusmenu-qt2 libdlrestrictions1 libepub0 libfam0 libiodbc2
    libkactivities6 libkatepartinterfaces4 libkcmutils4 libkde3support4
    libkdeclarative5 libkdecore5 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4
    libkemoticons4 libkfile4 libkhtml5 libkidletime4 libkio5 libkjsapi4
    libkjsembed4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkntlm4
    libkparts4 libkpty4 libkrosscore4 libktexteditor4 libkxmlrpcclient4
    liblastfm1 libloudmouth1-0 libnepomuk4 libnepomukcore4 libnepomukquery4a
    libnepomukutils4 libnl-route-3-200 libntrack-qt4-1 libntrack0 libphonon4
    libplasma3 libpolkit-qt-1-1 libqca2 libqjson0 libqt4-opengl
    libqt4-qt3support libqtscript4-core libqtscript4-gui libqtscript4-network
    libqtscript4-sql libqtscript4-uitools libqtscript4-xml libsolid4 libsoprano4
    libssh-4 libstreamanalyzer0 libstreams0 libtag-extras1 libthreadweaver4
    libzip2 nepomuk-core-data nepomuk-core-runtime ntrack-module-libnl-0
    oxygen-icon-theme phonon phonon-backend-vlc plasma-scriptengine-javascript
    shared-desktop-ontologies soprano-daemon
  0 upgraded, 82 newly installed, 0 to remove and 19 not upgraded.
  Need to get 75.9 MB of archives.
  After this operation, 202 MB of additional disk space will be used.
  
Gnumeric vs Rkward

  # apt-get --no-install-recommends install gnumeric gnumeric-plugins-extra
  ...
  0 upgraded, 8 newly installed, 0 to remove and 19 not upgraded.
  Need to get 456 kB/7,289 kB of archives.
  After this operation, 34.0 MB of additional disk space will be used.

  # apt-get --no-install-recommends install rkward
  ...
  0 upgraded, 70 newly installed, 0 to remove and 19 not upgraded.
  Need to get 61.1 MB of archives.
  After this operation, 143 MB of additional disk space will be used.


You just found your music management system:)


My great life simplification was to aim for a library I can enjoy when shuffled without having to babysit the "Next" button.

Sadly I was far from that in my most meticulous days where I wouldn't even delete tracks I hated because that would violate the sanctity of the discography. And I didn't want MusicBrainz to doubt my thoroughness.


That's funny.

That's a bit of a holy grail. Because you need the shuffle to track your mood. I found that it really subdues my listening, in that I don't always want some punk music interupting a mellow interlude. So I've gone back to listening to albums, or crafted playlists.

There are album fillers, and there are tunes that are just bad, and they are better gone. Though granted, the holes don't feel quite right.

I'm trying to understand your MusicBrainz remark, are albums with missing tracks unidentifiable?


You raise a good point about mood tracking. I've found that iTunes's genius shuffle does a decent job of shuffling a single genre of music, so you don't generally get harsh interruptions.

The holy grail is most definitely a library (or app) where you click "shuffle all" and enjoy every song it plays. Songza, genius shuffle, 8tracks etc. all try to tackle this, but I still think we're far from that point.


Do you miss any music? Setting aside the Little Sister concerns Spotify is not an option for me because I like concert bootlegs and some obscure folk artists. Have they added the ability to limit the upstream bandwidth? I remember a lot of my gaming friends complaining that the client was the ultimate gun NERF.


Yeah, the Spotify catalogue isn't exhaustive by any means, but its pretty darn good. I miss some more obscure items from my mp3 collection, especially some techno/dance stuff I enjoyed in my early 20s (I shed a tear for that occasionally) - but overall I feel like the benefits of shedding a 30GB collection of files whose metadata I was obsessed by outweigh the negatives of dumping my personal music collection. If Spotify dies I'll just move onto the next service.

If there are a few obscure mp3s you can't live without you can import them into your Spotify client. They'll get auto synced to any mobile devices you have connected and the client installed on too (although not cloud synced to other computers - you'd have to copy them manually).

Spotify does a lot of local caching, so once you've listened to a track once it'll likely be cached so it doesn't hammer your collection too badly. Pretty sure I've continued to get good gaming pings while my gf listens to Spotify in the next room :)

EDIT: I did not know about the P2P stuff. Huh! Interesting ...


I've heard the p2p stuff is going away on the desktop app, but you could easily get around it by using the webplayer or mobile app. AFAIK, there's no way to limit the upload speed in the current desktop implementation (in the app).

The content is generally pretty good but they depend on the artists/labels getting it into aggregators or making it available. Bootlegs won't be there because that would probably piss the bands off.


Terabytes of bootlegs that do not piss the bands off:

https://archive.org/details/etree

Short list of musicians granting permission to have bootlegs hosted on archive.org/etree:

  311                                   Blues Traveler
  Camper Van Beethoven                  Cowboy Junkies
  Cracker                               Dark Star Orchestra
  Death Cab for Cutie                   Derek Trucks Band
  Disco Biscuits                        Donna the Buffalo
  Drive-By Truckers                     Ekoostik Hookah
  Elliott Smith                         Furthur
  Grace Potter and the Nocturnals       Grateful Dead
  Guster                                Hank Williams III
  Hot Buttered Rum                      Jack Johnson
  John Butler Trio                      John Mayer
  Keller Williams                       Little Feat
  Live Music Archive                    Local H
  Lotus                                 Matisyahu
  Matt Nathanson                        Max Creek
  Michael Franti and Spearhead          moe.
  My Morning Jacket                     Of A Revolution
  Perpetual Groove                      Phil Lesh and Friends
  Radiators                             Railroad Earth
  Ratdog                                Ryan Adams
  Smashing Pumpkins                     Sound Tribe Sector 9
  String Cheese Incident                Tea Leaf Green
  The Breakfast                         Umphreys McGee
  Warren Zevon                          Ween
  Yonder Mountain String Band  

My personal favorite is Danny Schmidt, a singer songwriter rom TX/VA: https://archive.org/details/dannyschmidt2007-12-13.sbd.flac

The 4,700+ other artists: https://archive.org/browse.php?collection=etree&field=%2Fmet...

24bit flacs: https://archive.org/search.php?query=%28format%3A%2824Bit%20...


Sorry, I should have clarified that comment before posting it.

Many bands allow audience taping but I'm not aware of m?any that allow for commercial distribution of those recordings. If Spotify attempted to distribute those recordings against the bands' policies then it would probably piss off the bands.

That Danny Schmidt is pretty great stuff. You're right about Spotify's lack of content when it comes to stuff like this-- they have all his studio albums but are kind of weak when it comes to live stuff, they have one album. Archive.org definitely fills in this gap (I use it all the time for Dead shows).


Now I see what you were saying. I think the studio process strips the humanity out of music. I have been working on a feature request / outline of functionality for beets and etree that I need to finally submit to sampsyo. How awesome would this be:

  $ beet etree --get dannyschmidt2007-12-13.sbd.flac
  etree: requesting ogg format
  etree: fingerprints verified
  etree: Success: Downloaded Album: 2007-12-13 - The Cactus Cafe
  $ 

Archive.org has a somewhat documented API that describes all of the "resources." A lot of the shows even come with cover art for those that are into that.

JSON for recording: https://archive.org/metadata/dannyschmidt2007-12-13.sbd.flac


I'm with you; the only thing that makes me keep my MP3s is the fact that the cloud isn't absolutely everywhere. When I run I want a $40 MP3 player and these aren't cloud capable.

Otherwise, where ever I am I have high-speed Internet and I don't bother with my MP3s anymore. I do a lot of Pandora. To play music on the big stereo I just use Google Music and the Nexus 7, which connects to the receiver by Bluetooth.

I used to curate the music, organize the files, connect to machines via ssh to play them back on different speakers, etc etc. Cheap tablets, cheap phones, Internet everywhere, and music services have killed all that for me. I used to have a Linux PC hooked up to the stereo and I would ssh to it to control playback. Those were the days. Now the Nexus 7 is a far superior device in every way.


I've attempted to move all my files into Google PlayMusic and manually correct everything. The main problem is PlayMusic seems to always match my explicit songs to edited version and that drives me crazy. I will have it "fix the match" to only find later that the songs are edited again. So for now I spotify.

I kind of hoping spotify does something similar to beats where $15 gets you accounts for all family members. I'm not sure how that works but it seems to be AT&T only so maybe it's subsidized?


My problem with commercial services like Spotify is most of the music I listen too isn't in any of them. I imported my 20,000 mp3s into iTunes Match and it matched about 20%.


My problem is the recommendation algos. If your music preferences do not fit in nice little boxes the recommendations are useless.


It wouldn't matter though, if once you tried a recommendation, you could vote it in or out of future plays.


There's also the lack of information on which particular edition of an album you're getting.

If it's more than a couple of decades old, there have likely been a couple of terrible remasters in the mean time - probably easier to get your hands on too.


I wrote up a little guide on this a while back -- http://lttam.wordpress.com/2012/01/31/beets-and-an-unwaverin...


I've been tempted to try tools like these throughout the years, but honestly I've come to learn that nothing is black and white about tagging. I usually use the "Album Artist" field to organize music into logical collections that I want. If I took everything literally, I'd have to deal digging through "Various Artists" and other disagreements I have with established music databases.


It is important to note that beets never forces you to use default format. If you want it to use your metadata you can tell beets to import it as is. More importantly there are two plugins that look perfect for you: (in order of effort)

Rewrite Plugin: The rewrite plugin lets you easily substitute values in your templates and path formats. Specifically, it is intended to let you canonicalize names such as artists: for example, perhaps you want albums from The Jimi Hendrix Experience to be sorted into the same folder as solo Hendrix albums.[^1]

Inline Plugin: The inline plugin lets you use Python to customize your path formats. Using it, you can define template fields in your beets configuration file and refer to them from your template strings in the paths: section of the configuration file.[^2]

[^1]: https://beets.readthedocs.org/en/v1.3.3/plugins/rewrite.html

[^2]: https://beets.readthedocs.org/en/v1.3.3/plugins/inline.html


It's more important to note that you can tell it to not move files and to not edit the metadata stored in files.

This makes it useful for playback and finding information without first having to trust it.


Amen. When ripping all my CDs, I hand entered all my metadata. My biggest pet peeve is filling out the "composer" field correctly. If I sort by composer, I don't want to find Beethoven under "L".


Beets is fantastic, really automates a ton of really annoying work. The author is pretty responsive with issues, and there's a growing community of contributors.

Feel free to crib off of my config file: https://github.com/fortes/dotfiles/blob/master/.config/beets...


Beets is awesome. It also supports acoustic fingerprinting, so you can pass it songs without any id3 tags at all and it will try and guess the song is.


There is also an extensive ongoing thread about Beets in the what.cd (music torrent tracker) forum, where the creator posted about it: https://what.cd/forums.php?action=viewthread&threadid=97720

edit: available only to members, unfortunately


I love what.cd but the problem is their tracker has been non stopped ddos'd for the last few weeks that it's almost impossible to download anything.


Yeah this is definitely unfortunate. The forums remain high-quality in the meantime.


> almost impossible to download anything.

More like literally impossible to download anything :(


This is great. It looks like just the tool I need to try to beat my broken iTunes collection back into shape - it was once perfect, but a burglary of my machine and backup drive (same location, stupid me) meant I had to scrabble together a messy version from various backups etc. iTunes is unusable for me due to the collection size so I mostly just use spotify instead of fighting with it.

I tried a test on a single artist tonight (2pac) but ran into a bit of a roadblock. There's no 'merge' function. So if you have an incomplete album in the library and you import a directory that contains the rest of the tracks, your choices are to delete the incomplete one or to put the new tracks into their own album. This might sound like an edge case but if you have an album that's currently in 2 directories (cd1 and cd2) then you're fairly well screwed.


You need to give it a little more time. It does not sound like you have spent much time looking through the documentation. Dont forget to check out the open and closed issues for your hiccups. Its worth pointing out that its not a mind reader, you do have to put in a little effort for corner cases.

I am not 100% sure what you mean about merge. You can just `cp LATEADDITIONS Music/artist/ablum` and then "reimport the album" with `beet import Music/Artist/Album`.

As far as cd1/cd2 goes you are only "fairly well screwed" if you can not type `$ mv cd1/* cd2 ; beet import cd2`. I think there is another way to do this but I am not a beets guru. I seem to recall there is a discussion of this in one of the issues on github. But lets face it `mv CD1/* CD2/ ; beet import CD2` is not that difficult.

If you have a big directory full of unsorted albums there is also this new gem:

   The importer has a new interactive option (*G* for "Group albums"),
    command-line flag (``--group-albums``), and config option
    (:ref:`group_albums`) that lets you split apart albums that are mixed
    together in a single directory. Thanks to geigerzaehler.


I'm going to give it more time, I didn't mean to sound like I was giving up. I spent the last hour reading through the importer code to see how it might handle this case but there's really no way of doing it in the tool (there's an open issue for it [0] [1]).

I used "fairly well screwed" in the context of trying to automate the cleanup of 60,000+ songs. One album isn't an issue - 10,000 or so where you need to keep dipping in and out of the tool to manually move stuff around isn't really ideal.

Just to confirm, since you seem to have some experience - you can reimport an album to clean it up again (say after adding additional files) by calling import on a path in your library? So it's ok to mess with the files in the library and then fix the db later by importing? From what I saw in the code I didn't see anything that would handle removing / moving files, do you know if it handles those cases?

Again, my language was probably a little strong, and mostly only applies to the more extreme situation I'm in.

ps your other comment about doing the import in 2 steps seems like a bit of a life saving hint. Will definitely go that way when / if I commit to this.

[0] https://code.google.com/p/beets/issues/detail?id=380

[1] https://github.com/sampsyo/beets/issues/112


The beets reimport functionality should really be thought of as a sanity check / rescan / quality control. So it will recognize the "untracked files" to borrow some git terminology. That is for adding files. As far as removing, moving, modifying files (i am assuming you mean metadata?) goes take a look at the move/remove/update beet commands.

What follows is a slightly rambly not well edited description of my importing. I apologize for the length/grammar.

I think I was in a similar situation as you. I started with 5 or 6 big collections of music that had diverged over the years; flac/shn bootlegs, old itunes installations, xmms libraries, etc and a couple of small collections from netbooks:

  /music/itunes
  /music/olditunes
  /music/olditunes-ibookg3
  /music/current
  /music/blah
  ...


Before touching beets I ran rdfind over the itunes directories and then over the non itunes directories. rdfind leaves the copy in the directory listed earliest so I listed the directories in order of most recently used. This essentially wiped out the oldest directory from the itunes and non-itunes sets. I then ran rdfind against all of the directories (once again in order of most recently used). The amount of space I saved was insane.

Once I had manually cleaned up the low hanging duplicate fruit I did the two step import. I got hit with the CD1/CD2 quirk the first time I did the two step import. Because I had the backup directory I just blew away the beet library and started over. This time before I ran the quiet import I tried to do a best effort of consolidating the cd1/2 albums. `tree` came in handy for finding the problem albums:

  $ tree -i -f -d --prune /music |grep -i "cd1\|disc1\|cd\ 1\|disc\ 1""
I did the `mv cd1/* cd2/` by hand. It did not take as long as I thought it would. I gave it my best effort and reran the quiet import. This solved a ton of the problems. Before doing the interactive import I sorted /music with

  $ du --max-depth=3 -h /music |sort -h 
Because I used the move import instead of copying it was easy to see if there were any recurring problems. The only things that are left are the things beets could not ID by itself. My biggest import hiccup was concerts from archive.org's etree archive. I still have to move them in. I am still deciding how I want to handle the one hit wonder songs. Right now my config has the following for paths:

  paths:
      default: $albumartist/$album%aunique{}/$track $title
      singleton: 0xSingles/$genre/$artist/$title
      comp: 0xCompilations/$genre/$album%aunique{}/$track $title
The singleton and compilation defaults are:

    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title
This was going to mean my non-album and compilation album directories had hundreds of directories.

Feel free to followup with any more questions.


ARGH! I just saw this on the man page:

  If you have an album that's split across several directories under a common
  top directory, use the --flat option.  This takes all the music files under the
  directory (recursively) and treats them as a single large album instead of as
  one album per directory. This can help with your more stubborn multi-disc albums.
That might be easier than doing all the mv cd1 cd2. I have never used it. It will increase the interactivity of the import.


Amazing - thanks for taking the time to write up the process you went through. My situation sounds very similar and I can definitely reuse a large chunk of your approach.

I'd planned on doing de-duplication first. In my case I have legacy copies of libraries - but also a lot of duplication in within the main itunes library (due to exploding itunes dbs some time ago - that was the point I switched to spotify so my ocd didn't kill me). Should be easy enough to script something to handle that scenario. I did something similar a while ago to sort out my iphoto lib(s).

I saw the flat thing (I noticed it in the code). I don't think it would work in the particular case I ran into as the two discs are at the same level. As you say though, if I do a bit of grepping I could probably catch and adjust many of those before I start.


I dont really count myself as a real developer, but I released a little thing I have been using on github last week: https://github.com/digitalsushi/osx-filesystem-tags-music-pl...

I am using the OS X 10.9 filesystem tags as playlist markers for my music - dirs or individual songs. I can just run my script and it will create m3u playlists off of all the tags I have applied.

I really wish these tags worked in linux. I'm obviously on a mac, and it hurts my heart I can't use it 'where I come from'. Cause I find it ridiculously simple/useful.


Most often these days, distros ship with filesystem extended attributes enabled (though you might have to add the user_xattr flag to the mount options to be able to actually use them).


Why should I use this, as opposed to something like mpd and ncmpcpp?


They're entirely different. mpd is an audio daemon that plays audio. Beets is a tool for organizing/tagging your audio files. There's a plugin for Beets called 'bpd' that acts like an mpd server on top of your beets audio library


I can't say I know all the in's and out's of these two tools but I don't think they have build in auto-taggers and a library management like beets does.


Thanks for the tip guys! One thing I found annoying was that it could not add replaygain for flac. To get around this, install metaflac and execute the following:

    find somealbum-with-cds -type f -name "*.flac" -print0 | xargs -0 metaflac --add-replay-gain
Then import as normal and it will have replaygain included (and store the replaygain in the library).


I see that they are plugged into musicbrainz[1]. Other than being a CLI, has anyone used this and picard[2]? What's the difference? I've used picard a lot.

[1] http://musicbrainz.org

[2] http://musicbrainz.org/doc/MusicBrainz_Picard


I used to use Picard as "pre-processing" step. I ran any new music through it before I added it to my music player's library. You can use beets in exactly the same way if you want, and it would be a like-for-like CLI replacement.

The key difference that Beets brings is to unify the concept of a tagger with the concept of a music library, which made a lot of sense in my mind.

In other words, Beets maintains a persistent database of your music collection, which can be kept in sync with Musicbrainz. You can query the database from the command line to get a list of files, and then pipe that list into a music player of choice, or just query the database from a script or web-app and build your own lightweight music player.


beets keeps a persistent index of all your music, and manages it as a whole library. It has a bunch of plugins, including a web-based music player, and provides a rich Python API if you want to extend it yourself. You can use beets as a CLI replacement to Picard, but beets offers a lot more to the hacker.


Cool - I'll set this up tomorrow, it looks good and my Music library is a mess.

It would be nice to have a centralised repository on the website where people can share plugins (like Sublime's Package Control, which is 3rd party). Programmable is great, but it would be a shame if everyone had their own half-arsed solutions to common problems.


Not exactly what you are asking for but there's a section about available plugins on the website [0] and I guess you could submit your own plugins with a pull request [1].

[0] http://beets.readthedocs.org/en/v1.3.3/plugins/index.html

[1] https://github.com/sampsyo/beets/blob/v1.3.3/docs/plugins/in...


I can't find the config to make in-place auto-tagging and renaming for singletons. At the moment I'm setting move: yes, singleton: <path to some temp directory>, running an import with -s and then manually move the renamed tracks back to the original directory. Is there a simpler way?


This looks like a pretty sweet non-Windows solution to the lack of foobar2k. As I'm currently using Windows, though, I can't see myself changing over. Foobar2k is just too good.

Anyone else have experience with both, and would like to share their experiences?


It's a CLI python app, so I'd have though that it was Windows friendly.

I spent days trying to organise my collection of music (and still haven't suceeded). It's in many formats. In the past I've stripped metadata and just relied on file names, and file structure. I've later re-added it, due to helping playback on some devices. Tagging generally annoys me, and doesn't bring me much. The thing I'd quite like is sleeve notes, and good track info, who wrote the song, which artists played on it etc.

Anyway I have tried a mix of quodlibet/exfalso (with plugins), foobar2k(with wine), mp3tag, and shell scripts. Then I discovered beets, and thought wow that's great. Only to later forget about the application and return to the laborious task of sorting out my files. I rediscovered beets and tested it on a directory of music and was pretty impressed with the ease of it all and the results. Far easier than attempting it by hand.

Having said that the bit that takes me the longest is gathering up and organising orphans. If they are albums, I have to get them into order, then try and locate the tags. Or pepper the files with enough clues, for a tagger. It's all a bit of a yawn fest.

Which reminds me, I bothered to apply replay gain to most of my albums with foobar2k but that sometimes results with very quiet playback on some albums on one of my players at least. I then curse profusely, and just want to rip all of the metadata back out, or even just throw the lot away...


Anyone know how I can install this without PIP? I just spent time getting rid of the multiple package managers I had because they were causing conflicts. Now I only use homebrew and have no interested in adding more.


http://beets.readthedocs.org/en/v1.3.3/guides/main.html

"To install without pip, download beets from its PyPI page and run python setup.py install in the directory therein." - https://pypi.python.org/pypi/beets#downloads


Thanks. I made the mistake of assuming that the git read me "pip install beets" was an requirement because it said install and then read this.

"You can install beets by typing pip install beets. Then check out the Getting Started guide."


Serious question: what conflicts were you getting between pip and homebrew?


Not PIP specifically. I had homebrew and macports problems. I remember RVM was complaining about it. I didn't really use ports for anything so I just got rid of it. I don't really know much more than that.


This looks awesome, and I've been wanting a library like this for some time. Only thing is that I'd need a C/C++ version. Is there one out there like that?


Curious why you need a C/C++ version?


I want to integrate it with a fuse filesystem


Someone has done this for beets some time ago already: https://code.google.com/p/beetfs/

But it has bitrotted pretty badly.


Well, there's fusepy and fuse-python.


FYI, a neat existing command-line music player that's already on debian repositories (and I'm guessing others as well) is called `mocp`.


beets is also in Debian: https://packages.debian.org/sid/beets


I'm wondering if it's valid to file a bug that Debian's source for beets is in SVN whereas beets moved to Git, and could be handled with git-buildpackage now.


That is just for the ./debian/ package directory. I think it is up to the DD how they want to maintain the packaging files. The BPP[1] do not mention anything about matching uptreams choice of vcs.

You could file asking to package the latest upstream and casually mention the discrepancy:) I have just been building beets with uupdate lately. Debian's package is five months behind upstream.

[1] https://www.debian.org/doc/manuals/developers-reference/best...


This sounds like one of those wonderful programs I only wish I had the wherewithal to write. Hopefully I'll get to try it this weekend.


Would be perfect for my raspberry pi. Anyone tested?


I was going to ask the same thing. The pi really struggles with XBMC to the point where I've given up on it. A command line version I can control via ssh is just what it needs.

It says you need an html5 browser to play your music. Is there a plugin that can just play the music directly, so I can play via ssh and not have to kick off vnc?


Why would you need VNC?

You only need a browser. On the machine on which you thought you were going to run the VNC client, you open the browser and go to beets’s web UI. Then you pick some music to play, and beets streams it to the browser, which plays it on that machine.

If you actually want the Pi itself to be playing music, then you probably want not the beets web plugin but the BPD plugin, which emulates an MPD server. You can use any MPD client you want to control it – CLI on the Pi, one of the GUI apps over the network, whatever.

No matter what, VNC doesn’t enter the picture.


From what I can see, it's just a Python script, so you should be able to use it anywhere there's a Python interpreter. It has some optional compiled dependencies for features like ReplayGain that may not work on ARM, however.


I've heard from lots of folks running beets on their Pi.


Will it play nice with my iTunes library?


Probably not. iTunes has its own sorting policy that may conflict with beets'. But you could still add them to the database without the sorting feature, if you just wanted to query files by tags.


I use beets as an importer (filename + id3 tags cleaning) and keep using iTunes for browsing/playing. I glue the two together by using importfeeds plugin + Hazel(http://www.noodlesoft.com/hazel) to trigger iTunes import. Should probably blog about my setup as it's not the simplest one but works great.


I'd love to see a blog about that!


Kind of off topic, but pianobar is a great commandline Pandora client, if you're into that sort of thing.


Ooh, this looks exactly like what I was looking for like ... a year and a half ago to go along with dmpc.


I've been using it for a year or so. Yet another happy customer and would totally recommend it.


I've used beets for all my music for like a year and half. It's stellar. Use it.


If only I had known about this before I moved all my music storage to iTunes Match.


Doesn't iTunes match support adding new content into iTunes (i.e., to be matched)?

Why would there be an issue here?


The issue, I assume, is that the parent poster would have liked to use beets on his or her existing music collection but now cannot because it's no longer local.


ah; nice.

A long time ago I was working on something similar: http://daurnimator.github.io/lomp2/

Got pushed to the side due to study; then work :(


Am I missing something or is the "web" command non existent?


Enable the web plugin first. :)


What would that command do?


It's showing in the (old) demo video [0] and makes it possible to query the database through a web interface. Maybe the web interface isn't enabled by default, add the plugin [1] to enable it.

[0] http://beets.radbox.org/

[1] http://beets.readthedocs.org/en/v1.3.3/plugins/web.html


Allegedly it starts a web server to browse + play music. I notice that theres a version disconnect between github (1.3.4) and pip (1.3.3) so I wonder if it snuck into that release.


I have been using this for a few months now. great work.


Does this deal with FLAC album images properly?


Yeah. use plugins embedart and fetchart


Yep. :)


Crap. I just realized what I said was completely ambiguous. What I meant was, does it deal with FLAC images of albums? (whole album stored in a single file with cuesheet.)


Beats Music sends C&D in 3...2...


Beets predates beats. Not sure that matters though.


Nobody likes beets, Dwight.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: