Home page of this blog

Thursday, July 1, 2010

Who inspired me with commandline mp3 player

This is about my friend Arjun (http://www.blogger.com/profile/12608024685176859481) who is another author to this blog. He inspired me towards command line.

When we friends were discussing about mp3 players like  winamp, windows media player he shocked all of us by telling he used/uses mpg123 from command line to play his mp3 songs

Do you wish to play mp3 from command line like him? Read further if you have ubuntu or fedora( if you are an Arch user, you are most probably a geek and most probably a linux guru and I won't be teaching you how to do "sudo pacman -S mpg123" from command line)

So, to install this commandline mp3 player in Ubuntu

sudo aptitude install mpg123


If you have Fedora, then in Fedora commandline (remove sudo from command, if you are a super user)

sudo yum install mpg321


To play a single mp3 song from command line

mpg123 <your mp3 file >

To play multiple mp3 songs

mpg123 *.mp3


or

mpg123 <mp3 1> <mp3 2> ...

To play a mp3 URL

mpg123 <url of the mp3 >






To know more about mpg123, use man mpg123 from commandline

5 comments:

  1. you could also easily create playlist files and play them all in shuffle or random mode...which is what I did often.
    Just a list of filenames, path\filenames creates the playlist. Sample below:
    ls *.mp3 > playlist1
    To play the playlist:
    mpg123 --list playlist1
    To shuffle songs in the playlist, use -z and to play songs forever picking randomly, use -Z

    ReplyDelete
  2. It is great idea for programming lovers and I am thinking that how I can not think about it because I love to listen music and also like programming very much.
    cheap mp3 player

    ReplyDelete
  3. the rhythmbox-client also affords the opportunity to play from commandline. add those commands as aliases to your .bashrc file and you'll have a pretty neat-o experience.

    ReplyDelete
  4. this was quite informative....thank you

    ReplyDelete