Tuesday, September 22, 2015

CentOS Sox playing MP3 from Command Line

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.


  1. Install RPMFusion
  2. Remove Sox
  3. Install the necesssary libraries and such for Lame
  4. Make a local directory fo SoX
  5. Get SoX using wget from sourceforge.
  6. Extract Sox
  7. Run configure
  8. You should see lame in the list from the configure output
  9. Run a make
  10. 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

0 comments:

Post a Comment