[mythtv] render2019 comments
Mike Bibbings
mike.bibbings at gmail.com
Thu Oct 3 13:56:41 UTC 2019
On 03/10/2019 10:55, Mark Kendall wrote:
> 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
> _______________________________________________
Mark,
I have rebuilt with the "optimisation" commented out, no failures of any
kind with livetv channel switching.
However many of the channel changes are taking a long time up to around
30 seconds. There are some which are 1-2 seconds.
I have put mythfrontend log files (-v playback) in my Dropbox
https://www.dropbox.com/sh/0n0t3ebp4nwiy3g/AACeC4WijoHLzj6Mrq1pgdmDa?dl=0
mythfrontend.20191003122731.9862-many-channel-changes-livetv-disabled.log
mythfrontend.20191003131140.11497-many-channel-changes-livetv-disabled.log
The tests were done on my AMD Ryzen 2200G system.
Below is an extract from mythconverg database showing chanid, name, mplexid, freqid just in case it is useful.
mysql> select chanid,name,mplexid,freqid from channel order by chanid;
+--------+---------------------+---------+--------+
| chanid | name | mplexid | freqid |
+--------+---------------------+---------+--------+
| 10001 | BBC ONE East W | 3 | 27 |
| 10002 | BBC TWO | 3 | 27 |
| 10003 | ITV | 2 | 24 |
| 10004 | Channel 4 | 2 | 24 |
| 10005 | Channel 5 | 2 | 24 |
| 10006 | ITV2 | 2 | 24 |
| 10009 | BBC FOUR | 3 | 27 |
| 10010 | ITV3 | 2 | 24 |
| 10011 | Pick | 4 | 36 |
| 10012 | QUEST | 6 | 51 |
| 10013 | E4 | 2 | 24 |
| 10014 | Film4 | 2 | 24 |
| 10015 | Channel 4+1 | 2 | 24 |
| 10016 | QVC | 6 | 51 |
| 10017 | Really | 4 | 36 |
| 10018 | More 4 | 2 | 24 |
| 10019 | Dave | 4 | 36 |
| 10020 | Drama | 6 | 51 |
| 10021 | 5 USA | 6 | 51 |
| 10022 | Ideal World | 5 | 48 |
| 10023 | Create & Craft | 4 | 36 |
| 10024 | ITV4 | 2 | 24 |
| 10025 | Yesterday | 5 | 48 |
| 10026 | ITVBe | 6 | 51 |
| 10027 | ITV2 +1 | 6 | 51 |
| 10028 | E4+1 | 4 | 36 |
| 10029 | 4Music | 5 | 48 |
| 10030 | 5STAR | 6 | 51 |
| 10031 | 5Spike | 5 | 48 |
| 10032 | Sony Movies | 4 | 36 |
| 10033 | ITV +1 | 2 | 24 |
| 10034 | ITV3+1 | 6 | 51 |
| 10035 | QVC Beauty | 5 | 48 |
| 10036 | QVC Style | 5 | 48 |
| 10037 | DMAX | 5 | 48 |
| 10038 | Quest Red | 4 | 36 |
| 10039 | CBS Justice | 5 | 48 |
| 10040 | Sony Movies Action | 6 | 51 |
| 10041 | Food Network | 4 | 36 |
| 10042 | Home | 5 | 48 |
| 10043 | Gems TV | 4 | 36 |
| 10044 | Channel 5+1 | 6 | 51 |
| 10045 | Film4+1 | 2 | 24 |
| 10046 | Challenge | 4 | 36 |
| 10047 | 4seven | 5 | 48 |
| 10049 | TJC | 4 | 36 |
| 10054 | Paramount Network | 6 | 51 |
| 10055 | 5SELECT | 6 | 51 |
| 10056 | 5STAR+1 | 8 | 56 |
| 10057 | 5USA+1 | 7 | 55 |
| 10058 | ITVBe+1 | 6 | 51 |
| 10059 | ITV4+1 | 6 | 51 |
| 10063 | Blaze | 6 | 51 |
| 10064 | FreeSports | 8 | 56 |
| 10065 | TBN UK | 4 | 36 |
| 10066 | CBS Reality | 6 | 51 |
| 10067 | CBS Reality +1 | 7 | 55 |
| 10070 | Horror Channel | 6 | 51 |
| 10071 | CBS Drama | 5 | 48 |
| 10072 | YourTV | 4 | 36 |
| 10073 | Sewing Quarter | 5 | 48 |
| 10074 | Jewellery Maker | 7 | 55 |
| 10076 | QUEST+1 | 4 | 36 |
| 10077 | TCC | 6 | 51 |
| 10078 | Quest Red+1 | 7 | 55 |
| 10079 | Dave ja vu | 5 | 48 |
| 10080 | Blaze+1 | 6 | 51 |
| 10081 | TalkingPictures TV | 5 | 48 |
| 10083 | NOW 80s | 8 | 56 |
| 10084 | NOW 90s | 8 | 56 |
| 10085 | Hochanda | 6 | 51 |
| 10086 | More4+1 | 1 | 21 |
| 10089 | Together TV | 4 | 36 |
| 10091 | PBS America | 8 | 56 |
| 10092 | Pick+1 | 7 | 55 |
| 10093 | Together TV+1 | 8 | 56 |
| 10096 | Forces TV | 8 | 56 |
| 10099 | Smithsonian Channel | 7 | 55 |
| 10101 | BBC ONE HD | 1 | 21 |
| 10102 | BBC TWO HD | 1 | 21 |
| 10103 | ITV HD | 1 | 21 |
| 10104 | Channel 4 HD | 1 | 21 |
| 10105 | Channel 5 HD | 1 | 21 |
| 10106 | BBC FOUR HD | 8 | 56 |
| 10107 | BBC NEWS HD | 7 | 55 |
| 10109 | Channel 4+1 HD | 7 | 55 |
| 10110 | 4seven HD | 7 | 55 |
| 10111 | QVC HD | 8 | 56 |
| 10112 | QVC Beauty HD | 8 | 56 |
| 10113 | RT HD | 7 | 55 |
| 10114 | QUEST HD | 8 | 56 |
| 10201 | CBBC | 3 | 27 |
| 10202 | CBeebies | 3 | 27 |
| 10203 | CITV | 6 | 51 |
| 10204 | CBBC HD | 1 | 21 |
| 10205 | CBeebies HD | 8 | 56 |
| 10206 | POP | 5 | 48 |
| 10231 | BBC NEWS | 3 | 27 |
| 10232 | BBC Parliament | 3 | 27 |
| 10233 | Sky News | 4 | 36 |
| 10234 | RT | 5 | 48 |
| 10235 | Al Jazeera Eng | 5 | 48 |
| 10250 | BBC Red Button | 3 | 27 |
| 10601 | BBC RB 1 | 3 | 27 |
| 10670 | ADULT Section | 6 | 51 |
| 10672 | ADULT smileTV2 | 5 | 48 |
| 10673 | ADULT smileTV3 | 4 | 36 |
| 10674 | ADULT Babestn | 5 | 48 |
| 10675 | ADULT Party | 6 | 51 |
| 10678 | ADULT Xpanded TV | 4 | 36 |
| 10679 | ADULT Studio 66 | 6 | 51 |
| 10680 | ADULT Xpanded2 | 6 | 51 |
| 10699 | ADULT Section | 5 | 48 |
| 10700 | BBC Radio 1 | 3 | 27 |
| 10701 | BBC R1X | 3 | 27 |
| 10702 | BBC Radio 2 | 3 | 27 |
| 10703 | BBC Radio 3 | 3 | 27 |
| 10704 | BBC Radio 4 | 3 | 27 |
| 10705 | BBC R5L | 3 | 27 |
| 10706 | BBC R5SX | 3 | 27 |
| 10707 | BBC 6 Music | 3 | 27 |
| 10708 | BBC Radio 4 Ex | 3 | 27 |
| 10709 | BBC Asian Net. | 3 | 27 |
| 10710 | BBC World Sv. | 3 | 27 |
| 10711 | Hits Radio | 5 | 48 |
| 10712 | KISS FRESH | 5 | 48 |
| 10713 | KISS | 5 | 48 |
| 10714 | KISSTORY | 5 | 48 |
| 10715 | Magic | 5 | 48 |
| 10716 | heat | 5 | 48 |
| 10717 | Kerrang! | 5 | 48 |
| 10718 | Smooth Radio | 5 | 48 |
| 10719 | BBC Norfolk | 3 | 27 |
| 10720 | BBC Three Counties | 3 | 27 |
| 10721 | BBC Radio London | 3 | 27 |
| 10722 | BBC Cambridge | 3 | 27 |
| 10723 | talkSPORT | 4 | 36 |
| 10724 | Capital | 6 | 51 |
| 10725 | Premier Radio | 5 | 48 |
| 10727 | Absolute Radio | 6 | 51 |
| 10728 | Heart | 6 | 51 |
| 10730 | RNIB Connect | 4 | 36 |
| 10731 | Classic FM | 4 | 36 |
| 10732 | LBC | 4 | 36 |
| 10733 | Trans World Radio | 7 | 55 |
| 10734 | BBC Northampton | 3 | 27 |
| 10790 | QUEST+1 | 6 | 51 |
| 10792 | Together TV | 8 | 56 |
+--------+---------------------+---------+--------+
148 rows in set (0.00 sec)
More information about the mythtv-dev
mailing list