![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT9KbGJMcNL-RvpPkrNs300PjreUs2NBg1wBM-7tAyhMWMKMpCkhu_vSFCqEUeO3YzrMIkdGjOfGQKE_QnU30pXTE8foJ7R6z8OtZCNkTzfzI2IBJDvKAYkDJmDBKbpMuKVbNdrwLFpgk/s320/mac-tux.jpg)
A command line audio player can very useful to those who want to play sound files while conserving system resources. It can also be used along with a shell script and Automator action.
The OS X command line audio player that I'm talking about is called afplay.
Since afplay is in your path by default (located at /usr/bin directory), you can play audio files directly with a simple command like in this example:
afplay audiofile.mp3
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyrK0FcbwWX0z2IrTjev6gBX-6ZMtAc1F2u4pk4anRJ9lak-L-LVxNz9YCDcJkXy1I7e2slAsYZa63-N2cr5FymimFrQkbEzbnF9f4iqaj8Kwn-49tGWgUB0KLUsUlAawbLjvhT_5fvJY/s400/afplay1.jpg)
There are a few options that you can display using help: afplay -h. You can also display the man page: man afplay.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEuNJmZmncse0uIdxv1cJOFmHvqQeejfTYAepjMQ1DQK6Kq1k9bHjMabE15uhw4_TqIJ1cFEWHEE8-0kjFbigmrAxjdrX_ncSrCCWvpJMqRLTTspuNzm5AKOwpSZewnJ6iWMalubo0dnw/s400/afplay2.jpg)
If you want a powerful CLI audio player, Linux has plenty to offer. Right now I'm using mp3blaster and MPlayer. But, that's another story :-)
Don't forget mpg123 for linux.
ReplyDelete