Hello,
We have a Mygica T230 used for DVB-T2 live TV streams. It works fine most of the times, but sometimes (about 1 of every 10 tunings) there is no output or the screen is green with noise, and tvheadend generates a lot of errors. This seems to be a problem with the USB stick, as we had this problem with this stick in different versions of Linux, tvheadned, using transcoding or not using it, etc., also in Windows. When watching Live TV we can stop and restart or tune another channel and return to the original and it usually works Ok. However the issue is with recordings, as the recording will fail in these cases.
We tried changing some parameters in the adapter config, for example we changed the "# tune repeats" to 1, 2, 3.. but this is not helping as the isue is totally random.. so it could appear after the 2nd or 3rd tuning.
My question is: is there any way for tvheadend to detect that tuning of a channel is having errors, or detect that error number is big, and then stop and restart the tuning? For example, after 1000 errors stop and restart. This will really help us with the issues we have with recordings.
For reference, below there is part of the log output for one of these failed tunings. I also attached a screenshot of the tvheadend status output showing the amount of errors. Thanks!
2019-02-26 11:06:08.560 subscription: 007D: "192.168.15.136 [ remoto | Kodi Media Center ]" subscribing on channel "NTN 24", weight: 100, adapter: "Silicon Labs Si2168 #0 : DVB-T #0", network: "Col", mux: "479MHz", provider: "RCN TELEVISION", service: "NTN 24", profile="remoto", hostname="192.168.15.136", username="remoto", client="Kodi Media Center"
2019-02-26 11:06:08.884 transcode: 0016: 01:H264: ==> Using profile remoto
2019-02-26 11:06:08.885 transcode: 0016: 02:MPEG2AUDIO: ==> Using profile webtv-aac
2019-02-26 11:06:09.636 TS: Col/479MHz/NTN 24: H264 @ #701 Continuity counter error (total 1)
2019-02-26 11:06:09.804 TS: Col/479MHz/NTN 24: MPEG2AUDIO @ #702 Continuity counter error (total 1)
2019-02-26 11:06:10.154 tbl-base: sdt: 479MHz in Col: invalid checksum (len 243, errors 1)
2019-02-26 11:06:10.322 TS: Col/479MHz/NTN 24: H264 @ #701 Corrupted PES header (errors 1)
2019-02-26 11:06:10.468 tbl-base: pat: 479MHz in Col: invalid checksum (len 44, errors 1)
2019-02-26 11:06:14.844 tbl-eit: eit: 479MHz in Col: invalid checksum (len 180, errors 1)
2019-02-26 11:06:17.872 tbl-base: pmt: 479MHz in Col: invalid checksum (len 76, errors 1)
2019-02-26 11:06:18.102 TS: Col/479MHz/NTN 24 Transport error indicator (total 1)
2019-02-26 11:06:18.749 tbl-base: cat: 479MHz in Col: invalid checksum (len 12, errors 1)
2019-02-26 11:06:19.599 TS: Col/479MHz/NTN 24: H264 @ #701 Continuity counter error (total 928)
2019-02-26 11:06:19.971 TS: Col/479MHz/NTN 24: MPEG2AUDIO @ #702 Continuity counter error (total 49)
2019-02-26 11:06:21.893 tbl-base: sdt: 479MHz in Col: invalid checksum (len 243, errors 5)
2019-02-26 11:06:22.093 tsfix: The timediff for MPEG2AUDIO is big (948160), using current dts
2019-02-26 11:06:22.102 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (16080 != 42000)
2019-02-26 11:06:22.104 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (49680 != 97200)
2019-02-26 11:06:22.113 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (127920 != 160320)
2019-02-26 11:06:22.116 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (168000 != 204720)
2019-02-26 11:06:22.120 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (218160 != 237600)
2019-02-26 11:06:22.123 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (249120 != 279360)
2019-02-26 11:06:22.127 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (290880 != 312480)
2019-02-26 11:06:22.130 tsfix: transport stream MPEG2AUDIO, DTS discontinuity. DTS = 583200, last = 321840
2019-02-26 11:06:22.130 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (324000 != 583200)
2019-02-26 11:06:22.133 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (592800 != 614400)
2019-02-26 11:06:22.139 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (635520 != 678720)
2019-02-26 11:06:22.145 tsfix: transport stream MPEG2AUDIO, DTS discontinuity. DTS = 918000, last = 699840
2019-02-26 11:06:22.146 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (701760 != 917760)
2019-02-26 11:06:22.153 libav: AVCodecContext: mmco: unref short failure
2019-02-26 11:06:22.153 libav: AVCodecContext: mmco: unref short failure
2019-02-26 11:06:22.153 libav: AVCodecContext: number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
2019-02-26 11:06:22.159 libav: AVCodecContext: mmco: unref short failure
2019-02-26 11:06:22.206 libav: AVCodecContext: mmco: unref short failure
2019-02-26 11:06:22.206 libav: AVCodecContext: mmco: unref short failure
2019-02-26 11:06:22.206 libav: AVCodecContext: number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
2019-02-26 11:06:22.207 libav: AVCodecContext: mmco: unref short failure
2019-02-26 11:06:22.315 libav: AVCodecContext: Increasing reorder buffer to 2
2019-02-26 11:06:22.316 libav: AVCodecContext: Found reference and non-reference fields in the same frame, which
2019-02-26 11:06:22.316 libav: AVCodecContext: is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
2019-02-26 11:06:22.316 libav: AVCodecContext: If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
2019-02-26 11:06:22.316 libav: AVCodecContext: decode_slice_header error
2019-02-26 11:06:22.316 libav: AVCodecContext: Failed to upload decode parameters: 18 (invalid parameter).
2019-02-26 11:06:22.316 libav: AVCodecContext: Failed to end picture decode after error: 18 (invalid parameter).
2019-02-26 11:06:22.316 libav: AVCodecContext: hardware accelerator failed to decode picture
2019-02-26 11:06:22.424 tsfix: transport stream MPEG2AUDIO, DTS discontinuity. DTS = 1144800, last = 937440
2019-02-26 11:06:22.424 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (938880 != 1144080)
2019-02-26 11:06:23.492 tsfix: transport stream MPEG2AUDIO, DTS discontinuity. DTS = 1252800, last = 1153440
2019-02-26 11:06:23.492 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1155600 != 1252800)
2019-02-26 11:06:24.373 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1283520 != 1292160)
2019-02-26 11:06:25.042 tsfix: transport stream MPEG2AUDIO, DTS discontinuity. DTS = 1393200, last = 1293840
2019-02-26 11:06:25.043 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1296000 != 1393200)
2019-02-26 11:06:25.148 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1400880 != 1403040)
2019-02-26 11:06:26.047 tbl-eit: eit: 479MHz in Col: invalid checksum (len 180, errors 5)
2019-02-26 11:06:26.915 tbl-base: pat: 479MHz in Col: invalid checksum (len 44, errors 4)
2019-02-26 11:06:27.047 TS: Col/479MHz/NTN 24: H264 @ #701 Corrupted PES header (errors 5)
2019-02-26 11:06:27.048 tsfix: transport stream MPEG2AUDIO, DTS discontinuity. DTS = 1566000, last = 1423440
2019-02-26 11:06:27.048 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1424160 != 1564560)
2019-02-26 11:06:27.601 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1576080 != 1608480)
2019-02-26 11:06:27.752 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1616160 != 1618320)
2019-02-26 11:06:28.593 tbl-base: pmt: 479MHz in Col: invalid checksum (len 76, errors 13)
2019-02-26 11:06:28.739 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1647120 != 1716240)
2019-02-26 11:06:29.014 transcode: 0016: 02:AAC: [mp2 => aac]: Detected framedrop in audio (1733520 != 1737840)
2019-02-26 11:06:29.350 TS: Col/479MHz/NTN 24 Transport error indicator (total 6)
2019-02-26 11:06:29.351 tbl-base: cat: 479MHz in Col: invalid checksum (len 12, errors 4)