[mythtv] render2019 comments

Mark Kendall mark.kendall at gmail.com
Thu Oct 3 09:55:38 UTC 2019


On Thu, 3 Oct 2019 at 10:29, Mark Kendall <mark.kendall at gmail.com> wrote:
> On Tue, 1 Oct 2019 at 16:07, Mike Bibbings <mike.bibbings at gmail.com> wrote:
> > I have put a few mythfrontend logs (-v playback,libav --loglevel debug) in my Dropbox https://www.dropbox.com/sh/0n0t3ebp4nwiy3g/AACeC4WijoHLzj6Mrq1pgdmDa?dl=0
> >
> > The change  m_ic->max_analyze_duration = 60 * AV_TIME_BASE; has had some effect in that some channel changes are now "working" after 20 seconds or more, depending on channel rate.
> >
> > I still see instances of the wrong codec being opened and the reopening failing (invalid argument). Also I see Probe size (5000000) being hit.
> >
> > 2019-10-01 13:46:56.032686 I [23348/23348] CoreContext decoders/avformatdecoder.cpp:2107 (ScanStreams) - AFD: Already opened codec not matching (MP2 vs MP2). Reopening
> > Looking at the code
> >
> > avformatdecoder.cpp seems to have a error starting at if block at line 2102
> >
> >         if (enc->codec && par->codec_id != enc->codec_id)
> >         {
> >             LOG(VB_PLAYBACK, LOG_INFO, LOC +
> >                 QString("Already opened codec not matching (%1 vs %2). Reopening")
> >                 .arg(ff_codec_id_string(enc->codec_id))
> >                 .arg(ff_codec_id_string(enc->codec->id)));
> >             gCodecMap->freeCodecContext(m_ic->streams[strm]);
> >             enc = gCodecMap->getCodecContext(m_ic->streams[strm]);
> >         }
> >
> >
> > l2106               .arg(ff_codec_id_string(enc->codec_id))
> > l2107               .arg(ff_codec_id_string(enc->codec->id)));
> > both have the same codec, I suspect one of them should refer to par->codec_id
>
> I've seen some of these issues (I'm using an old HDHomeRun dvb-t
> tuner). Live tv is, as ever, a black hole:) I'll take a look.
>
> The max_analyze_duration change is probably only helping in some cases
> as in others the stream will be scanned and not fully parsed but the
> ffmpeg code will still report success.
>
> My gut feeling is that the in memory check needs to go...

I've just had a quick 5 minute stress test of livetv with the live tv
in memory 'optimisation' removed (line 1003 of avformatdecoder).

Error free - no channel change failures, no audio failures. Without
that change, switching to BBC2 (for some reason) would fail 90% of the
time and would often get the audio error noted above.

Only problem is - some changes (again to BBC2) take an age - there is
a consistent 12 seconds delay for certain switches. Others are 'fine'
- a second or so.

Regards
Mark


More information about the mythtv-dev mailing list