Hacker News new | past | comments | ask | show | jobs | submit login
Cmus – A Small Terminal Music Player (cmus.github.io)
180 points by senorgusto on Oct 22, 2015 | hide | past | favorite | 66 comments



Oh wow, did not expect this here! I am the current maintainer (not the original author) of cmus, and can answer some questions, if they'll come up.


Not a real question, but a sincere Thank You for the efforts. I believe maintainers should be praised more.


I've been using cmus for a few months now. After trying countless music players on Linux and feeling frustrated that none of them ever felt right, cmus was the first one I thought I could get used to. In fact, I think it's the first project where I'd rather contribute new things than try to find a new project where more things feel right. So if I ever find the effort, I'll see about digging through the code and adding a couple things.


This is really extremely nice. Some questions:

I noticed that after adding a folder to the library, it simply adds all the filepaths in that folder to lib.pl. It doesn't cache any of the metadata. This means that it has to rescan everytime. I'm wondering what thoughts went into that design decision. On the one hand, it's very easy to manage, since it's just a list of files. On the other hand, for large collections, startup time can be considerable. I have 109GiB of music, but with a top of the line SSD, it only took ten or fifteen seconds to scan the whole thing, which isn't bad.

On a similar note, it appears that because it adds all the files to the lib.pl file, and not the top level directory I added, it doesn't have any support for noticing when new files are added to my ~/music folder. This means I have to re-add ~/music when I add files to it. I guess that's not too bad. And I assume it won't add duplicates or anything if I re-add the root level directory. But what about when I remove items? Will it be smart enough to detect that they're not there? (An algorithm like: "I just traversed a directory for which there is an existing file entry in lib.pl, but during this traversal I didn't see it. I should therefore remove it.")


Cmus does cache all the metadata — in the file named, unsurprisingly, «cache». You can restart cmus, and notice that the startup will be instant (even on an HDD with 100+GiB of music).

Re-adding the ~/music should work fine. There is also an `:update-cache` command which will update the metadata for all (changed) files, and remove the missing ones.


Another thanks here. I'm between cmus and mocp at the moment due to the segfaulting bug on Debian[0] but might try to compile the latest version from source if these have been squashed upstream...

[0] - https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=cmus;dist=...


Please give the latest version a try. I am not aware of any segfaults that have not been fixed upstream. Debian packages a really ancient version of cmus for some reason.


Thanks for the encouragement. Had a bit of fun getting it to build correctly[0], but got there in the end! Would love to create a new Deb package but haven't done it before, am short on time etc. - maybe another day.

[0] - https://github.com/cmus/cmus/issues/347


For future reference: Always start with `apt-get build-dep packagename` Whenever you are trying to build a newer version of some software that debian also packages. There is no reason to start from zero and have to discover this information for yourself one build error at a time. If you want to see what the `build-dep` list is without actually running `build-dep` try `apt-cache showsrc packagename`


Much appreciated - found that (build-dep) out the hard way before checking back here (issue updated for others)... and thanks to the showsrc tip.


Thanks for restarting development and having good releases, with easy to read changelogs! Cmus has been very useful to me.


I love cmus! Please continue the good work. Are there any changes lined up for the future we should be excited about?


Would be neat if you could also include streaming services like Pandora. I use Pianobar https://github.com/PromyLOPh/pianobar for Pandora would be nice to have some streaming tie ins. A one stop music resource so to speak. A book mark system to listening to Internet radio like cmdradio https://cmdradio.codeplex.com?


No questions from me; just appreciation for the work you are doing. Thank you.


How do I select a specific output plugin? When I try to run cmus on OSX I get an error:

Error: selecting output plugin '': no such plugin

'cmus --plugins' lists a single plugin: ao.


Create a

    ~/.cmus/rc
file and add

    set output_plugin=ao
that should get it working on OSX.


Thank you! I struggled with that for so long, and ended up installing via brew after giving up on a source build. Weird that even that process didn't set up the rc file properly.


One thing I would love to see is a folder-based music view like you have artist/album views.

I don't tag my songs, I just organise them in folders about three levels deep. What I'd like to see is a folder tree of my music folder on the left and all the files in that folder, plus all subfolders recursively, on the right. The only player I remember getting this right was amarok (now clementine). I've never once in my life ever wanted my songs listed by album or artist. I have my file manager to organise my files and they're already organised. It's really silly to ask me to organise them again in a different way that doesn't really fit my organisational style.


Moc does that. If like me you're not a music player guy you can use mplayer in slave mode, reading from a playlist created with `find | sort`. I made a script to do that and some other stuff. https://gist.github.com/afarah1/e8cbafaf1d9d8029c6ca


Ooh, thanks. I did pretty much the same as you (but in perl) for a while and gave up on it, since I decided like having a UI to my music player.


Ditto - automatic organisation by metadata might be nice if metadata wasn't universally inconsistent and incomplete. I tried manually fixing my whole library and it was nice for a couple of weeks, but there's so much ongoing maintainence overhead that OS-level folders are the only thing I bother with any more :(


one possibility might be to let beets handle all the music organization while cmus just leverages that to provide different views on that data using beets.

just a separation of concerns really...


The metadata doesn't even reflect the way I think about music. And what do you do with movie OSTs, which are by ten different artists and some are songs from other albums? It's just madness.


I use beets for tagging, and it has no trouble with OSTs. It sets a different tag for Album artist and Track artist, and cmus uses the Album artist. Most soundtracks of the type you mention are under <Various Artists>.

I'm different from most people in that nearly all of my music collection is complete albums, so if that's not the case, then I could see how a file/folder layout would work better, and the artist/album view is more full-featured than the file-browser view.

[edit] Also as far as I can tell, there's no way to filter based off of path (only filename) which might also be a good way if you prefer directory based organization.


I tag my music through MusicBrainz (https://musicbrainz.org/) and I generally don't have to worry about metadata anymore. I generally try to correct anything I find that's wrong. abcde + picard + ncmpcpp.


MOC does that


It's kind of relevant here, but VLC can also run inside a terminal.

  vlc -I ncurses


Noticed it when installing it on openSUSE, but VLC wont install any codecs that get installed on Windows, not sure what the legal issue is with that but it might as well be a paperweight on my laptop as is. Maybe I'll give it a shot as a terminal music client. On another thought, does that mean VLC somehow displays video with ascii? hah


Cool! How heavy is this on ram and cpu?


I used cmus for a while, but always wanted a user interface more similar to winamp, so I built namp https://github.com/d99kris/namp


Nice work there, that looks pretty good.

I do have one very minor suggestion though; you might want to change your README.md:

    > namp is a command line MP3 player for Linux
Technically it's a terminal player rather than command line.


Thanks for the feedback! Yes, I agree. Terminal, or console-based, player is a more correct description. Will update!


Some time ago I did complete depart from Apple apps and services, while still using Mac. It was pain to extract all the images from Photos but music transition to cmus was smooth. I am mostly playing di.fm stations and cmus works well with subscription links. Sadly both cmus and mplayer on Mac rely on Carbon components so there is big console warning for using deprecated components and more importantly they can't be send to background. If somebody got them playing as background process please let me know.


About «backgrounding» — please see https://github.com/cmus/cmus/wiki/detachable-cmus .

Carbon components warning is because cmus currently uses libao for the sound output on OS X by default. If somebody will contribute a native OS X output plugin, it will be gone.


Thanks. I am most probably on exit route from anything Apple or Google so most likely next cmus will be playing on native Linux for me. Off topic but Apple increasingly makes it easier to make such decision.


I use CMUS under byobu.


I've been using cmus for the past two months and absolutely love it! Its simplicity compared to many other ncurses-based applications is refreshing.

My only wish is that it was a bit more "vi-y". I'm sure someone has a way, though ;).


I use moc ( http://moc.daper.net/ ) but seeing the example command on the cmus homepage (:seek +1m) makes me want to test it.


I used cmus before I found moc on Crunchbang. The feel of moc was just right for me.

I wrote down how I use moc[1]. Hope someone might like it. Also I tried to make navigation feel like vim sometime back. The keymap[2] might have a few tips.

[1] https://chanux.wordpress.com/2013/04/25/the-thinnest-music-i...

[2] https://github.com/chanux/dotfiles/blob/master/moc/keymap


Yeah, thanks for sharing. I am also a moc enthusiast. Your post inspired me to add key bindings for moc commands to my awesomewm's rc.lua.

Oh and since I have no use for the audioStop key I made it run a python script that displays the name of the current song via dbus.


My two cents: I used cmus before, but in the long term I still prefer mplayer.

I construct the playlists myself by using soft-links to the actual paths of the songs. Real files are placed in sensibly named directories.

It's a matter of taste of course. Still I really appreciate that people write this kind of software for the terminal!


Have you tried mpv?


cmus user here. Its the only music player on my machine, but I'm using it less and less every day (Google Play Music)


It looks like cmus can use streams. Have you tried GMusicProxy http://gmusicproxy.net/ ? I use it with mpd but it should work with cmus as well. It's nice not to be able to access google play music via a regular music player.


Same here. But when it comes to playing music stored locally, I’ve been using cmus for many years without trouble.


I've found this issue helpful in getting cmus working on OS X El Capitan: https://github.com/cmus/cmus/issues/331


I've used cmus a bit and really like it--the simplicity is great if you have a lot of albums. Graphical players always bog down, are slow to scroll, etc.


Very nice, does it have a music visualiser ?

It would be sick if this could play videos via libcaca too..


For visualiser, you might like https://github.com/karlstav/cava

For libcaca, see mpv's or mplayer's "-vo caca" flag.


I also recommend mpd + ncmpcpp.


mpd + ncmpcpp is my favourite too. It's made my music so easy to access, while allowing me to organize it the way I like it - by directory.


cmus is great! Loads fast, low resource usage, and well, just works without any configuration unless you want custom settings and colors.


cool. Unfortunately, I get all my music from spotify now. No more mp3s.


If you'd still like to use a terminal player you should check out mopidy: https://www.mopidy.com


This is cool! I was working on something similar but more specifically for my office to democratise our office music with voting and so on, after Soundrop disappeared off the face of the earth. It only supports Spotify at the moment, but the plan was to eventually add soundcloud support as well as file uploads.


I'm curious... Is mopidy like mpd in that clients that connect are only able to edit the playlist? Or can they themselves play songs?


It's not just like mpd, it is mpd + a HTTP server. Ergo you need to control it with a CLI or graphical mpd client or with a web client.


It is absolutely not MPD, it has a partial implementation of the MPD protocol.


If the economic incentives spotify offers are any indication, you may be correct in more ways than one.

(Remember, kids, you're sending a clear signal about what's valuable with your purchases. And if you're using spotify, it isn't the artists whose music you're listening to.)


Consumers usually purchase things based on individual needs, not messages they want to send. It is only in rare instances do consumers actually manipulate the market by deliberately controlling what they purchase, the term is called boycott.


Same here... but I've been thinking of switching as mostly I just listen to a few playlists. Are there any tools to let you easily purchase songs on iTunes / Amazon / etc based upon a Spotify playlist?


I also would like to know this, I want to try something different than Spotify. But every time I try, I miss all my playlists, and switch back to Spotify again.


Any support for windows ?


It sounds like cygwin can compile and run it: http://matthieukeller.com/2015/01/compiling-cmus-for-cygwin....


10/10, fav music player


God, I'm dyslexic....




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

Search: