Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

chirping in recordings with pchdtv hd-3000's and 0.21

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


patrick at wagstrom

Apr 10, 2008, 4:58 PM

Post #1 of 14 (2828 views)
Permalink
chirping in recordings with pchdtv hd-3000's and 0.21

I've had a stable mythtv box with dual hd-3000 cards for the last three
years. After some issues with a power supply on the machine conking out
while recording, the cards have worked wonderfully. Well, at least until I
upgraded to 0.21.

Since upgrading to 0.21, I get numerous "chirps" in my recordings; about
every 5 minutes or so. These usually happen where there is some slight
video damage. The errors are usually accompanied by a message in my log:

cx88[0]/2: queue is empty - first active
cx88[0]/2: cx8802_start_dma w: 0, h: 0, f: 2
cx88[0]/2: setting the interrupt mask
cx88[0]/2: [d9469600/0] cx8802_buf_queue - first active

Looking around, this error is usually caused by either not tuning a channel
or not having enough throughput to the drives. The first cause is
eliminated because I'm watching shows, so I know I'm tuned. The second
possible cause I think I can safely eliminate because my tests show my
drives (a sw RAID 5 array) can push 50+MB/s on writes to the drives.

The OS is Ubuntu Dapper, kernel 2.6.15-26. Not sure if it matters, but
there is also a PVR-250 installed. Nothing changed on the machine to make
it start doing this except the upgrade from 0.20->0.21.

Any thoughts?

--Patrick
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


digitalaudiorock at gmail

Apr 15, 2008, 3:46 AM

Post #2 of 14 (2704 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Thu, Apr 10, 2008 at 7:58 PM, Patrick Wagstrom <patrick [at] wagstrom> wrote:
> I've had a stable mythtv box with dual hd-3000 cards for the last three
> years. After some issues with a power supply on the machine conking out
> while recording, the cards have worked wonderfully. Well, at least until I
> upgraded to 0.21.
>
> Since upgrading to 0.21, I get numerous "chirps" in my recordings; about
> every 5 minutes or so. These usually happen where there is some slight
> video damage. The errors are usually accompanied by a message in my log:
>
> cx88[0]/2: queue is empty - first active
> cx88[0]/2: cx8802_start_dma w: 0, h: 0, f: 2
> cx88[0]/2: setting the interrupt mask
> cx88[0]/2: [d9469600/0] cx8802_buf_queue - first active
>
> Looking around, this error is usually caused by either not tuning a channel
> or not having enough throughput to the drives. The first cause is
> eliminated because I'm watching shows, so I know I'm tuned. The second
> possible cause I think I can safely eliminate because my tests show my
> drives (a sw RAID 5 array) can push 50+MB/s on writes to the drives.
>
> The OS is Ubuntu Dapper, kernel 2.6.15-26. Not sure if it matters, but
> there is also a PVR-250 installed. Nothing changed on the machine to make
> it start doing this except the upgrade from 0.20->0.21.
>
> Any thoughts?
>
> --Patrick
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

I occasionally get corruption in my recordings (for example due to OTA
interference in bad weather)..the kind that causes temporary video
pixelation etc.

Under 0.20.2 it seemed that, if anything, these would cause slight
audio dropouts, and only rarely seemed to cause any significant audio
noise. For some reason under 0.21 virtually any corruption like this
seems to cause full-scale audio chirps almost without fail. I'm
seeing some of these in my frontend logs, but I have to verify if
these actually are occurring when I hear the audio chirps:

2008-04-14 21:58:55.122 [ac3 @ 0xb7384028]cplendf = 6 < cplbegf = 13
2008-04-14 21:58:55.122 [ac3 @ 0xb7384028]error parsing the audio block
2008-04-14 21:58:55.954 [ac3 @ 0xb7384028]delta bit allocation strategy reserved
2008-04-14 21:58:55.954 [ac3 @ 0xb7384028]error parsing the audio block
2008-04-14 21:58:56.240 [ac3 @ 0xb7384028]delta bit allocation strategy reserved
2008-04-14 21:58:56.240 [ac3 @ 0xb7384028]error parsing the audio block
2008-04-14 21:58:56.322 [ac3 @ 0xb7384028]delta bit allocation strategy reserved
2008-04-14 21:58:56.322 [ac3 @ 0xb7384028]error parsing the audio block
2008-04-14 21:58:56.632 [ac3 @ 0xb7384028]chbwcod = 61 > 60error
parsing the audio block
2008-04-14 21:58:56.638 [ac3 @ 0xb7384028]delta bit allocation strategy reserved
2008-04-14 21:58:56.639 [ac3 @ 0xb7384028]error parsing the audio block

It's pretty unnerving when it happens, even when watching at low volume.

I'm using HD-5500 cards by the way, but I don't think that has
anything to do with it. Any card can get corrupted video if theres an
issue with the signal. The audio just seems to be more susceptible to
it for some reason.

I'm not sure what's different in audio handling. I'm running Gentoo.
The 0.21 install added the new --enable-libfaad because I have the
Gentoo aac USE flag on. I'm using ordinary stereo out however and
don't have any digital audio pass through enabled or anything, so I
don't think that would have any affect.

I'm hoping I can come up with some way to address it. It seems like
full scale pops could be filtered somehow.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


ron at ronfrazier

Apr 15, 2008, 4:40 AM

Post #3 of 14 (2720 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

I also get the same chirping, and it is quite annoying. It was much
worse before I switched the frontend to "always stream from the
backend". That reduced it a lot, but it still happens now and then.

--
Ron
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


digitalaudiorock at gmail

Apr 15, 2008, 6:29 AM

Post #4 of 14 (2716 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Tue, Apr 15, 2008 at 7:40 AM, Ronald Frazier <ron [at] ronfrazier> wrote:
> I also get the same chirping, and it is quite annoying. It was much
> worse before I switched the frontend to "always stream from the
> backend". That reduced it a lot, but it still happens now and then.
>
> --
> Ron
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

That setting wouldn't help me, as I have a separate backend and the
files are never available locally from the frontend anyway.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


digitalaudiorock at gmail

Apr 15, 2008, 1:20 PM

Post #5 of 14 (2692 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Tue, Apr 15, 2008 at 6:46 AM, Tom Dexter <digitalaudiorock [at] gmail> wrote:
> >
> I occasionally get corruption in my recordings (for example due to OTA
> interference in bad weather)..the kind that causes temporary video
> pixelation etc.
>
> Under 0.20.2 it seemed that, if anything, these would cause slight
> audio dropouts, and only rarely seemed to cause any significant audio
> noise. For some reason under 0.21 virtually any corruption like this
> seems to cause full-scale audio chirps almost without fail.
>
<snip>
> Tom
>

It appears that between 0.20.2 and 0.21 libs/libavcodec/ac3dec.c (part
of ffmpeg) was radically re-written. As a matter of fact it's about
six times as long now.

I'll bet that's why it's handling things differently.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


patrick at wagstrom

Apr 15, 2008, 6:35 PM

Post #6 of 14 (2697 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

> It appears that between 0.20.2 and 0.21 libs/libavcodec/ac3dec.c (part
> of ffmpeg) was radically re-written. As a matter of fact it's about
> six times as long now.
>
> I'll bet that's why it's handling things differently.
>

I suppose that could be what is causing the issue. Is this a problem with
most cards then? It seems like if its a decoder problem, then most of the
cards would have the same issue and that the solution would be to switch to
a card with a better receiver for QAM signals.

Is there a nice source where there is an objective comparison of signal
strength for different QAM cards (and devices, like the HD HomeRun)?

--Patrick


digitalaudiorock at gmail

Apr 15, 2008, 9:36 PM

Post #7 of 14 (2681 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Tue, Apr 15, 2008 at 9:35 PM, Patrick Wagstrom <patrick [at] wagstrom> wrote:
>
>
> > It appears that between 0.20.2 and 0.21 libs/libavcodec/ac3dec.c (part
> > of ffmpeg) was radically re-written. As a matter of fact it's about
> > six times as long now.
> >
> > I'll bet that's why it's handling things differently.
> >
>
> I suppose that could be what is causing the issue. Is this a problem with
> most cards then? It seems like if its a decoder problem, then most of the
> cards would have the same issue and that the solution would be to switch to
> a card with a better receiver for QAM signals.
>
> Is there a nice source where there is an objective comparison of signal
> strength for different QAM cards (and devices, like the HD HomeRun)?
>
> --Patrick
>

I'm unclear what you mean whan you say "signal strength for different
QAM cards". Signal strength is whatever it is when it reaches the
card. Some cards may deal with a poor signal better than others
perhaps. Signal strength can depend on a number of things, like how
many splits you have.

When recording OTA like I do it's almost inevitable that occasionally
the signal will cause some sort of video corruption. Hell...all I
probably have to do is run a blender while recording and that can
create enough interference to do it.

While you can't ask much when it comes to handling corrupted
recordings, it certainly seems like ffmpeg isn't handling corrupted
ac3 as gracefully was before. I may see if anyone on the dev list
knows anything about this, or possibly one of the ffmpeg lists.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


digitalaudiorock at gmail

Apr 16, 2008, 1:57 PM

Post #8 of 14 (2667 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Tue, Apr 15, 2008 at 4:20 PM, Tom Dexter <digitalaudiorock [at] gmail> wrote:
> On Tue, Apr 15, 2008 at 6:46 AM, Tom Dexter <digitalaudiorock [at] gmail> wrote:
> > >
> > I occasionally get corruption in my recordings (for example due to OTA
> > interference in bad weather)..the kind that causes temporary video
> > pixelation etc.
> >
> > Under 0.20.2 it seemed that, if anything, these would cause slight
> > audio dropouts, and only rarely seemed to cause any significant audio
> > noise. For some reason under 0.21 virtually any corruption like this
> > seems to cause full-scale audio chirps almost without fail.
> >
> <snip>
> > Tom
> >
>
> It appears that between 0.20.2 and 0.21 libs/libavcodec/ac3dec.c (part
> of ffmpeg) was radically re-written. As a matter of fact it's about
> six times as long now.
>
> I'll bet that's why it's handling things differently.
>
> Tom
>

...(and in his best Austin Powers voice) YEA BABY!! :D

It looks like I have a fix. It appears that in more recent versions
of ffmpeg the libavcodec/ac3dec.c file has had some crc error checking
added to address this. The newer versions are quite different from
the existing one, but the original discussion on the ffmpeg-devel
list, including a proposed patch, starts here:

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-September/034883.html

If you follow that thread you'll see it discusses this very issue of
getting serious pops from corrupted broadcast transport streams, and
how some amount of errors are even expected in DVB. I was able to
hack together the following patch which is similar to the original one
posted at the above link, only is unconditionally does the error
checking regardless of the error_resilience specified by mythtv...I
knew I wanted the error checking so I just made it unconditional.

Here's what my patch looks like (I've attached it as well):

Index: libavcodec/ac3dec.c
===================================================================
--- libs/libavcodec/ac3dec.c
+++ libs/libavcodec/ac3dec.c
@@ -37,6 +37,7 @@
#include "bitstream.h"
#include "dsputil.h"
#include "random.h"
+#include "crc.h"

/**
* Table of bin locations for rematrixing bands
@@ -1121,6 +1122,12 @@
return -1;
}

+ if (av_crc(av_crc8005, 0, buf + 2, buf_size - 2)) {
+ av_log(avctx, AV_LOG_ERROR, "CRC error\n");
+ *data_size = 0;
+ return buf_size;
+ }
+
avctx->sample_rate = ctx->sampling_rate;
avctx->bit_rate = ctx->bit_rate;

I saved a recording for testing the other day that had corruption in a
spot that I made note of. Before the patch I'd get this in my
frontend logs at that point:

2008-04-15 20:11:34.573 [ac3 @ 0xb73e3028]delta bit allocation strategy reserved
2008-04-15 20:11:34.573 [ac3 @ 0xb73e3028]error parsing the audio block

...along with the awful chirps. After installing with the patch, I
get this in the logs at that same point:

2008-04-16 16:31:19.787 [ac3 @ 0xb73e7028]CRC error
2008-04-16 16:31:20.535 [ac3 @ 0xb73e7028]CRC error
2008-04-16 16:31:20.706 [ac3 @ 0xb73e7028]CRC error

...and only slight audio dropouts (silence) in place of the chirps...yes!!

I don't know that this patch is the ideal way to address it, but it
certainly seems to work. I'm going to post to the dev list about this
one.

Tom
Attachments: mythtv-0.21-ffmpeg_ac3_crc.patch (0.61 KB)


digitalaudiorock at gmail

Apr 16, 2008, 2:05 PM

Post #9 of 14 (2670 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Wed, Apr 16, 2008 at 4:57 PM, Tom Dexter <digitalaudiorock [at] gmail> wrote:
>
> Here's what my patch looks like (I've attached it as well):
>

I neglected to mention that this patch is designed for 0.21 SVN 16944.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


ron at ronfrazier

Apr 16, 2008, 2:30 PM

Post #10 of 14 (2654 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

Good job tracking that down, and thanks for coming up with a patch.
I'm gonna hang on to the patch. The next time I get the problem, I'll
compile the patch in and retry and report back my results (though I
don't get the problem so much anymore, so don't hold your breath
waiting).

--
Ron
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


digitalaudiorock at gmail

Apr 16, 2008, 2:32 PM

Post #11 of 14 (2669 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Wed, Apr 16, 2008 at 5:30 PM, Ronald Frazier <ron [at] ronfrazier> wrote:
> Good job tracking that down, and thanks for coming up with a patch.
> I'm gonna hang on to the patch. The next time I get the problem, I'll
> compile the patch in and retry and report back my results (though I
> don't get the problem so much anymore, so don't hold your breath
> waiting).
>
> --
> Ron
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

You're quite welcome! I just posted to the mythtv-dev list explaining
the whole thing...we'll see what they have to say.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


digitalaudiorock at gmail

Apr 16, 2008, 7:47 PM

Post #12 of 14 (2654 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Wed, Apr 16, 2008 at 4:57 PM, Tom Dexter <digitalaudiorock [at] gmail> wrote:
>
> Here's what my patch looks like (I've attached it as well):
>
> Index: libavcodec/ac3dec.c
> ===================================================================
> --- libs/libavcodec/ac3dec.c
> +++ libs/libavcodec/ac3dec.c
> @@ -37,6 +37,7 @@
> #include "bitstream.h"
> #include "dsputil.h"
> #include "random.h"
> +#include "crc.h"
>
> /**
> * Table of bin locations for rematrixing bands
> @@ -1121,6 +1122,12 @@
> return -1;
> }
>
> + if (av_crc(av_crc8005, 0, buf + 2, buf_size - 2)) {
> + av_log(avctx, AV_LOG_ERROR, "CRC error\n");
> + *data_size = 0;
> + return buf_size;
> + }
> +
> avctx->sample_rate = ctx->sampling_rate;
> avctx->bit_rate = ctx->bit_rate;
>

After tonight I can definitely say that this patch is working very
well. I got a few really significant instances of recording
corruption...funnily enough from cutting a chicken with an electric
carving knife :D...that old thing apparently makes a pretty good OTA
jamming device.

With enough corruption to seriously pixelate the video for several
seconds at a time, I not only experienced no audio noise of any kind,
often the dropped audio (reported in the logs as CRC errors) wasn't
even audible.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


patrick at wagstrom

Apr 18, 2008, 9:02 AM

Post #13 of 14 (2578 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

> It looks like I have a fix. It appears that in more recent versions
> of ffmpeg the libavcodec/ac3dec.c file has had some crc error checking
> added to address this. The newer versions are quite different from
> the existing one, but the original discussion on the ffmpeg-devel
> list, including a proposed patch, starts here:


This is really great work. It seems to fix many of the pops I was suffering
through.

--Patrick


digitalaudiorock at gmail

Apr 19, 2008, 12:03 PM

Post #14 of 14 (2567 views)
Permalink
Re: chirping in recordings with pchdtv hd-3000's and 0.21 [In reply to]

On Fri, Apr 18, 2008 at 12:02 PM, Patrick Wagstrom <patrick [at] wagstrom> wrote:
>
>
> > It looks like I have a fix. It appears that in more recent versions
> > of ffmpeg the libavcodec/ac3dec.c file has had some crc error checking
> > added to address this. The newer versions are quite different from
> > the existing one, but the original discussion on the ffmpeg-devel
> > list, including a proposed patch, starts here:
>
> This is really great work. It seems to fix many of the pops I was suffering
> through.
>
> --Patrick
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>

For anyone interested, there's a bug logged for this that has an
official change set for this fix. Functionally the fix is the same as
my patch:

http://bugs.mythtv.org/trac/ticket/5220

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.