ajws7036
Posts: 23
Joined: Mon May 27, 2013 2:24 pm
Location: Whitehouse, Ohio USA
Contact: Website

MP3 issues

Sun Jun 23, 2013 8:49 pm

Hello again, I have a little issue. After getting power issues and usb hub issues sorted out, I finally have a small media center going with my Pi. But the issue is mp3's. My pi successfully plays CD audio, but audacious has problems playing MP3 files. And mplayer... when I type

Code: Select all

pi@raspberrypi$ mplayer cdda://
into the terminal... mplayer plays the cd, but skips, and pauses every few seconds. How can i fix this?

On the other side, XBMC is giving me a headache also. XBMC plays hour-long AVI files perfectly, but it gets errors playing mp3s and cd audio. I have XBMC installed under raspbian, as I wanted both the desktop and xbmc. How can i get xbmc to play successfully, mplayer to play successfully, and audacious to play mp3's e.g. from an external drive?

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: MP3 issues

Sun Jun 23, 2013 9:14 pm

I've never heard of audacious but if it has audio enhancements like a graphic equaliser you're advised to disable it.
I use qmmp for music playback on the X desktop it supports Winamp skins and Winamp playlists.
If you install qmmp you must turn off the graphic equaliser otherwise the audio stutters (CPU isn't powerful enough for enhancing audio).
As for console apps Music on Console is another good alternative (mocp / moc) for playing mp3 files.

Richard S.

dawnmew
Posts: 2
Joined: Mon Jun 24, 2013 1:38 am

Re: MP3 issues

Mon Jun 24, 2013 2:05 am

Have you tried using OMXplayer? It's the only player designed for the Pi's hardware specifically, and I've never had any problems playing MP3 with it.

Syntax:

omxplayer -o hdmi --vol -2000 "Your MP3 File Here.mp3"

Replace "hdmi" with "local" if you want to use the 3.5" jack instead of HDMI. The -2000 is the volume offset in millibels (I find -2000mB to be a comfortable listening volume), make it higher (ie. closer to zero) if you want it louder and lower if you want it quieter.

ajws7036
Posts: 23
Joined: Mon May 27, 2013 2:24 pm
Location: Whitehouse, Ohio USA
Contact: Website

Re: MP3 issues

Fri Jun 28, 2013 3:25 pm

Alright, so my question is how do I Play cd's with omxplayer? through xbmc? Because when i type in

Code: Select all

pi@raspberrypi ~$ omxplayer cdda://
omxplayer can't seem to find my CD. And xbmc uses omxplayer, so what do i do?

WacoJohn
Posts: 81
Joined: Wed May 15, 2013 9:30 pm
Location: Waco, TX USA

Re: MP3 issues

Mon Sep 23, 2013 9:13 pm

dawnmew wrote:Have you tried using OMXplayer? It's the only player designed for the Pi's hardware specifically, and I've never had any problems playing MP3 with it.

Syntax:

omxplayer -o hdmi --vol -2000 "Your MP3 File Here.mp3"

Replace "hdmi" with "local" if you want to use the 3.5" jack instead of HDMI. The -2000 is the volume offset in millibels (I find -2000mB to be a comfortable listening volume), make it higher (ie. closer to zero) if you want it louder and lower if you want it quieter.
Here is what I get:

Code: Select all

pi@raspberrypi ~/Desktop $ omxplayer -o hdmi --vol -2000 "Bill Black's Combo - Smokey - Part 1.mp3"
Invalid framerate 90000, using forced 25fps and just trust timestamps
Video codec omx-mjpeg width 600 height 600 profile -99 fps 25.000000
Audio codec mp3 channels 2 samplerate 44100 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
and it sits there ... nothing happens. Hit ctrl-C and get:

Code: Select all

have a nice day ;)
Model B PI/Raspbian wheezy

WacoJohn
Posts: 81
Joined: Wed May 15, 2013 9:30 pm
Location: Waco, TX USA

Re: MP3 issues

Mon Sep 23, 2013 10:49 pm

ednl wrote:
WacoJohn wrote:omxplayer -o hdmi --vol -2000 "Your MP3 File Here.mp3"
Probably plays fine but inaudible because you set the volume too low? Try without the --vol parameter.
Great idea .. but the problem was I forgot to direct audio to HDMI in config.txt ... DUH! For me, --vol -2000 was 'just right'.
Thank you for your help.

User avatar
Cancelor
Posts: 778
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: MP3 issues

Sun Oct 06, 2013 8:54 am

I have the same problem but where is config.txt and what do I edit? Why isn't it just set to work by default?
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

WacoJohn
Posts: 81
Joined: Wed May 15, 2013 9:30 pm
Location: Waco, TX USA

Re: MP3 issues

Sun Oct 06, 2013 1:14 pm

Cancelor wrote:I have the same problem but where is config.txt and what do I edit? Why isn't it just set to work by default?
It is in your BOOT folder.

Open LEAFPAD, open file, .. browse to BOOT folder (in File System) and edit config.txt.

Change

Code: Select all

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
# hdmi_drive=2
to

Code: Select all

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2
save file and reboot.,

User avatar
Cancelor
Posts: 778
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: MP3 issues

Sun Oct 06, 2013 4:52 pm

It works! :) thnx WacoJohn
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

WacoJohn
Posts: 81
Joined: Wed May 15, 2013 9:30 pm
Location: Waco, TX USA

Re: MP3 issues

Sun Oct 06, 2013 7:30 pm

Cancelor wrote:It works! :) thnx WacoJohn

Glad to hear it. Good luck to you.

jenks
Posts: 1
Joined: Mon Aug 13, 2018 6:39 pm

Re: MP3 issues

Mon Aug 13, 2018 6:52 pm

I had audio issues similar to that of the OP. Playing audio files with mplayer, omxplayer or any audio player caused random noise introduced into the playback through my SYBA external USB Stereo Sound Adapter. The problem was unaffected by the player used, the audio format (mp3, ogg or wav), or how busy the processor was. The noise seemed to coincide with SD card activity and made me wonder if the power supply was fluctuating due to the demands of the Pi, as suggested above. I thought of connecting a capacitor across the 3.3v pins on the Pi but worried that the large current draw when turning the Pi on might burn out the voltage regulator.

So instead I switched the Pi 3B with a Pi 3B Plus. This solved the issue and I haven't noticed noise since.

DirkS
Posts: 10445
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: MP3 issues

Mon Aug 13, 2018 7:18 pm

jenks wrote:
Mon Aug 13, 2018 6:52 pm
So instead I switched the Pi 3B with a Pi 3B Plus. This solved the issue and I haven't noticed noise since.
Of course that wasn't an option at the time this topic was written... ;)

Return to “Media centres”