User avatar
Fludizz
Posts: 15
Joined: Sat Jan 12, 2013 3:04 pm
Contact: Website

MPD ogg vorbis stream jitter, mp3 is OK.

Sat Jan 12, 2013 3:23 pm

I have two Raspberry Pi's, a Rev 1 and a Rev 2/512MB, and both Pi's seem to produce the same problem.

I have an MPD server running, serving my 30k files music collection. I cannot use the XBMC MPD client addon as it runs out of memory (and crashes XBMC) on the Pi due to the huge queue, I can play the stream which is a high quality 320kbps ogg vorbis stream served on http://server/mpd.ogg. Unfortunately I cannot set MPD to use MP3 as output, the MPD version in the repo's for my server are compiled without MP3 encoding support.

If I install either OpenELEC or RaspBMC, the stream very rarely works but most of the time the sound is very choppy/jittery. If I use a similar quality MP3 stream there are no problems whatsoever. I've checked the CPU usage and it is roughly the same for MP3 and for OGG playback. Fiddling around with overclocking settings also doesn't seem to make any difference.

The Pi's are connected using the Analog output (I have no HDMI audio capable device available) and connected to wired ethernet. No USB devices installed and powersource is a 2.5A/5V adapter which is providing plenty of power (Measured at the TP's, it doesn't drop below 4,95 volts under load).

If I insert a Raspbian card and use, for example, Audacious, the stream is working fine. Also, playing ogg vorbis audio files from local storage works like a charm on any installation.

Any suggestions what can be causing this problem? It must have something to do with the way XBMC handles ogg vorbis streaming audio.
Rev1: D14 removed, F1&F2 bypassed and heatsinks installed. Stable at arm 900 / gpu 300 / sdram 400 :(. No overvolting!
Rev2: 512MB version, no mods, just heatsinks installed. Stable at arm 930 / gpu 350 / sdram 500. No overvolting!

User avatar
Fludizz
Posts: 15
Joined: Sat Jan 12, 2013 3:04 pm
Contact: Website

Re: MPD ogg vorbis stream jitter, mp3 is OK.

Sun Jan 13, 2013 5:41 pm

I've been messing around a lot more with settings and, due to being side-tracked regarding CPU usage for MP3, found the advancedsettings.xml file. In this file it was configured to use paplayer as audio player. After changing this to omxplayer the CPU usage when playing any audio streams dropped from 90% to around 75%, the jitter when using ogg files where still there.

Next I was digging around in the sound options and changed the "Replay gain" (under Settings - Music - playback) to "off", I also unticked the "Boost volume level on downmix" checkbox (unser Settings - System - Audio output". At first this seemed to have fixed the problem, but I discovered new behavior.

Initially I was using an auto-start playlist that would play a local file that lasts for 30s to allow for xbmc to settle down and the network to become ready, next it would play the MPD stream. After turning off the autostart playlist and rebooting the pi, the very first thing I attempted to play was the MPD stream and it seemed to be good. However when I stopped playing the stream, played another file and started playing the stream again the jitter is back.

After yet another xbmc restart, I just started the stream: It was OK. To verify above behavior, stopped the stream and started it again: It went bad again. None of the settings changes I did make any difference.

It appears it will only play the stream properly if it is the very very first thing that is played, regardless of any settings!
Rev1: D14 removed, F1&F2 bypassed and heatsinks installed. Stable at arm 900 / gpu 300 / sdram 400 :(. No overvolting!
Rev2: 512MB version, no mods, just heatsinks installed. Stable at arm 930 / gpu 350 / sdram 500. No overvolting!

User avatar
Fludizz
Posts: 15
Joined: Sat Jan 12, 2013 3:04 pm
Contact: Website

Re: MPD ogg vorbis stream jitter, mp3 is OK.

Mon Jan 21, 2013 9:28 pm

Problem still exists, but I've worked around it. I've upgraded the MPD Server to a version that supports both MP3 and OGG encoding and forced MPD to stream MP3. (Yes really, I upgraded the server to fix a client problem.)

Now I can listen to my MP3's without issues, no jitter when using mp3 streams.
Rev1: D14 removed, F1&F2 bypassed and heatsinks installed. Stable at arm 900 / gpu 300 / sdram 400 :(. No overvolting!
Rev2: 512MB version, no mods, just heatsinks installed. Stable at arm 930 / gpu 350 / sdram 500. No overvolting!

Return to “Troubleshooting”