[mythtv] Myth Backend Monitor

Daniel Thor Kristjansson danielk at cat.nyu.edu
Thu Mar 4 13:54:38 EST 2004

If you want a little more resilience on the decoder side you can get
that with a tiny bit of flag twidling. In avformatdecoder there is a set
of assignments in OpenFile, like this
                enc->error_resilience = 2;
                enc->workaround_bugs = FF_BUG_AUTODETECT;
                enc->error_concealment = 3;
                enc->idct_algo = 0;
                enc->debug = 0;
                enc->rate_emu = 0;

Change them to

                enc->error_resilience  = FF_ER_VERY_AGGRESSIVE;
                enc->workaround_bugs   = FF_BUG_AUTODETECT;
                enc->error_concealment = FF_EC_GUESS_MVS|FF_EC_DEBLOCK;
                enc->idct_algo         = FF_IDCT_AUTO;
                enc->debug      = 0; // increase for more info
		enc->error_rate = 0; // increase to test resilience

The rate_emu is not used in decoding, but I've added the error rate
paramater, so you can test the resilience. The difference outside of
being clearer by using the defines is that the error resilience
is bumped up from "compliant" to "very aggressive".

I've done a little digging and found out libavcodec can check mpeg ts
packet crc's, I'm not sure if it is set to do it right now though. But
this is not enough for real resilience as frame sizes and framerates
can change from commercial to commercial and show to show and I'm not
sure avcodec can always handle this gracefully. I see crashing errors
sometimes when I switch from one good channel to another and it seems
to be just because the resolution has shrunk.

-- Daniel

On Thu, 4 Mar 2004, Hamish Moffatt wrote:

]On Thu, Mar 04, 2004 at 04:36:04PM +1030, mian wrote:
]> If you're getting too many of these with DVB-T you may want to try improve
]> your reception if at all possible (quad-shielded RG-6 from DSE goes along
]> way), with decent reception you should pretty much never get them except
]> occasional glitches caused by fridges or air conditioners switching on/off
]> and changing speeds, it seems to handle these ok for me just showing a
]> visual glitch and sometimes audio squelch too but the only time it crashes
]> is with extreme reception errors that must really corrupt the MPEG data to
]> a state beyond recognition, but yeh it would be nice for the decoder to be
]> able to handle *anything* thrown at it.
]I have recently fixed some reception problems I was having such that I
]can record whole programs without any uncorrected errors being logged.
]However, sometimes the MPEG decoder messages and the crash still occur.
]The MPEG decoder should never crash. Strangely enough I have run
]mythcommflag on the same recordings and it hasn't crashed, though I
]assume the algorithm (and code) is identical.

More information about the mythtv-dev mailing list