[mythtv-users] Crackling and popping in non-PVR analog card -- I think I can say it's MythTV's fault

Dewey Smolka dsmolka at gmail.com
Sat Sep 3 06:57:20 UTC 2005


On 9/2/05, Sérgio Gomes <sergiomdgomes at netcabo.pt> wrote:
> Hello everyone!
> 
> Now, I have been having a problem with audio on my MythTV since I
> installed it yesterday: I get a lot of crackling and popping in my
> recordings and in LiveTV. I've been running several tests.
> 

> Inside MythTV:
> - The amount of crackling (or at least the loudness) goes up with the
> loudness of the broadcast; if it's quiet there's almost no crackling,
> but if there are a lot of people talking or loud sounds, there is a lot
> of crackling

Hmmm, this suggest it may be an issue with levels and clipping.

> - Happens with ALSA and OSS
> - Happens with MJPEG and MPEG4
> - Happens with or without "Agressive Sound Buffering"
> - Happens with both WAV and MP3, at any of the available rates
> - Happens with or without internal volume controls, at any level

Hmmmm. Doesn't sound like a driver issue.

> - Music and videos play without any problems
> - The amount of crackling goes up with the quality of the video; there
> is almost no crackling at 160x160, but a lot of it at 768x576

Hmmmm. What is your CPU, and what kind of usage is it hitting during
live TV or while recording? Is it possible that you're maxing out the
processor and that is causing the problem? I'm not familiar with this
card -- is the encoding on board or through the CPU?

> So, given all this I think we can rule out any interference on the sound
> from external sources, hardware or other software, and assume the
> problem is limited to the TV functionality in MythTV. My guess would be
> that the sound is being clipped due to volume adjustments inside MythTV,
> and is only then recorded, assuming that MythTV does some volume
> processing on the sound (even if just boosting it).

> Now, this is all fine and well and a good theory until the last point. I
> don't understand why the problem gets worse with higher video
> resolutions. That completely ruins my theory. With that in mind, I guess
> the problem could only be some kind of multiplexing or demultiplexing
> bug (probably multiplexing, because for it to be a demultiplexing bug it
> would also have to be present in mplayer), but that wouldn't account for
> the problem getting worse on loud samples (since WAV is constant bitrate).

The fact that it's worse on loud samples suggests clipping, which
suggests recording level issues. These can be set through the Myth
GUI, though I can't remember if it's on the backend (mythtvsetup) or
the frontend, or maybe even by fiddling with alsamixer or however you
are setting up OSS. But you said you've tried this and it hasn't
helped.

The fact that it's happening more at higher recording resolutions
suggests that it may be a processing issue -- that the CPU is having
trouble keeping up with everything and sound gets hurt in the process
(no pun intended).

> Here are my PC specs:
> 
> - Athlon 64 3200+
> - NForce 3 motherboard (ASUS)

Well, this CPU shouldn't have problems keeping up.

> - Gentoo Linux with 2.6.12-r5 gentoo-sources kernel

> - video4linux CVS (due to some cx8800 problems with the release
> version). --> shouldn't be the problem because of all the above reasons

Hmmmm. This may be the problem, because the things you mention above
don't use V4L, at least not that I'm aware of.

> - WinTV Go 2 with cx8800 chip

This is at the heart of it all, but "buy a new card" is probably not
what you want to hear.

> - Audigy 2 ZS (snd-emu10k1 module), with hardware mixing
> - MythTV 0.18.1 compiled from source in AMD64 (as the rest of my system)
> - Using PAL BG

> Thank you for bearing with me through this exhaustive description.

Actually, I wish everyone who seeks assistance on this list would do
what you have done: provide a coherent description of a specific
problem, state the hardware and software involved, give details on
what steps have been taken so far to address the problem and the
results of those steps, and provide the working theory that you have
been applying (because it is much easier to see things that may have
been overlooked if we know where you are looking).
 
My initial though is that it is not an issue with the sound card,
since you said payback works for existing video/audio files, and
recording works if done directly through the sound card.

It is not an issue with the CPU either, since you've got more than
enough processing power to handle the job, plus you said that sound
works fine outside of recorded and live TV, even at high CPU usage.
ALSA and OSS are not problems either, based on the steps you've taken.

So about the only thing that's left is V4L (which AFAIK is used for
dumb capture rather than hardware encoding) and the card itself.
Unfortunately, I don't have any experience with V4L or with your card.
However, I suspect that this is the source of the problem. You may be
right that it's a multiplexing issue, but if so, it's a result of
driving your particular card with your particular version of V4L.

Unfortunately, There's not much I can tell you. I can say that
replacing the card with a PVR x50 (which doesn't use V4L) will
probably get rid of your problem, but that means spending money.
Others may be able to help more.

Completely out of the blue, but is it possible that there is an
NTSC/PAL problem -- like using an NTSC capture card on a PAL signal?
It's a longshot, but I'm only trying to give you ideas.

Good luck.


More information about the mythtv-users mailing list