Thursday 12 May 2016

Play audio file from Terminal on Mac OS X without iTunes

Guys, am sure this post will definitely interest you - how to play an audio file from Terminal on Mac OS X without using iTunes. Well, we play it using the "afplay" command.

Well here's what you need to do in Terminal :

afplay -q 1 --leaks /Users/ironcladzone/Music/Bo\ Saris\ -\ She\'s\ On\ Fire\ \(Maya\ Jane\ Coles\ Remix\).mp3 -d -r 1

Playing file: /Users/ironcladzone/Music/Bo Saris - She's On Fire (Maya Jane Coles Remix).mp3
Playing format: AudioStreamBasicDescription:  2 ch,  44100 Hz, '.mp3' (0x00000000) 0 bits/channel, 0 bytes/packet, 1152 frames/packet, 0 bytes/frame

Buffer Byte Size: 20135, Num Packets to Read: 19
Enable rate-scaled playback (rate = 1.00) using Spectral algorithm

-q switch is to set the quality level. 0 is default for low quality. Set it 1 for high quality version.

-d switch is for debugging which shows you the technical details like frames/packet, buffer byte size etc.

-r is the rate / speed of playback. Default is 1. Try changing it to 2 or 3 for speedier playback ;)

Oh and by the way, in case if you didn't notice, I was playing the cool Maya Jane Coles remix of Bo Saris' "She's on Fire". Maya Jane Coles rocks :)

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker