5

My Raspberry Pi 3 does not play mp3 files, including example.mp3 that came preloaded. When I execute aplay /home/pi/Sounds/example.mp3, I get the following:

Playing raw data '/home/pi/Sounds/example.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:1233: Sample format non available
Available formats:
- S16_LE

Most wav files can be played without incident. However, trying to play some of them results in the following:

Playing WAVE '/home/pi/Sounds/flint_phone.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono
aplay: set_params:1233: Sample format non available
Available formats:
- S16_LE
2
  • 1
    Looks very similar to this question on StackOverflow.
    – goobering
    Commented Jun 2, 2016 at 15:26
  • I have the same problem with certain .wav files, which play just fine on my mac with afplay
    – linuxdan
    Commented Aug 14, 2016 at 3:17

2 Answers 2

5

aplay cannot play .mp3 formatted files. For this, I use mpg321. You can install it with sudo apt-get install mpg321 and it works just like aplay:

mpg321 /path/to/example.mp3

As for the .wav files that aplay won't play, they were most likely either corrupt or were incorrectly converted from another format.

0

For me, mpg321 also didn't work. However, omxplayer did:

sudo apt-get install omxplayer

and then omxplayer /path/to/example/mp3.

Good discussion on the subject: https://www.raspberrypi.org/forums/viewtopic.php?t=241346

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.