catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
327 stars 81 forks source link

Trouble: pids=all mixed #767

Open lars18th opened 4 years ago

lars18th commented 4 years ago

Hi,

I started to check minisatip inside one OpenATV small device, to replace my current SAT>IP servers: one Mirage STB and one Xoro STB (very buggy devices regarding the SAT>IP protocol). I do this change to use a native minisatip process driving the physical tuner, even I continue using another minisatip instance to receive the stream from the physical device (actually I'm only replacing one STB with another, but the new runs minisatip too).

However, the minisatip in the STB driving the physical tuner has a very strange behaviour: When it receives a request for the full transport stream (pids=all) in the web UI I see this (example for Astra 19.2 10744H):

Pids: all,101,102,104,170,176,2171,201,202,203,204,206,270,276,401,402,403,407,408,404,470,1276,501,502,503,504,570,576

And the received stream contains only these listed pids plus 0. So, no pids 1-20, 8191 (NULL), and PMT's. Why this behaviour? Inside the OpenATV device enabling the log of the minisatip running it from the command line I don't see anything strange, except that even pid 8192 is enabled, and the pids in the list are added and removed.

You can explain this?

lars18th commented 4 years ago

Hi,

Nobody has experienced this problem?

catalinii commented 4 years ago

Enigma boxes does not supoort pids=all so basically all the pids present in all pmts are added. The code is not tested well, but feel free to report any issur and I can address

catalinii commented 4 years ago

Probably only 1,16,17 is missing

lars18th commented 4 years ago

Hi @catalinii ,

Enigma boxes does not supoort pids=all so basically all the pids present in all pmts are added. The code is not tested well, but feel free to report any issur and I can address

I didn't know anything about this! Thanks for explaining.

Probably only 1,16,17 is missing

In fact, except the pid 0, all others between 1-20 are missing. So please, for Enigma boxes can you enforce to send all pids below 20 when using "pids=all" too?

And one question: It's possible to send the NULL pid (8191) too? I'm searching for the code that handles this, but I don't see any related to this using the ENIGMA word. Where is it?

Regards.

catalinii commented 4 years ago

Most of the boxes have also pid filter limit. That's why is not recommended to add everything from 1-20 because just 1,16,17,18 have traffic. This is the patch: https://github.com/catalinii/minisatip/commit/c1da0b5b369b5fe3b4711a52500d2d9990029825#diff-25a6634263c1b1f6fc4697a04e2b9904ea4b042a89af59dc93ec1f5d44848a26

lars18th commented 4 years ago

Most of the boxes have also pid filter limit. That's why is not recommended to add everything from 1-20 because just 1,16,17,18 have traffic. This is the patch: c1da0b5#diff-25a6634263c1b1f6fc4697a04e2b9904ea4b042a89af59dc93ec1f5d44848a26

Well, I'm not sure if ALL boxed have the pid filter limit. I suggest to provide a method to disable it in Enigma (almost for testing, perhaps with this syntax: "-k -1" where "-1" indicates to disable if by default is enabled).

Futhermore, perhaps you think that only 1,16,17,18 have traffic, but in my tests other pids have also traffic, for example pid 20 (TOT), pid 21 (network sync), or 8191 (NULL). So perhaps, it will be interesting to support somethis like "-k 1,16,17,18,20,21,8191" that will indicate wich pids where unconditionaly added. You agree with this idea?

Regards.

lars18th commented 4 years ago

Hi @catalinii ,

You agree almost at time with the simple enhancement of the -k parameters with a list of pids to be added enforcing them?

lars18th commented 3 years ago

Hi @catalinii ,

I confirm that my Enigma based STB doesn't supports the 8192 pid. It doesn't work using the dvblast tool, but it works filtering pids. So, please don't waste your time adding support unenforcing the "-k" parameter with enigma boxes.

However, I really suggest to add support to include some other pids in the list with the parameter, like with -k 1,16,17,20,21,8191. This will provide a simple approximation to the full TS (if all used pids are included in the list). And please, don't forget to include by default pids 17 & 18, as they are mandatory to decode correctly the program names.

Thank you!

lars18th commented 3 years ago

Hi @catalinii ,

After more days suffering this, I see that all PMTs are missing, and basic tables like 1,16,17,18 are missing too. Please, can you fix this? After that, we can work in the enhancement of adding the listing pids for the -k parameter (if you agree).

Regards.

lars18th commented 3 years ago

Hi @catalinii ,

After more testing I see that:

Please, can you fix/improve this? Thank you.

catalinii commented 3 years ago

Hey Lars, your proposal (-k 1,16,17,18,20,21,8191) sounds good. It is just hard to find time to implement it.

lars18th commented 3 years ago

Hi @catalinii ,

Hey Lars, your proposal (-k 1,16,17,18,20,21,8191) sounds good. It is just hard to find time to implement it.

I can help, but please, provide to me the exact point in the source where it's necessry to add the pids... inside the Enigma hack. Or even best, if you can, provide a simple commit adding the 1,16,17,18 pids. You agree?

lars18th commented 3 years ago

Hi @catalinii ,

It's the function emulate_add_all_pids() in pmt.c the point of the source to include the pids? https://github.com/catalinii/minisatip/blob/51485ffca71131939d3e5b3a72180af173e36bc4/src/pmt.c#L1883 Or I need to search in anothar part?

lars18th commented 3 years ago

Hi @catalinii ,

I implemented it myself in the most simple solution: #781 . So please review and merge it. Regards.

lars18th commented 3 years ago

I close this issue as the fix is merged. Thank you @catalinii !

lars18th commented 3 years ago

Hi @catalinii ,

I need to reopen this issue, as with Enigma devices the result is not the one expected: After the commit https://github.com/catalinii/minisatip/commit/1debd5a5166f7a8e643f351de8360ee61f0ead79 when requesting pids=all from the Enigma box the selected pids are only the pids in the EMU_PIDS_ALL_ENFORCED_PIDS_LIST. So before the patch the list of pids are all the pids corresponding to the services in the TS, except the pids 1-21. So for this reason I provided the patch that adds these pids. Futhermore, I tested the code of the patch when developing it using the -k parameter with my x86 minisatip server. And all works as expected. So I don't know why it doesn't work in my Enigma box.

Any idea?

catalinii commented 3 years ago

For me it works, can you upload logs?

lars18th commented 3 years ago

Hi @catalinii ,

After the patch #816 all pids are received, except one: the NULL (8191). As "pids=all" means "disable the pid filtering" it's expected to receive the NULL packets. The reason can be to analyze the Full Transport Stream. So I suggest to include a small fix to pass the 8191 pid too. Any idea?