Command Line MP3 players for OS X – Sounds Odd? If we can play SoundCloud From Command Line Interface, what is the problem with playing the local files! OS X comes with an included audio player but we will give you some more Command Line MP3 players. Yes, as can be expected, these Command Line MP3 Players are more faster versus the GUI based MP3 Players and are less resource hungry.
Command Line MP3 Players for OS X : The Default afplay
The default player is actually not bad! It can play MP3, AIFF, WAV, m4a etc. files. Indeed it is partially documented :
1 | https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man1/afplay.1.html |
Practically you need to Change Directory (cd command) to the directory where the file to played is located and run this command :
---
1 | afplay Example.mp3 |
Where Example.mp3 is your song file. To stop playing, you need to Quit iTerm2 or Terminal, relaunch it again and run this command :
1 | killall afplay |
Also, you can see the full manual by running this command :
1 | afplay -h |
But, this is not quite agreeably good MP3 Player. Do not worry, there are lot of people like us.
Command Line MP3 Players for OS X : Third Party Full Fledged MP3 Players
We found at least 4 Command Line MP3 Players on GitHub :
1 2 3 4 | https://github.com/junwatu/nmp3 https://github.com/zr0z/muse https://github.com/yazzielabs/cliMP3Player http://herrie.info/ |
Our favorite package manager Homebrew supports Herrie, so installation is easy :
1 2 3 | brew install herrie #doc http://brewformulas.org/Herrie |
It will take a bit time to get installed. As we do not have to build it manually, its quite easy and demands only time to get installed. Herrie itself is a small command line music player. It has vim-like controls with cursors and has some unique features, like chroot()’ing and dropping privileges. You need just to type herrie to launch the Player. It is beautiful. You can browse using the keyboard arrow keys. Navigate the directory tree with cursor keys or h-j-k-l, add files with the a key.
If you run Herrie in XMMS mode launch with herrier -x flag, the z-x-c-v-b keys will be control back, play, pause, stop and next.
Tagged With afplay -t