Project

General

Profile

How to fix "Continuity counter error"?

Added by Al Bundy almost 3 years ago

I recently switched from a "bare-metal" installation on a raspberry pi to a docker installation an an Intel NUC.

But since this switch I have very often continuity counter errors.

2022-01-25 12:42:51.828 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2AUDIO @ #202 Continuity counter error (total 11954)
2022-01-25 12:42:58.791 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 62996400, last = 62870400
2022-01-25 12:43:01.240 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2VIDEO @ #201 Continuity counter error (total 28977)
2022-01-25 12:43:01.240 [WARNING] TS: FritzBox/442MHz/ProSieben: AC3 @ #203 Continuity counter error (total 21930)
2022-01-25 12:43:01.285 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 63216000, last = 63104400
2022-01-25 12:43:01.331 [WARNING] TS: FritzBox/442MHz/ProSieben: TELETEXT @ #210 Continuity counter error (total 14734)
2022-01-25 12:43:01.835 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2AUDIO @ #202 Continuity counter error (total 12144)
2022-01-25 12:43:09.056 [WARNING] tsfix: transport stream MPEG2AUDIO, DTS discontinuity. DTS = 61274880, last = 59095440
2022-01-25 12:43:10.811 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 64072800, last = 63968400
2022-01-25 12:43:11.239 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2VIDEO @ #201 Continuity counter error (total 29430)
2022-01-25 12:43:11.239 [WARNING] TS: FritzBox/442MHz/ProSieben: AC3 @ #203 Continuity counter error (total 22291)
2022-01-25 12:43:11.376 [WARNING] TS: FritzBox/442MHz/ProSieben: TELETEXT @ #210 Continuity counter error (total 14971)
2022-01-25 12:43:11.898 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2AUDIO @ #202 Continuity counter error (total 12316)
2022-01-25 12:43:14.720 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 64422000, last = 64299600
2022-01-25 12:43:17.776 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 64702800, last = 64602000
2022-01-25 12:43:21.249 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2VIDEO @ #201 Continuity counter error (total 29851)
2022-01-25 12:43:21.249 [WARNING] TS: FritzBox/442MHz/ProSieben: AC3 @ #203 Continuity counter error (total 22619)
2022-01-25 12:43:21.468 [WARNING] TS: FritzBox/442MHz/ProSieben: TELETEXT @ #210 Continuity counter error (total 15160)
2022-01-25 12:43:21.950 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2AUDIO @ #202 Continuity counter error (total 12511)
2022-01-25 12:43:23.800 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 65232000, last = 65134800
2022-01-25 12:43:25.453 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 65394000, last = 65296800
2022-01-25 12:43:27.172 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 65548800, last = 65426400
2022-01-25 12:43:31.260 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2VIDEO @ #201 Continuity counter error (total 30272)
2022-01-25 12:43:31.260 [WARNING] TS: FritzBox/442MHz/ProSieben: AC3 @ #203 Continuity counter error (total 22919)
2022-01-25 12:43:31.473 [WARNING] TS: FritzBox/442MHz/ProSieben: TELETEXT @ #210 Continuity counter error (total 15397)
2022-01-25 12:43:32.012 [WARNING] TS: FritzBox/442MHz/ProSieben: MPEG2AUDIO @ #202 Continuity counter error (total 12700)
2022-01-25 12:43:32.596 [WARNING] tsfix: transport stream MPEG2VIDEO, DTS discontinuity. DTS = 66034800, last = 65930400

TV "adapter" is an AVM FritzBox that has 4 DVB-C SAT>IP Tuners.
TVHeadend uses UDP to get the streams from the FritzBox (I couldn't get TCP to work - not sure if this is supported by FritzBox).

Streaming LiveTV seems not to be an issue - but I have some failed recordings because to much data errors.

I'm not sure if I had this errors on also on the Raspberry PI but at least I didn't have any problems with my recordings.

Hase someone an idea how to fix this?


Replies (11)

RE: How to fix "Continuity counter error"? - Added by Hiro Protagonist almost 3 years ago

I've not used a setup like this but 3 possibilities come to mind:

1) Poor signal strength at the tuner. If the pi was using the same tuner setup this could be discounted.
2) Network errors between the tuner device & TVH. Shouldn't be a problem on a LAN.
3) Poor performance running within Docker. Can you run TVH natively on the NUC for comparison?

RE: How to fix "Continuity counter error"? - Added by Al Bundy almost 3 years ago

Thanks for your answer.

1) same Tuner (it's part of the router)
2) nuc and pi are at the same location - network stats (ifconfig, netstat, iperf3) are looking fine
3) nuc has an i3 - this should have more power than the pi

So the errors are a litte bit mysterious.
Maybe I'll give the installation on the nuc a shot.

RE: How to fix "Continuity counter error"? - Added by Al Bundy almost 3 years ago

Beetween my FirtzBox and the tvheadend-Server is a powerline-connction.
I'be never had this problems with the Raspberry PI 4 and also iperf3 has no issues with the PI or the NUC.

But it seems moving the NUC "before the powerlan" (same room as the FritzBox) solved most of the Continuity Counter Errors.

I forgott to say, the I record to a NAS that is also "behind the powerlan".

so setup bevor was:
FritzBox -> powerlan -> nuc/pi + nas

Now it's FritzBox + NUC -> powerlan -> nas

According to iperf3 I have 100Mbit/s over the powerlan - all other connections are 1GBit/s

RE: How to fix "Continuity counter error"? - Added by brimur brimur over 1 year ago

Just wanted to add to this as I have been having the same issue for the last few months and have given up on TVH for now which is a shame becase I have been using it for 10-15 years to archive local sports. I also had it on a NUCit was rock solid on that since 2017. I also tried a powerful 20 core PC and a PI4 and got the same on all machines. I am convinced it was a TVH update along the way that has caused it. Just wish I had marked the time it started. All of a sudden I started getting continuity errors and the picture started freezing and got choppy. Unwatchable basically. I also know its TVH because the signal is coming from a DVB-T HDHomerun and when I use the HDHomerun app the stream is perfect. All devices are plugged into the same switch. I havent tried yet but its on my todo list to go back to a TVH version older than 12 months to see if the issue exists there.

RE: How to fix "Continuity counter error"? - Added by Jonas Lang over 1 year ago

What source did you use to install TVH. Is it self built or installed from PPA. You’d really need to turn on debug and possibly supply a log. When you first discovered the problem did you submit a bug report.

RE: How to fix "Continuity counter error"? - Added by brimur brimur over 1 year ago

I tried using apt-get and docker images, always choosing latest but I didnt add a specific sources.list, it was just found without adding anything...

$ apt search tvheadend
tvheadend/stable,now 4.3-1994~gc7b713edb~bullseye arm64 [installed]
  Tvheadend

With Docker I used Linuxserver.io https://hub.docker.com/r/linuxserver/tvheadend
I didnt submit a bug report because I assumed it was just my aerial or cabling. It was only by chance that I opened the HDHomerun app and it worked perfectly. Since then I also setup Plex and Jellyfin and the streams work perfectly on those too so I am using those to record now.

I'm happy to provide logs if it will help. I will look up how to turn on debug logging but if its the same info that I get when I turn on debug in the GUI (bottom window) then that did not provide anything interesting other than reporting the continuity error same as the original post above

2023-07-03 17:29:40.709 TS: Saorview/594MHz/Challenge: H264 @ #2108 Continuity counter error (total 1)
2023-07-03 17:29:40.709 TS: Saorview/594MHz/Challenge: MPEG2AUDIO @ #2208 Continuity counter error (total 1)
2023-07-03 17:29:40.710 TS: Saorview/594MHz/Challenge: TELETEXT @ #2308 Continuity counter error (total 1)
2023-07-03 17:29:42.193 TS: Saorview/594MHz/Challenge: MPEG2AUDIO @ #2408 Continuity counter error (total 1)
2023-07-03 17:29:51.081 TS: Saorview/594MHz/Challenge: H264 @ #2108 Continuity counter error (total 35)
2023-07-03 17:29:51.082 TS: Saorview/594MHz/Challenge: MPEG2AUDIO @ #2208 Continuity counter error (total 22)
2023-07-03 17:29:52.119 TS: Saorview/594MHz/Challenge: TELETEXT @ #2308 Continuity counter error (total 9)
2023-07-03 17:29:59.970 TS: Saorview/594MHz/Challenge: MPEG2AUDIO @ #2408 Continuity counter error (total 12)

I have attached the output of the event

RE: How to fix "Continuity counter error"? - Added by Jonas Lang over 1 year ago

https://tvheadend.org/projects/tvheadend/wiki/Debugging

You could also consider changes in kernel versions that may be causing problems. Here’s a typical example.

https://tvheadend.org/issues/5937

Personally I’d just compile TVH for my own system

RE: How to fix "Continuity counter error"? - Added by clint jones over 1 year ago

I have had the same problems for several years with "dirty" signals. here in the states we use ATSC it is a digital signal that replaced the old analog.

if the wind blows or to many leaves on the trees the signal degrades severely and the continuity errors pile up quick on the tv the blocks and defects show up and eventually TVH will hang.

On the regular TV the signal causes the same problem until the TV just reports lost signal

I would say it is either the adapter, signal, and the fact that TVH is looking for a clean signal from the adapter.

using an iptv link there are never continuity errors and the only hang ups are if the request length is to long from the providers M3u8. A good example of long length is Pluto Tv seems like a 30 second hls block and hangs often when using the PVR setup in Kodi, the HLS protocal calls for a 4 second request time and hangups are minimal

Just an observation from having the same problems

Clint

RE: How to fix "Continuity counter error"? - Added by f ta about 1 year ago

brimur brimur wrote:

Just wanted to add to this as I have been having the same issue for the last few months and have given up on TVH for now which is a shame becase I have been using it for 10-15 years to archive local sports. I also had it on a NUCit was rock solid on that since 2017. I also tried a powerful 20 core PC and a PI4 and got the same on all machines. I am convinced it was a TVH update along the way that has caused it. Just wish I had marked the time it started. All of a sudden I started getting continuity errors and the picture started freezing and got choppy. Unwatchable basically. I also know its TVH because the signal is coming from a DVB-T HDHomerun and when I use the HDHomerun app the stream is perfect. All devices are plugged into the same switch. I havent tried yet but its on my todo list to go back to a TVH version older than 12 months to see if the issue exists there.

I have the same issue on one channel. Lots of continuity counter errors, and it is unwatchable in TVH. The channel plays perfectly in the HDHomeRun app.

RE: How to fix "Continuity counter error"? - Added by f ta about 1 year ago

I think this is related to EIT. Anything FFMPEG based (HDHomeRun app, VLC, NextPVR) plays the channel perfectly. I think FFMPEG does not parse EIT. If I modify TVH settings on the problematic mux to not use the EIT as much as possible, the channel is watchable again. I still get the occasional continuity counter error, but it's much better. For future people who google to here, I modified the following settings:

Configuration->DVB Inputs->TV Adapters->Select each adapter->Over-the-air EPG
Configuration->DVB Inputs->Muxes->Select problematic mux->EIT - skip TSID check
Configuration->DVB Inputs->Services->Select channels of problematic mux->Ignore EPG (EIT)
Configuration->Channel/EPG->Channels->Select channels of problematic mux->Use EPG running state

Anyone know of any other settings that would tell TVH not to look at EIT?

RE: How to fix "Continuity counter error"? - Added by Jonas Lang about 1 year ago

You should be able to disable it in the epg section

    (1-11/11)