[mythtv-users]Tips for fixing prebuffering pause and WriteAudio: buffer underrun

Michael Carland mcarland at bitsgonewild.net
Fri Apr 1 01:26:26 UTC 2005


On Mar 31, 2005, at 8:04 AM, Tj NG wrote:

> >I seem to have all of my install mistakes corrected, except for one.
> >
> >When I play recorded content all is well. But when I play live TV, I 
> get
> >many "*prebuffering* *pause*" messages, and an occasional 
> "WriteAudio: buffer
> >underrun". The video stutters during the *prebuffering* messages.
> Did u compile with opengl-vsync on? Once that disabled, playback is 
> fine on my machine...
>
> Regards.
> Tj

Sadly, no. Always looking for the easy fix.

I turned on full logging on the backend and the frontend, but I'll need 
to do some homework before I can total sense of it. It does look like 
the audio buffer is constantly low, but until I look into what code is 
writing what messages, I won't be able to decode what is happening.

Thinking about this, I came up with what would be a cool debugging 
tool. It would be slick if there were dummy sources/sinks, that could 
be plugged into myth, and could be used to stress test the various 
parts of the system. So there would be a module that acted like a 
frontend, and tried to stream data from the backend at a rate that was 
stepped up until the backend couldn't keep up, and then printed 
statistics. Or a simplified backend that was capable of sending a 
simple stream (something like gears) at a high rate and logged stats 
about the requests from the frontend.

Maybe this functionality exists, dunno. I do know if I was smarter, I 
would write it. I don't know if my problem right now is a slow backend, 
frontend, or network. I assume it is not the network, I'm using 100Mbps 
with a switch, and I tried copying files over NFS from the backend to 
the frontends /dev/null (frontend is diskless, nowhere else to write it 
that wouldn't interfere with the network), and noted a fairly decent 
throughput.

Still on my list of things to try is use OSS instead of ALSA. Others 
have suggested ALSA may be the culprit, and they may be right, but I 
have a feeling it isn't. The problem is usually worse when entering 
live tv mode, and then smooths out, and then occasionally appears now 
and then. To me it seems like a borderline bandwidth issue somewhere. I 
think I'll try bumping down my bitrate.

I did order parts from Monarch to build a new backend. I'm hoping to 
use these parts to try and troubleshoot this. If they ever ship.

But thanks for the suggestion.

-Michael



More information about the mythtv-users mailing list