[mythtv-users] Help with prebuffer/audio issues. WAS: Upgrade from 0.21-fixes 18314 to 20500: frames behind audio problems?

Tom Dexter digitalaudiorock at gmail.com
Sat May 9 15:53:23 UTC 2009


On Thu, May 7, 2009 at 1:05 PM, Tom Dexter <digitalaudiorock at gmail.com> wrote:
> I've been running a custom Gentoo ebuild of 0.21-fixes 18314 for some
> time now.  Today I made my self an ebuild to upgrade to rev 20500 out
> of SVN 0.21-fixes.
>
> I ended up having to downgrade back to 18314.  On any LiveTV 1080i
> broadcasts I got hammered with these errors:
>
> 2009-05-07 11:55:00.011 NVP: Video is 3.0149 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.221 NVP: Video is 3.23074 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.226 NVP: Video is 3.10487 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.339 NVP: Video is 3.00147 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.438 NVP: Video is 3.22619 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.445 NVP: Video is 3.22883 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.556 NVP: Video is 3.20982 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.559 NVP: Video is 3.08919 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.705 NVP: Video is 3.13379 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.808 NVP: Video is 3.20506 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.812 NVP: Video is 3.1081 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:00.923 NVP: Video is 3.02017 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:01.022 NVP: Video is 3.24981 frames behind audio (too
> slow), dropping frame to catch up.
> 2009-05-07 11:55:01.026 NVP: Video is 3.23905 frames behind audio (too
> slow), dropping frame to catch up
>
> ...and the video was jerky and had unwatchable tearing.  Oddly enough
> 1080i pre-recorded shows were just fine.  I'm currently using the new
> fieldorder deinterlacer, but I got the same results when switching to
> Bob x2, which has worked fine for me for years.
>
> Luckily I had no problem downgrading back to 18314, and LiveTV is fine
> now....maybe in about a week my heart will slow down a bit :D.
>
> Unfortunately I couldn't leave it that way long enough to do much
> debugging, as I really needed to have a working system.
>
> Anyone have any ideas as to what change between those revs might have
> caused that?
>
> Tom
>

I posted this a few days ago, and have been trying to get some idea of
why I had problems with the 0.21-fixes upgrade described above.

I'm beginning to think that this may be related to some ongoing
prebuffer and audio buffer issues I've had for some time, but which
have never caused me any noticeable problems before.  I'm thinking
that some change in 0.21-fixes between 18314 and 20500 may for what
ever reason be less forgiving of these, especially with LiveTV.
Everything described below are issues I already have running rev
18314.  Before I forget to mention...this is on a stand-alone frontend
hitting a remote backend.

1. First of all, prebuffer pauses:  I occasionally get prebuffer
pauses, though not very often during normal playback.  However, at the
beginning of playback on either LiveTV or prerecorded programs, I
almost always get one or more of the "Prebuffer wait timed out 10
times".

2. Second of all, I sometimes (though not too often) get "Audio buffer
overflow, audio data lost!" and/or "WriteAudio: buffer underrun"
errors.  I've tried everything here:

http://www.mythtv.org/wiki/Troubleshooting:Prebuffering_pause#Audio_Issues

...short of a new sound card.  I have a low profile Dell 4700 and am
using the onboard audio.  I have one PCI-e slot taken up with my
nVidia card and the other opening is used for the nVidia card's VGA
port (which I don't use) with one of those low profile kits.  Even if
I left that hanging in the case, that slot would limit me to a PCI-e
1x sound card...I have no idea what's available for that.  This is the
onbaord sound card:

 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW
(ICH6 Family) AC'97 Audio Controller (rev 03)

I find it hard to believe there's anything wrong with it's
configuration.  It uses the snd_intel8x0 and loads all the right
modules and (with the exception of the occasional buffer issues) works
fine.  I disabled the OSS emulation (as I don't use it) and that
didn't help.  Note that that card has surround, but I'm only using it
in stereo.

3.  Third, when I start playback (especially with interlaced programs)
I generally get up to maybe 10 or 12 of the errors like the ones in my
original post: "Video is 3.24981 frames behind audio (too slow),
dropping frame to catch up".  On some shows (for example NBC
recordings) I seem to get the reverse...the "Video is nnn frames
ahead" etc.  This is generally when using 2x de-interlacers (either
bob or the new fieldorder deinterlacer).

In my working 18314 install, these always correct after no more than
about 12 of those.  I have no idea if that's normal behavior or
not(??).  As posted above, with 20500 it never corrects, and I get
choppy playback.

None of the above should be a CPU issue.  My machine is a 3GHz P4 with
hyperthreading enabled.  The heaviest CPU load I see seems to be
watching CBS 1080i with LiveTV with either Bob x2 or the fieldorder
deinterlacer.  Even that almost never goes below about 40% idle.  The
only processes ever using any resources to any note are mythfrontend
and X, both owned by the mythtv user.

Here are a few things I've tried that have not helped.:

I tried changing the Timer Frequency in my kernel from 300 to 1000.
As per some things I've read here I tried disabling realtime priority,
though I think that suggestion was always in the context of XvMC
issues (I don't use it).
I added the TripleBuffer option to my nVidia device in xorg.conf (I
already have UseEvents on).

Just another note...I have no idea if it could be related or not:  I
have a native 1080i display and have to use this patch to use either
Bob x2 or fieldorder:

http://svn.mythtv.org/trac/ticket/2903

Any suggestions would be greatly appreciated.  Luckily I have a good
working system as things stand, but I'd hate to be stuck at this rev.
If I get some clue as to what changes between 18314 and 20500 might
influence this, I can, without too much trouble, try upgrading to
different intermediate revs to narrow this down.  Thanks!

Tom


More information about the mythtv-users mailing list