mp3s glitching

I have a model B raspberry pi with an IQaudio pi-dac running volumio 1.4. FLAC files play absolutely fine but when I play an mp3 file it glitches. The audio hangs for around a second then continues. The pi is running the performance governor with a max cpufreq of 1000MHz (it runs stably, and has heatsinks fitted), mpd is reniced to -20 and top reports cpu usage at only 4%. The files are stored on a network drive accessed via a RTL8912cu wifi dongle, but I would have thought if it was a network issue I would see it with FLAC files too. I have used rpi-update to update to 3.12.18+ firmware (the latest 3.12.29+ causes DAC driver issue for me) but the issue was the same with 3.10.36+. Any suggestions?

OK I seem to have solved this by putting the following in mpd.conf:

decoder {
plugin “mad”
enabled “no”
}
decoder {
plugin “ffmpeg”
enabled “yes”
}

It seems the libmad mp3 decoder plugin was to blame. With ffmpeg everything is better.

On second thoughts, it seems I spoke too soon. Changing the decoder improved matters but hasn’t cured them completely.

The same problem doesn’t occur on my Cubox (original Cubox, Volumio v1beta, external DAC connected by optical SPDIF). Slightly better processor (ARMv7) and it’s on a wired LAN connection. But it’s flawless using the default decoder, either mp3s or FLAC.

Hi!
I don’t think that your problem come from the power of the Pi. Mine non overclocked and connected in wifi plays mp3 without problem. As you saw CPU usage of mpd is low (4℅). Is there another process eating CPU? I don’t have your DAC so it’s hard to compare. Maybe gswg could help ?

No I don’t think so either, I overclocked it for an experiment I was trying, and haven’t bothered un-overclocking it, but there’s no reason it shouldn’t be able to decode mp3s. (I could even do that on my old 486DX2-66 back in the day!) My first thought was some kind of USB lockup, I know the RPi doesn’t have the best USB design in the world, but I don’t see why that would affect only mp3s.

Hi Adrian

No suggestions, just a few questions for now.

How are you playing the files ? e.g. Volumio User Interface using Web Browser.
If so what hardware do you have available to control or test with, e,g, PC, MAC, Tablet, Phone etc. ?
Have you tried with Enet hardwired instead of wireless ? Do you get the same effect ?
What are the bit rates for your MP3 and FLAC (kbps). Or what compression are the FLAC files ?
Do you get more than one hang up per track or can there be more ?

Kevin

How are you playing the files ? e.g. Volumio User Interface using Web Browser.

Yes, I am using the volumio UI using a web browser.

If so what hardware do you have available to control or test with, e,g, PC, MAC, Tablet, Phone etc. ?

I have tried it from a Galaxy S2 running Cyanogenmod and the Chrome browser (the UI is really slow in Firefox on that phone), also from Firefox on my Core i5 laptop running Kubuntu 14.04. The glitches occur from both machines. The laptop dual boots into Windows 8.1 so I could try Internet Explorer from there if you think it might make a difference.

Have you tried with Enet hardwired instead of wireless ? Do you get the same effect ?

I haven’t yet, but will do so tomorrow night and post back.

What are the bit rates for your MP3 and FLAC (kbps). Or what compression are the FLAC files ?

The mp3s range from 128kbps to 320kbps, mostly are 128 - 192kbps. (These are old tracks, I rip to or buy FLAC now.) My FLAC files vary from 96kHz 24bit bought from eclassical.com to 44.1kHz 16bit that I’ve ripped from my CDs. I’m not sure about the eclassical.com files but I’ve been ripping my CDs at compression level 8 (max). But the FLACs don’t cause a problem.

Do you get more than one hang up per track or can there be more ?

It varies. Occasionally there are no hangups in a track; usually there are several. I haven’t spotted a pattern to which tracks hang up more often. Very occasionally they’re very short, more like a stutter, but mostly they last around 1-1.5 seconds before playback resumes.

Hmmmmmm, Adrian this is very strange that you have 24bit/96kHz FLAC’s that work OK. The effective bit rate will be depend on the final compression but I imagine will be let’s say > 3000 kbps (which equates to 10x the data rate of your MP3’s) :confused:

Still worth testing a wired connection to see if there is a difference.

On your Android Galaxy Phone you could try downloading MP Droid https://play.google.com/store/apps/details?id=com.namelessdev.mpdroid&hl=en, this will provide a direct connection outside of your browser and may speed up your UI.

Also if the problem persists it may be worth Pushing some music instead of Pulling some (Volumio UI). You could install Bubble Upnp (Free version will be good enough for testing). https://play.google.com/store/apps/details?id=com.bubblesoft.android.bubbleupnp&hl=en_GB .

Let us know how you get on, Kevin

I’ll come back to this thread in a bit, beginning to think I may have other problems as I’m getting a kernel panic on boot. I’ll start a new thread for that.

After re-flashing until the kernel panic went away my mp3s are no longer glitching. So possibly there was some software corruption. I’ll have to watch and see if it comes back, perhaps worth trying another SD card if it does.