Convert and play audio clips via Mac command window

The Mac command window has a wide range of features and characteristics that make it distinctive in use and make it easier for you to use the system in general.

By using specific commands, you can play audio clips on Mac devices, in addition to converting them, changing their format, and knowing clip information.

Macs have recently started supporting these new commands, so you won’t find much information about them on the hardware information pages.

Read also: How to leave a message on the MacBook lock screen

Play audio clips via Mac command window

You can play audio clips in the command window by following these steps:

Head over to the Command Prompt app by searching for it under the apps list, and then type afplay followed by the title of the audio track.

So the end result of this command line is as follows:

afplay /Users/aitnews/Desktop/test.mp3

You can add & disown to automatically close the command window after the clip plays, and the final command will look like this:

afplay /Users/aitnews/Desktop/test.mp3 & disown

You can also close the audio clip via the command window and type the following command:


Also Read: How to Hide Icons in Mac Settings

Get information about the audio clip

You can use the afinfo command in a similar way to the afplay command, but this command displays a set of information about the audio file you are trying to play.

When you use this command, the result will be as follows:

afinfo /Users/aitnews/Desktop/test.mp3

It also shows a set of data related to the following figure:

File:           /Users/aitnews/Desktop/test.mp3
 File type ID:   MP3
 Num Tracks:     1
 Data format:     2 ch,  44100 Hz, 'lpcm' (0x0000000E) 16-bit big-endian signed integer
                 no channel layout.
 estimated duration: 32.693424 sec
 audio bytes: 5767120
 audio packets: 1441780
 bit rate: 1411200 bits per second
 packet size upper bound: 4
 maximum packet size: 4
 audio data file offset: 54
 not optimized
 source bit depth: I16

This data is also useful for audiophiles who want to determine the quality of their audio clips and know their details.

Also Read: iOS 15 Tricks That You Should Use As Soon As It Releases

Convert audio tracks via Mac command window

You can convert audio file formats via Mac command window easily by executing afconvert command.

You can control all the details about the resulting audio file by using this command.

This also enables you to change the encoding rate of the clip, its resolutions, and all the details related to the clip.

You can learn more about this section by typing afconvert -h to show you the information, details and various uses for it.

Also Read: Delete Location Data from iPhone Photos You Send

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button