Jump to content


Photo

Recording, and cached PIDs in lamedb


  • Please log in to reply
19 replies to this topic

#1 Huevos

  • PLi® Contributor
  • 4,644 posts

+161
Excellent

Posted 16 November 2017 - 09:24

Why, when PIDs are cached is it not possible to record a channel and watch another?

 

Here is an example:

Universal Channel HD
p:Unknown,C:1841
08ff:ffff0000:0017:f020:25:0:0
Sky Sports Arena HD
p:Unknown,C:1841
0933:ffff0000:0017:f020:1:0:0

In the above (using Oscam) it is possible to record one channel and watch the other.

Universal Channel HD
p:Unknown,c:0000d1,c:0200fb,c:0300d1,c:0400e7,C:1841,f:5
08ff:ffff0000:0017:f020:25:0:0
Sky Sports Arena HD
p:Unknown,c:000135,c:02015f,c:030135,c:04014b,C:1841,f:5
0933:ffff0000:0017:f020:1:0:0

Now cached PIDs have been added. Start a recording on one channel. It is not possible to watch the other channel. The box zaps but the channel doesn't open.

 

The above condition only applies if both channels are using PID caching.

 

Is this a bug? Or a limitation of PID caching? To me it seems like it must be a bug.



Re: Recording, and cached PIDs in lamedb #2 Robinson

  • Senior Member
  • 2,621 posts

+30
Good

Posted 16 November 2017 - 09:48

Is this issue for scrambled channel only? Or FTA too?


ET9000, OpenPLi 4.0, 13E, 19E

HD51, OpenPLi 6.2, 75E - 30W


Re: Recording, and cached PIDs in lamedb #3 littlesat

  • PLi® Core member
  • 57,117 posts

+698
Excellent

Posted 16 November 2017 - 09:49

Until now I can't verify this...

On which box?


Edited by littlesat, 16 November 2017 - 09:49.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Recording, and cached PIDs in lamedb #4 Huevos

  • PLi® Contributor
  • 4,644 posts

+161
Excellent

Posted 16 November 2017 - 10:41

On all boxes.

 

Reported to me by multiple verified sources, but as it is a cable provider I can't test personally.

 

Channels are encrypted. No idea if this is the case on FTA.

 

@Robinson, I suspect this bug must be the same on 27.5W (Freeview transponder).



Re: Recording, and cached PIDs in lamedb #5 Robinson

  • Senior Member
  • 2,621 posts

+30
Good

Posted 16 November 2017 - 11:34

So what you are saying is that you cannot record one channel and watch another at the same time?

I will try to test on 27.5W this evening using an OpenPLI-based image (SatDreamGr 5) but 27.5W channels have always presented issues so a problem there might not necessarily indicate a problem with "normal" channels.


ET9000, OpenPLi 4.0, 13E, 19E

HD51, OpenPLi 6.2, 75E - 30W


Re: Recording, and cached PIDs in lamedb #6 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 16 November 2017 - 13:12

The first case uses PMT to create caPMT.

The second one uses cached info, and it's amazing that works in first place.

Most probably the caPMT created is wrong.

Somebody has to examine the PMT? Strange that nobody posted some evidence.

BTW, what is wrong in PMT in first place and you switch to cached values?

Seems like provider doesn't want to watch his services any more...

Edited by athoik, 16 November 2017 - 13:14.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Recording, and cached PIDs in lamedb #7 Huevos

  • PLi® Contributor
  • 4,644 posts

+161
Excellent

Posted 16 November 2017 - 14:50

I've got a transport stream recording for anyone willing to look at it. AC3 pid is there but doesn't play. But if you cache the pid it works.

So enigma is failing to recognise it.

I think this is due to the provider switching to enhanced AC3 and this causes a switch/case in parsepmt.cpp to fail.

So it is really a case of the first bug causing us to notice the second bug.

Transport stream plays fine in VLC.

Re: Recording, and cached PIDs in lamedb #8 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 16 November 2017 - 17:11

Indeed that looks like the CAPMT is created incorrectly from cached information. Maybe cccam would tolerate this omission and oscam doesn't? Time to dive into the oscam logs, it can show what's inside CAPMT when received.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Recording, and cached PIDs in lamedb #9 Robinson

  • Senior Member
  • 2,621 posts

+30
Good

Posted 16 November 2017 - 19:01

SatDreamGr 5 + oscam emu

 

4500:0cfdace7:1000:0001:25:0:0
Channel 4 HD
p:Channel 4 Broadcasting,c:00189d,c:03189d,c:050001,c:0918a10101,c:12189e,c:16189c,C:2600,f:400

 

44c8:0cfdace7:1000:0001:25:0:0
ITV1 HD
p:ITV,c:001839,c:031839,c:050001,c:09183d0101,c:12183a,c:161838,C:2600,f:400

 

No problem recording one while watching the other.


Edited by Robinson, 16 November 2017 - 19:02.

ET9000, OpenPLi 4.0, 13E, 19E

HD51, OpenPLi 6.2, 75E - 30W


Re: Recording, and cached PIDs in lamedb #10 Huevos

  • PLi® Contributor
  • 4,644 posts

+161
Excellent

Posted 16 November 2017 - 21:32

Not just Oscam. Mgcam too



Re: Recording, and cached PIDs in lamedb #11 Huevos

  • PLi® Contributor
  • 4,644 posts

+161
Excellent

Posted 16 November 2017 - 21:37

Hmm, maybe it is related to the flags then. :wacko:



Re: Recording, and cached PIDs in lamedb #12 Huevos

  • PLi® Contributor
  • 4,644 posts

+161
Excellent

Posted 16 November 2017 - 23:59

T [...], what is wrong in PMT in first place and you switch to cached values?

AC3 PID has switched to BSID 10. Previously was BSID 8. Could this be the problem? If so how is that fixed in parsepmt.cpp?

 

Attached File  1.jpg   193.72KB   3 downloads



Re: Recording, and cached PIDs in lamedb #13 Huevos

  • PLi® Contributor
  • 4,644 posts

+161
Excellent

Posted 17 November 2017 - 00:12

Here is grab from a similar channel a few months earlier.

 

Attached File  2.jpg   37.16KB   2 downloads



Re: Recording, and cached PIDs in lamedb #14 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 17 November 2017 - 00:26

The parsepmt seems fine, there is no BSID check.

It should go here:
https://github.com/O...tparse.cpp#L196

And then here: https://github.com/O...tparse.cpp#L293

If it doesn't go to second step, I would check the condition here: https://github.com/O...tparse.cpp#L206

AC_3 parsing descriptor is here: https://github.com/O..._descriptor.cpp and ac3 value comes from here: https://github.com/O...iptor_tag.h#L79

Edited by athoik, 17 November 2017 - 00:26.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Recording, and cached PIDs in lamedb #15 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 17 November 2017 - 23:35

The Flag was captured ;)


6A     Tag 0x6A: AC-3_descriptor
02     Tag Length: 0x02
CF 00
diff --git a/src/ac3_descriptor.cpp b/src/ac3_descriptor.cpp
index c7b28b2..fec8c31 100644
--- a/src/ac3_descriptor.cpp
+++ b/src/ac3_descriptor.cpp
@@ -31,6 +31,16 @@ Ac3Descriptor::Ac3Descriptor(const uint8_t * const buffer) : Descriptor(buffer)
        asvcFlag = (buffer[2] >> 4) & 0x01;

        size_t headerLength = 1 + ac3TypeFlag + bsidFlag + mainidFlag + asvcFlag;
+
+       // broadcasters got it wrong again...
+       if (headerLength > descriptorLength) {
+               ac3TypeFlag = 0;
+               bsidFlag = 0;
+               mainidFlag = 0;
+               asvcFlag = 0;
+               return;
+       }
+
        ASSERT_MIN_DLEN(headerLength);

        size_t i = 3;
Two more people locate the code making the trouble... The problem was the ASSERT_MIN_DLEN, because you have descriptor length 2 and header length 3.

In that case we have another "broadcasters got it wrong again..."

@Other people with patches feel free to post them, will send them all to Andreas (the author of libdvbsi++) to choose what he likes ;)

Enjoy
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Recording, and cached PIDs in lamedb #16 Huevos

  • PLi® Contributor
  • 4,644 posts

+161
Excellent

Posted 17 November 2017 - 23:54

"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." -- C.A.R. Hoare

 

;)

 

Thanks for the solution.



Re: Recording, and cached PIDs in lamedb #17 rossi2000

  • Senior Member
  • 45 posts

+5
Neutral

Posted 18 November 2017 - 00:03

this patch also currently works

tested on OpenViX and OpenBH.

Attached Files


Edited by rossi2000, 18 November 2017 - 00:06.


Re: Recording, and cached PIDs in lamedb #18 littlesat

  • PLi® Core member
  • 57,117 posts

+698
Excellent

Posted 18 November 2017 - 09:22

Omg

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Recording, and cached PIDs in lamedb #19 Abu Baniaz

  • PLi® Contributor
  • 2,496 posts

+64
Good

Posted 18 November 2017 - 21:09

If you could pass this patch for consideration to Andreas please? It is by LraiZer and was uploaded to mediafire on 2017-11-17 at 15:42:47

diff --git a/src/ac3_descriptor.cpp b/src/ac3_descriptor.cpp

index c7b28b2..f152109 100644

--- a/src/ac3_descriptor.cpp

+++ b/src/ac3_descriptor.cpp

@@ -30,24 +30,28 @@ Ac3Descriptor::Ac3Descriptor(const uint8_t * const buffer) : Descriptor(buffer)

     mainidFlag = (buffer[2] >> 5) & 0x01;

     asvcFlag = (buffer[2] >> 4) & 0x01;

 

-    size_t headerLength = 1 + ac3TypeFlag + bsidFlag + mainidFlag + asvcFlag;

-    ASSERT_MIN_DLEN(headerLength);

+    descriptorLength--;

+    ASSERT_MIN_DLEN(descriptorLength);

 

     size_t i = 3;

-    if (ac3TypeFlag == 1)

+    if (ac3TypeFlag == 1 && descriptorLength) {

         ac3Type = buffer[i++];

-

-    if (bsidFlag == 1)

+        descriptorLength--;

+    }

+    if (bsidFlag == 1 && descriptorLength) {

         bsid = buffer[i++];

-

-    if (mainidFlag == 1)

+        descriptorLength--;

+    }

+    if (mainidFlag == 1 && descriptorLength) {

         mainid = buffer[i++];

-

-    if (asvcFlag == 1)

+        descriptorLength--;

+    }

+    if (asvcFlag == 1 && descriptorLength) {

         avsc = buffer[i++];

-

-    additionalInfo.resize(descriptorLength - headerLength);

-    memcpy(&additionalInfo[0], &buffer[i], descriptorLength - headerLength);

+        descriptorLength--;

+    }

+    additionalInfo.resize(descriptorLength);

+    memcpy(&additionalInfo[0], &buffer[i], descriptorLength);

 }

 

 uint8_t Ac3Descriptor::getAc3TypeFlag(void) const

Attached Files



Re: Recording, and cached PIDs in lamedb #20 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 18 November 2017 - 21:24

Hi,

All patches send to Andreas.

Here is the web page of the libdvbsi++ http://www.saftware....08/23/libdvbsi/
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916


4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users