Mac Tip: Terminal – afplay MP3 Player

This Mac tip is provided by Mark Greentree and was originally posted on Mark’s blog – Everyday Mac Support. For more of Mark’s tips visit his site, follow him on Twitter, or browse his archive of posts here.


How To: Use the Terminal afplay MP3 Player

Yes the Terminal application has a MP3 player. You can play a series of music file formats which include AIFF, WAV, MP3 and M4A.

In order to do this we will need to use Terminal. To locate Terminal simply navigate to your Applications folder then to the Utilities Folder. Within the Utilities folder you will locate Terminal.

Simply launch and then enter the following, followed by return:

afplay /Volumes/share/Music/Avenged\ Sevenfold/Nightmare/01\ Nightmare.mp3 

Now your directory will be different than mine as shown above as it depends where you store your music files.

After clicking return you will notice that the song in question will start playing.

When you want to stop the track simply press Control-C on your keyboard whilst in the Terminal window.

There are no fine detail controls and even if you have a folder full of music it will only play the song which has been entered. Still it is a cool feature.

 

Warning: Terminal commands have the ability to change the running operation of your Mac. Please copy and paste the Terminal command as shown directly from the article. Mistakes in keystokes can cause your Mac to perform differently and may in-fact result in a loss of data. It is advised that you only use the Terminal if you feel comfortable with the command line interface. If you are ever unsure please consult your local tech support person.

Mark Greentree

Mark Greentree is the principle blogger and podcast creator of Everyday Mac Support. His aim is to inform users at all levels of experience how to get the most out of the Apple hardware and associated software. He is the lead host of Not Another Mac Podcast, an Apple based round table discussion with Mac users and experts from all over world.