[mythtv-users] [ATrpms-users] Confused: why did video performance DECREASE (up to 70%) after upgrading video card by 2 generations??? Please validate my analysis

George Mari george_mythusers at mari1938.org
Tue Dec 9 01:50:18 UTC 2008

Jeffrey J. Kosowsky wrote:
> George Mari wrote at about 08:17:52 -0600 on Monday, December 8, 2008:
>  > Jeffrey J. Kosowsky wrote:
>  > > George Mari wrote at about 21:55:00 -0600 on Sunday, December 7, 2008:
>  > >  > Jeffrey J. Kosowsky wrote:

> I guess what frustrates me is that after DAYS of trying, I'm still not
> sure if this is an audio or video problem.
> On the one hand, you might say it is an audio problem given that the
> audio pauses are most obvious and the error messages on the surface
> seem to be mostly audio-related "WriteAudio: buffer underruns".
> On the other hand, a closer look shows that the video is playing back
> slightly slow while the audio sounds perfectly normal until it
> presumably gets too far ahead of the video and underruns the
> buffer, which leads to a pause while the stream catches up. So, I'm
> thinking that maybe it is more of a video problem.
Hmmm...I agree it could be either audio or video, or the combination of 
trying to decode and playback both at the same time, while keeping the 
two in sync.  My next suggestion would be to try changing your audio 
output device to NULL, from the current ALSA:default.  I'm not 100% 
sure, but I believe this will disable all audio decoding by myth.  By 
taking that out of the picture (so to speak) maybe we can see what 
happens to the video quality.  If it still stutters and generates 
pre-buffering pauses, then the audio is not the issue.  If the video 
quality improves, and there are no more pre-buffering pauses, I'd say 
it's time to try installing a PCI sound card instead of using your 
built-in motherboard audio.

BTW - anyone on the list, please jump in and correct me if my assumption 
about using NULL for the audio output device is wrong.

> But I can't figure out why the video is being slowed down even though
> I seem to have enough CPU (40% or so free) and given that others seem
> to have found the 6200 fast enough to play even 1080i.
The logical conclusion would seem to be that video playback performance 
and quality is not completely dependent on available CPU power. :-)

Seriously, I feel your fixating on this a bit.  You have a bottleneck 
somewhere, it's just not with the CPU.  No amount of free CPU is going 
to fix it.  It lies somewhere that our normal Linux tools (top, free, 
etc.) cannot reach, so it's hard to identify.

> Also, interestingly, I get the same problems even when watching
> (digital) SD but NO problems when playing a live analog stream or
> playing back even 1080i after transcoding to mpeg4. Also, the problem
> occurs both when watching LiveTV and when watching previously recorded
> (but non transcoded) streams.
Not sure what to make of this yet.

> Also, mplayer does not have this problem either when directly viewing
> OTA broadcasts or even when viewing streams recorded by mythtv.
That's good - you know the problem does not lie with your recording 
files themselves.

> So, it seems to me that there is something wrong with how mplayer
> (and/or my configuration of it) is playing back HD streams.
I missed the bit where you said the problem occurs with mplayer on HD 

> I have tried seemingly every imaginable combination of playback
> configs, including:
> 	- With/without XvMC
> 	- With/without OpenGL
> 	- With/without interleaving
> 	- With different OSD rendering
> 	- With/without using video as timebase
> 	- With different nvidia drivers (96.xxx, 173.xxx, 177.xxx)
> 	- With different screen resolutions
> All of the above have NO EFFECT on the actual audio/visual performance
> other than to change CPU usage.
> It really seems like either mplayer or I are missing one thing that is
> bottlenecking the decoding of digital streams.
> I was thinking first of returning the 6200 and buying a 7600gs board,
> but given the above, it is not at all clear to me that the problem is
> a video hardware one since the 6200 should be sufficient, particularly
> at SD ;)
> I really want to fix this...

I think you can.  I think you just have to think outside the box a bit, 
beyond what you've already considered.  Seriously consider a good PCI 
audio card - they're not that much, cheaper than a new motherboard.

I'm on Fedora 9, main frontend is a 2.2Ghz Athlon 64 (single core) with 
1GB RAM, and an AGP Nvidia 6200.  It plays back SD recorded from a 
PVR-350 and HD OTA flawlessly using the CPU++ playback profile.  My 
motherboard has Nvidia nforce3 built-in audio, though, not Intel like 
yours, but it is AC'97 as well.  So you can get perfectly fine 
performance with yesterday's hardware, and motherboard audio.  But not 
all motherboard audio is the same, apparently.

CPU is 30% idle on 1080i, 45% idle on 720p, and 65% idle on SD.  So the 
6200 can do a fine job.

Let us know what happens with trying NULL as your audio output device.

More information about the mythtv-users mailing list