99
21
I want to play music in the terminal with sox
.
# install sox/lame
sudo apt-get install sox
sudo apt-get install lame
# play music
play music.mp3
# play FAIL formats: no handler for file extension `mp3'
# mp3 -> wav
lame --decode music.mp3 music.wav
# play music
play music.wav
~ $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"
~ $ sox --version
sox: SoX v14.3.2
The size of music.wav
is +10 times larger than music.mp3
.
I don't want to convert all *.mp3
to *.wav
.
Is it possible to add mp3-handler to sox?
2
instead of the present accepted answer (lame/pipe), the correct/simplest answer is install
– michael – 2016-06-24T04:33:28.727libsox-fmt-all
http://superuser.com/a/421168/73961what linux distro are you on... and what version of the distro and sox are you running... also running
sox -h
reports codecs supported by the program... please check if mp3 is supported therein... – user1055604 – 2012-05-06T07:59:16.497