Tvheadend - Bug #2942 Decryption errors on certain BISS channels without CAID 2015-06-13 20:33 - Adam W

Status: Fixed Start date: 2015-06-13 Priority: Normal Due date: Assignee: % Done: 0% Category: Descrambling Estimated time: 0.00 hour Target version: Found in version: 4.0.4-14~ge653de1 Affected Versions: Description When trying to watch certain BISS channels (ERT on 3.1°E satellite, was NERIT) which have no CAID set, there are errors in the video stream as if there is bad reception (but there isn't).

The channels are as described in this previous bug - https://tvheadend.org/issues/2379

I have set the CAID to 0x2600 in the channel settings, then added a DES Constant codeword client for each service in the CAs section. The channels clear but with errors as shown in the attached screenshot.

The errors reported by TVHeadend are like this:

2015-06-13 19:19:56.177 TS: Eutelsat 3B/12734V/ERT1: H264 #138 Continuity counter error (total 1149) 2015-06-13 19:20:07.067 TS: Eutelsat 3B/12734V/ERT1: H264 #138 Continuity counter error (total 1190) 2015-06-13 19:20:19.010 TS: Eutelsat 3B/12734V/ERT1: H264 #138 Continuity counter error (total 1228) 2015-06-13 19:20:31.680 TS: Eutelsat 3B/12734V/ERT1: H264 #138 Continuity counter error (total 1268) 2015-06-13 19:20:42.047 TS: Eutelsat 3B/12734V/ERT1: H264 @ #138 Continuity counter error (total 1305)

I don't know if this is to do with the lack of CAID (but surely the CAID being forced should make no difference) or something weird with the transmission itself. The Vouli channel on the same frequency which is NOT encrypted plays fine with no errors. The other Greek BISS channels with their CAID set work fine too from that satellite.

I have attached a muxdump of the transponder, as well as a recording of the ERT1 channel via TVHeadend to show the problem.

If I take the muxdump and pass it through TSDEC software in Windows with the same BISS key, ERT1, ERT2 and ERT HD all decode successfully with no errors.

This is in version 4.0.4-14~ge653de1 but was also the same in 3.9.

Associated revisions Revision 16ca870e - 2015-12-26 17:43 - Jaroslav Kysela capmt: when the caid is forced for a service, try to use it as PID 8191, fixes #2942

Revision c870eb9d - 2015-12-26 17:44 - Jaroslav Kysela capmt: when the caid is forced for a service, try to use it as PID 8191, fixes #2942

Revision eec4077f - 2015-12-26 17:44 - Jaroslav Kysela descrambler: handle constcw initialization for forced CAIDs, too, fixes #2942

History #1 - 2015-06-14 13:08 - Jaroslav Kysela These continuity errors are before descrambling, so the received mpeg-ts packets (one PID only?) are broken.

#2 - 2015-06-14 14:15 - Adam W Jaroslav Kysela wrote:

These continuity errors are before descrambling, so the received mpeg-ts packets (one PID only?) are broken.

2021-10-02 1/3 Ahh OK. Well it happens on all three encrypted services on the transponder - ERT1, ERT2 and ERT HD - the errors are only with the h264 video PID on each of them. When I watch the unencrypted Vouli service, there are no H264 continuity counter errors.

#3 - 2015-06-16 12:53 - Jaroslav Kysela An easy check if the input stream is correct (without CC errors) is to save the whole mux (use 'wget -O file.ts ' from the Play column in the mux grid). Then use the "support/pid_count.py file.ts" utility in the tvh source tree to get numbers of MPEG-TS packets and errors.

#4 - 2015-12-26 12:14 - George Avgeris I confirm the problem with channels ERT, ERT HD on EutelSat 3.1. These channels are BISS encrypted, have no CAID set and tvheadend recognize them as unencrypted.

I can decrypt the channels just fine on a DM800 using OSCAM and there are no signal errors.

When you are trying to decrypt them by adding a DES Constant in the CA section (and force CAID) then the channels are decrypted but the playback has gaps. These gaps are not from bad signal or bad stream. I am 100% sure about that. It seems that the decoding algorithm is slow or something like that.

This problem could be resolved if the tvheadend passes the decryption process to an oscam server, but it seems that because the channel reports itself as unencrypted it doesn't do it. When i manually altered the service file for the channel and added a CA section like this

{ "pid": 8191, "type": "CA", "position": 262144, "caidlist": [ { "caid": 9728 } ] } then the tvheadend - oscam connection works and the channel is decrypted and plays smoothly! BUT when i change channel with remote control the tvheadend replaces again the service file with unencrypted version and it won't decrypt again.

So it seems to me that there are 3 solutions for this. Either the tvheadend decryption using DES Constant has to be fixed or an option to force connection to Oscam even for unencrypted channels has to be added, or the tvheadend must not check and replace the encryption on the service files.

Thanks in advance

#5 - 2015-12-26 17:21 - Jaroslav Kysela - Status changed from New to Invalid

You should force CAID in the service configuration (grid/edit form) - set it to 9728 or 0x2600 .

#6 - 2015-12-26 18:13 - George Avgeris - File caid.jpg added

I have already set it, but it doesn't pass the decryption to oscam until i change the service file.

I use tvheadend on an openelec/wetek box.

#7 - 2015-12-26 18:46 - Jaroslav Kysela - Status changed from Invalid to Fixed

I see. It should be fixed now for both 4.0/4.1 trees.

#8 - 2015-12-28 17:41 - George Avgeris - File service.part.log added

I tested the v4.1 build 1257 and the communication between tvheadend - oscam works fine for channels with forced CAID.

But the problem with the continuity errors on channels ERT1, ERT2, and ERT HD remains. I noticed that at the first zap on the channel, there are no continuity errors, but when i change channel and zap back then i'm starting to get continuity errors. I attach a part of the log file.

Line 7-19: 1st Zap to ERT HD channel (no continuity errors) Line 32-38: 1st Zap to ERT2 channel (no continuity errors) Line 38-47: 2nd Zap to ERT HD channel (continuity errors)

2021-10-02 2/3 Line 50-56: 2nd Zap to ERT2 channel (continuity errors)

Any ideas?

#9 - 2016-05-30 23:01 - Adam W I get the services to decrypt by forcing the CA to 0x2600, but even though the services do decrypt (both via a DES Client or via OSCam DVBAPI), they still break up for some reason. ERT3 and Vouli (both unencrypted on the same transponder) play fine. The other BISS channels on the satellite (Mega, Ant1, Star, Skai, etc) which have their CA PID set all work perfectly too.

#10 - 2016-05-30 23:26 - Jaroslav Kysela Create a new bug with '--trace descrambler,mpegts,service,subscription' log ...

#11 - 2020-12-07 18:28 - Chris G Hello. I realise this is old and marked fixed, but I am having the same problems. If I force the CAID to 0x2600, TVH doesn't ask OSCAM to descramble it.

I am running 4.3-1916~g1884300f0

#12 - 2020-12-07 18:32 - Chris G Sorry, ignore. It started working right after I posted that...

Files ERT_12734.ts 69 MB 2015-06-13 Adam W screenshot004.png 937 KB 2015-06-13 Adam W ERT1 Decoded.TS 52.9 MB 2015-06-13 Adam W caid.jpg 60.7 KB 2015-12-26 George Avgeris service.part.log 10.3 KB 2015-12-28 George Avgeris

2021-10-02 3/3

Powered by TCPDF (www.tcpdf.org)