I simply wanted to play a MP3 from the command line as project 2 of the Amazon Dash Button hack. This took me way longer than I wanted so I thought I would put the instructions here. SoX is a utility that was installed with my CentOS out of the box, however it would not play MP3s by defualt.
I tried installing LAME using standard repos but that is apparently not going to happen. I finally found some like with RPMFusion.
Well SoX didnt really work for me. I was able to have some luck with VLC though. In order to install VLC you need to add the Desktop Repos.
http://li.nux.ro/repos.html
Execute this command to install the desktop repos
Then from there you can run VLC like so
I tried installing LAME using standard repos but that is apparently not going to happen. I finally found some like with RPMFusion.
- Install RPMFusion
- Remove Sox
- Install the necesssary libraries and such for Lame
- Make a local directory fo SoX
- Get SoX using wget from sourceforge.
- Extract Sox
- Run configure
- You should see lame in the list from the configure output
- Run a make
- Run make install
From here run the sox from the command line and MP3 should be in the list of supported files.
To play a file simply run sox and pass it a file name
Update
Well SoX didnt really work for me. I was able to have some luck with VLC though. In order to install VLC you need to add the Desktop Repos.
http://li.nux.ro/repos.html
Execute this command to install the desktop repos
Then from there you can run VLC like so