# qtplay & mpg123 export PATH="/opt/local/bin:/opt/local/lib:/opt/local/include:/opt/local/man:${PATH}" alias port=/opt/local/bin/port port list | grep -i audio port info qtplay port info mpg123 /usr/bin/sudo port -c install qtplay /usr/bin/sudo port -c install mpg123 mpg123 file.MP3 qtplay file.MP3 qtplay 'http://file.mp3' qtplay 'http://file.mov' # http://www.apple.com/trailers/ #----------------------------------------- # play, http://www.hieper.nl/html/play.html export PATH="/usr/local/bin:${PATH}" # create /usr/local/bin /usr/bin/sudo /bin/mkdir -p /usr/local/bin /usr/bin/sudo /usr/sbin/chown root:wheel /usr/local /usr/local/bin /usr/bin/sudo /bin/chmod 0755 /usr/local /usr/local/bin cd ~/Desktop curl -L -O http://www.hieper.nl/downloads/play.dmg hdiutil mount ~/Desktop/play.dmg open -a Safari '/Volumes/play 1.3/readme.html' /usr/bin/sudo /bin/cp -i '/Volumes/play 1.3/play' /usr/local/bin ls -l /usr/local/bin/play hdiutil unmount '/Volumes/play 1.3' play ~/Music/Winterreise/Gute\ Nacht.mp3 # listen to the first 10 seconds of each Schubert song on your computer mdfind "kMDItemComposer == Schubert" | play -vt 10 #------------------------------------------------------------- # afplay # compile & install afplay and related command line audio tools (Mac OS X 10.4.11) # requires Xcode, http://developer.apple.com/tools/xcode/index.html ls -1 /usr/bin/af* # Mac OS X 10.5 ls -1 /usr/bin/au* # Mac OS X 10.4 open /Developer/Examples/CoreAudio/Services/AudioFileTools/AudioFileTools.xcodeproj # ... then just press "Build" ls -l /Developer/Examples/CoreAudio/Services/AudioFileTools/build/Development-Panther/* | nl ls -1 /Developer/Examples/CoreAudio/Services/AudioFileTools/build/Development-Panther/* | nl #/usr/bin/find /Developer/Examples/CoreAudio/Services/AudioFileTools/build/Development-Panther -mindepth 1 | \ # /usr/bin/xargs -I '{}' /usr/bin/sudo /bin/cp -i '{}' /usr/local/bin /bin/ls -1 /Developer/Examples/CoreAudio/Services/AudioFileTools/build/Development-Panther/* | \ /usr/bin/xargs -I '{}' /usr/bin/sudo /bin/cp -i '{}' /usr/local/bin ls -l /usr/local/bin/af* ls -l /usr/local/bin/au* afconvert afinfo afinterleave afplay afrecord auprocess auprofile # background music # cf. http://codesnippets.joyent.com/posts/show/1508 /usr/bin/screen -d -m afplay "/path/to/file.MP3" kill -HUP $$ kill -HUP $PPID killall -HUP Terminal apropos audio apropos sound # set global Mac OS X sound output volume # see http://osxutils.sourceforge.net man setvolume setvolume 50
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Command line audio players for Mac OS X (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Switch to the login window f... in shell osx mac bash unix window login screen access lock keychain
» Vertical & horizontal split ... in shell osx mac bash unix vertical horizontal ipfw screen split
» Changing the bell sound of T... in shell osx mac bash unix terminal sound bell
» ws - web search from the com... in shell osx mac search bash unix commandline web
» snippet in shell osx mac html bash unix commandline web download convert textutil ed snippet
» Switching firewall settings ... in shell osx mac bash unix ipfw firewall ruleset switch
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails