Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add providers for 36e #7

Open
dikonov opened this issue Oct 9, 2024 · 80 comments
Open

Add providers for 36e #7

dikonov opened this issue Oct 9, 2024 · 80 comments

Comments

@dikonov
Copy link
Contributor

dikonov commented Oct 9, 2024

I made a possible patch adding two major providers for 36e (NTV+ and Tricolor). Unfortunately I cannot test it because I do not know how to modify the compiled providers.pyc file correctly or rebuild the plugin package myself.
36e.zip

@Huevos
Copy link
Owner

Huevos commented Oct 9, 2024

Just send your .py file to the box and reboot. And then test your provider works.

@dikonov
Copy link
Contributor Author

dikonov commented Oct 9, 2024

It would also be nice to show the orbital position near the provider names. Some of them (NTV+, Sky) have several satellites serving different regions.

@dikonov
Copy link
Contributor Author

dikonov commented Oct 9, 2024

OK I tested. It does find channels and transponders, but generates empty bouquets. Are the NID and TID values decimal or hex? Is the provider entry format correct? What is the method to verify the "Original NID"?

@Huevos
Copy link
Owner

Huevos commented Oct 10, 2024

What is the method to verify the "Original NID"?
Tune the transponder and check the info. If you are using the ViX image those values show in satfinder when you tune the transponder.

Are the NID and TID values decimal or hex?
Here, "original_network_id": 112, the value is decimal, but you could write it in hex too, e.g. "original_network_id": 0x70.

@dikonov
Copy link
Contributor Author

dikonov commented Oct 10, 2024

I double checked all values and I am sure that they are correct. Everything seems normal during the scan process, yet I get empty bouquets. I also tried scanning OrangeTV at 16E (I used this provider entry as a sample) and it also produced an empty bouquet. Apparently these provider records are incomplete. But what should be added?

providers.py.zip

@Huevos
Copy link
Owner

Huevos commented Oct 10, 2024

Where is the LCN descriptor located on those providers because that is not in your entries?

Do you know for certain these providers broadcast LCNs?

Have you inspected the transport stream and located the LCNs?

@dikonov
Copy link
Contributor Author

dikonov commented Oct 10, 2024

Where is the LCN descriptor located on those providers because that is not in your entries?

Could you point me to a how-to guide on obtaining the missing data? I do not see it at lyngsat or Enigma's channel info screens.

Do you know for certain these providers broadcast LCNs?

Yes, absolutely. There are tons of guides specific to their "official" receivers and TVs, which tell smth like "If your box is XXX, go to menu 'this and that' and do the (LCN) channel scan". The problem is that all necessary data is already known by those boxes and is never visible to the client. I do not own any of those. There are two big providers sharing the same satellites (36e and 56e) and they do not want the clients to see the competitor's channels.

Have you inspected the transport stream and located the LCNs?

How to do it? I do not have the CAM to decrypt their streams, but there are some FTA promo and shopping channels from them.

@dikonov
Copy link
Contributor Author

dikonov commented Oct 12, 2024

Have you inspected the transport stream and located the LCNs?

I found dvbsnoop (on the box) TSReader and TSDuck tools for analyzing the streams. Now the problem is that I need the raw dvb stream recorded, but the damned box only produces filtered .ts as tv recordings.

dvbsnoop cannot get any data. I have 4 tuners in the box but only 1 adapter.

# lsof | grep adapter
521	/usr/bin/mgcamd	3	/dev/dvb/adapter0/ca1
521	/usr/bin/mgcamd	6	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	29	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	40	/dev/dvb/adapter0/audio0
571	/usr/bin/enigma2	41	/dev/dvb/adapter0/frontend2
571	/usr/bin/enigma2	43	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	44	/dev/dvb/adapter0/video0
571	/usr/bin/enigma2	45	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	48	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	49	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	54	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	55	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	56	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	57	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	58	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	59	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	60	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	61	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	62	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	63	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	64	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	65	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	66	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	67	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	68	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	69	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	71	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	73	/dev/dvb/adapter0/demux0
571	/usr/bin/enigma2	74	/dev/dvb/adapter0/demux0

When I tune to an Info Channel on a transponder recommended for tuning I have excellent signal quality and the channel runs fine (it is tuner 'C' out of 'ABCD') , but dvbsnoop throws this error.

dvbsnoop -s ts -tsraw -n 100 -adapter /dev/dvb/adapter0 -demux /dev/dvb/adapter0/demux0 -frontend /dev/dvb/adapter0/frontend2 
dvbsnoop V1.4.56 -- https://github.com/OpenVisionE2/dvbsnoop 
Error(22): DMX_SET_PES_FILTER failed: : Invalid argument


I also tried other numbers (0-4) to no avail. So, is there a working method to extract the raw DVB stream using an Enigma2 box? (My box is Sezam Marvel running OpenATV 7.4).

@Huevos
Copy link
Owner

Huevos commented Oct 12, 2024

Instructions for stream recording (if your box is capable): https://github.com/oe-alliance/AutoBouquetsMaker/tree/tools/scripts%20and%20tools/Stream%20recording

@dikonov
Copy link
Contributor Author

dikonov commented Oct 14, 2024

Instructions for stream recording (if your box is capable): https://github.com/oe-alliance/AutoBouquetsMaker/tree/tools/scripts%20and%20tools/Stream%20recording

It seems that dvbstream cannot tune to the necessary stream. linuxstb/dvbtools#2
It seems to work after a lot of trial and errors, but I still get nothing at the output.

@Huevos
Copy link
Owner

Huevos commented Oct 14, 2024

It seems that dvbstream cannot tune to the necessary stream

No, you have to tune the box, e.g. use satfinder on tuner A. Once it is tuned start the recording of the stream.

@dikonov
Copy link
Contributor Author

dikonov commented Oct 14, 2024

It seems that dvbstream cannot tune to the necessary stream

No, you have to tune the box, e.g. use satfinder on tuner A. Once it is tuned start the recording of the stream.

Tuner A cannot receive that signal physically. That cable is connected to C and I am far-far away. I have to wait until I can approach the box and change the cabling.

@Huevos
Copy link
Owner

Huevos commented Oct 14, 2024

Ok.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 1, 2024

I have made the recordings, but this git does not allow me to attach them. "File size too big: 25 MB are allowed, 26 MB were attempted to upload." Is there a way to send them via e-mail?

Here is my current version of the new sections in the providers.py file:

	"HTB+_0360": {
		"name": _("HTB+"),
		"transponder": {
			"frequency": 12437000,
			"symbol_rate": 27500000,
			"polarization": eDVBFrontendParametersSatellite.Polarisation_CircularRight,
			"fec_inner": eDVBFrontendParametersSatellite.FEC_3_4,
			"orbital_position": 360,
			"system": eDVBFrontendParametersSatellite.System_DVB_S2,
			"modulation": eDVBFrontendParametersSatellite.Modulation_8PSK,
			"roll_off": eDVBFrontendParametersSatellite.RollOff_auto,
			"original_network_id": 112,
			"transport_stream_id": 4,
		},
		"bat": {
			"bat_lcn_descriptor": 0x83,
			"BouquetID": 0x3000,
		},
		"nit": {
			"nit_lcn_descriptor": 0x70,
			"nit_other_table_id": 0x00,
		},
		"sdt": {
			"sdt_pid": 0x0011,
		},
	},
	"Tricolor_0360": {
		"name": _("Tricolor"),
		"transponder": {
			"frequency": 12226000,
			"symbol_rate": 27500000,
			"polarization": eDVBFrontendParametersSatellite.Polarisation_CircularLeft,
			"fec_inner": eDVBFrontendParametersSatellite.FEC_3_4,
			"orbital_position": 360,
			"system": eDVBFrontendParametersSatellite.System_DVB_S,
			"modulation": eDVBFrontendParametersSatellite.Modulation_QPSK,
			"roll_off": eDVBFrontendParametersSatellite.RollOff_auto,
			"original_network_id": 253,
			"transport_stream_id": 27,
		},

		"bat": {
			"bat_lcn_descriptor": 0xb2,
			"BouquetID": 0x0001,
		},
		"nit": {
			"nit_lcn_descriptor": 0x24,
			"nit_other_table_id": 0x00,
		},
		"sdt": {
			"sdt_pid": 0x0011,
		},

The plugin is now able to create the "Tricolor" bouquet with channels inside, but 1) I only see the channel numbers without any channel names, 2) the selection bar marker does not move in this list (channel selector works well in other bouquets)

36e_Tricolor_problem1

and 3) the "Last scanned" bouquet shows the newly found channels, but the channel names are in the wrong codepage. It looks like the microsoft-cp1251 text was wronly interpreted as iso8859-1.

36e_Tricolor_problem2

@dikonov
Copy link
Contributor Author

dikonov commented Nov 1, 2024

The same codepage problem exists with HTB+. There should be an option in the provider entry to specify the 8-bit codepage they use to broadcast the channel names. In this case it can be KOI8-R or microsoft-cp1251.

! Non-LCN scan gets all channel names for the same channels right.

@Huevos
Copy link
Owner

Huevos commented Nov 1, 2024

You can send to me.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 1, 2024

You can send to me.

[###@gmail.com](https://e.mail.ru/compose?To=###@gmail.com)
    SMTP error from remote mail server after RCPT TO:<###@gmail.com>:
    host gmail-smtp-in.l.google.com [173.194.222.26]:
    550-5.1.1 The email account that you tried to reach does not exist. Please try
    550-5.1.1 double-checking the recipient's email address for typos or
    550-5.1.1 unnecessary spaces.

'###' hides your email address.

@Huevos
Copy link
Owner

Huevos commented Nov 1, 2024

try again please

@dikonov
Copy link
Contributor Author

dikonov commented Nov 1, 2024

try again please

I tried to resend that letter but got the same mail failure notice. Meanwhile, you can try these cloud links to the same .ts files. I hope it works.

https://cloud.mail.ru/public/V23e/QQiYHH3RA - Tricolor
https://cloud.mail.ru/public/aLoE/nxmjXsLXa - HTB+

Patched providers.py
https://cloud.mail.ru/public/NoRc/pYkB7zU9m

@Huevos
Copy link
Owner

Huevos commented Nov 1, 2024

	"HTB+_0360": {
		"name": _("HTB+"),
		"transponder": {
			"frequency": 12341000,
			"symbol_rate": 27500000,
			"polarization": eDVBFrontendParametersSatellite.Polarisation_CircularLeft,
			"fec_inner": eDVBFrontendParametersSatellite.FEC_3_4,
			"orbital_position": 360,
			"system": eDVBFrontendParametersSatellite.System_DVB_S2,
			"modulation": eDVBFrontendParametersSatellite.Modulation_8PSK,
			"roll_off": eDVBFrontendParametersSatellite.RollOff_auto,
			"original_network_id": 112,
			"transport_stream_id": 4,
		},
		"bat": {
			"bat_lcn_descriptor": 0x83,
			"BouquetID": 0x1,
			"BouquetIDs": {
				"Bouquet 1": 0x1,
				"Bouquet 2": 0x2,
				"Bouquet 3": 0x3,
				"Bouquet 4": 0x4,
				"Bouquet 5": 0x5,
				"Bouquet 6": 0x6,
				"Bouquet 7": 0x7,
				"Bouquet 8": 0x8,
				"Bouquet 9": 0x9,
				"Bouquet 10": 0xA,
				"Bouquet 11": 0xB,
				"Bouquet 12": 0xC,
				"Bouquet 13": 0xD,
			}
		},
		"nit": {
			"nit_other_table_id": 0x00,
		},
	},

But according to Lyngsat your transponder details are wrong.

e.g.
DVB-S
27500
3/4
ONID 112
TSID 11

@dikonov
Copy link
Contributor Author

dikonov commented Nov 2, 2024

I had to change the frequency and polarization because the transponder (36e 12437 R) I had entered before is/was not available from the LNB at my present location (It is different than a month ago). I forgot to change the other data! You are right that it has to be chaged too.

I changed the HTB+ provider entry to:

	"HTB+_0360": {
		"name": _("HTB+"),
		"transponder": {
			"frequency": 12341000,
			"symbol_rate": 27500000,
			"polarization": eDVBFrontendParametersSatellite.Polarisation_CircularLeft,
			"fec_inner": eDVBFrontendParametersSatellite.FEC_3_4,
			"orbital_position": 360,
			"system": eDVBFrontendParametersSatellite.System_DVB_S,
			"modulation": eDVBFrontendParametersSatellite.Modulation_QPSK,
			"roll_off": eDVBFrontendParametersSatellite.RollOff_auto,
			"original_network_id": 112,
			"transport_stream_id": 11,
		},
		"bat": {
			"bat_lcn_descriptor": 0x83,
			"BouquetID": 0x3000,
			"BouquetIDs": {
				'Общероссийские': (0x1,),
				'Региональные': (0x2,),
				'Спорт': (0x3,),
				'Кино и сериалы': (0x4,),
				'Познавательные': (0x6,),
				'Развлекательные': (0x7,),
				'Детские': (0x8,),
				'Музыкальные': (0x9,),
				'Информационные': (0xA,),
				'Каналы для взрослых': (0xB,),
				'Радио': (0xC,),
				'Тест': (0xD,),
			}
		},
		"nit": {
			"nit_other_table_id": 0x00,
		},
	},

And tested it.

It works, but the codepage problem in channel names remains. The screenshots I sent before still apply to both providers. Both HTB+ and Tricolor bouquets created after LCN-scan still contain only channel numbers and the services in them are not selectable.

The "bat_lcn_descriptor": 0x83 line is my guess and I suspect that "nit_other_table_id": 0x00 line may be wrong too.

It seems to be better to use "BouquetID": 0x3000 instead of "BouquetID": 0x1 because bouquet 3000 lists all the provider's channels and bouquet 1 contains only the basic nation-wide ones. The initial "Looking for transponders" phase also seems faster this way.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 2, 2024

Have the cloud links to .ts worked for you? Maybe I can get .ts samples for other satellites and providders (Telecarta, MTS, etc) from another person.

@Huevos
Copy link
Owner

Huevos commented Nov 2, 2024

"BouquetID": 0x3000,

That is wrong, wrong, wrong. Why did you change that?

@Huevos
Copy link
Owner

Huevos commented Nov 2, 2024

HTB

The transport stream recording says the channel name encoding is ISO-8859-5.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 2, 2024

That is wrong, wrong, wrong. Why did you change that?

It was my wild guess based on the fact that TSReader shows that bouquet 3000 contains full list of all relevant channels, while bouquet 1 contains only a part of it. Changing "BouquetID": 0x3000, to "BouquetID": 0x1 or vice versa does not change anything in the scanning output.

I do not claim any deep knowledge in DVB standards or the logic inside the plugin and I have no information on how to write a good provider entry for satlcnscan except for the providers.py file itself (which is not enough). I am ready to test and accept any corrections.

The transport stream recording says the channel name encoding is ISO-8859-5.

OK. Iso8859-5 was extremely rare, but here it looks plausible enough. Anyway the plugin fails to convert the channel names to Unicode and ends up with completely unreadable garbage strings, possibly with illegal unprintable symbols which break something or bad unicode.

Just for the context: It has been common case in the past when an 8bit codepage was wronly labeled or not labeled at all causing web pages and text documents to be unreadable. Old pre-unicode software, such as browsers and text editors always had a codepage selector menu to fix that. MS Windows enforced cp1251 as standard and Unix promoted KOI8.

@Huevos
Copy link
Owner

Huevos commented Nov 2, 2024

OK. Iso8859-5 was extremely rare, but here it looks plausible enough. Anyway the plugin fails to convert the channel names to Unicode and ends up with completely unreadable garbage strings, possibly with illegal unprintable symbols which break something or bad unicode.

The plugin is handling what the table says is there. ISO-8859-5 is the default.

Converted to unicode here: https://github.com/Huevos/SatScanLcn/blob/master/SatScanLcn/src/lamedbwriter.py#L145

This is just a single byte charset.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 2, 2024

Does
service_name = service_name.encode("iso-8859-1").decode(charsets[service["service_name_encoding"]])
mean that the code 1) decodes a service name from iso8859-5 and 2) encodes it into iso8859-1 ? It is IMPOSSIBLE!

iso8859-1 does not have symbols to encode cyrillic service names. It would explain why all names are empty strings. But it does not explain why digits and Latin letters disappear too. Other plugins can scan the same services and store their names correctly.

@Huevos
Copy link
Owner

Huevos commented Nov 2, 2024

Ok, you don't get it. It is a one byte charset. 0 - 255.
In the .so those numbers are converted to iso-8859-1 (the DVB standard default).
But in this case it should be iso-8859-5, so in python we encode back to 0 - 255 and then decode to iso-8859-5.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 2, 2024

In the .so those numbers are converted to iso-8859-1 (the DVB standard default).

This step ruins it all. converting the numbers to Latin-1 replaces all cyrillic symbols with unrelated (garbage) extended Latin symbols. This DVB codepage standard is not applicable here because the provider just cannot use Latin-1 to encode cyrillic alphabet. It is not iso8859-1 at any step.

Just my experiment: This is what happens after replacing "iso8859-1" with "utf8". Replacing it with iso8859-5 causes a python error.
codepageproblem3

By the way, Polish, Czech, Hungarian providers should use iso8859-2 (East European).

@Huevos
Copy link
Owner

Huevos commented Nov 2, 2024

You don't seem to get it. In the SI table each char is a single byte, between 0 and 255. Even if the .so converts to iso-8859-1, that is just reversed in the python code (if necessary) and decoded to the correct charset requested in the SI table.

@Huevos
Copy link
Owner

Huevos commented Nov 3, 2024

Ok, we are testing "HTB+_0360" only.

If you test more than one thing at once you are mixing up the data.

So please stop enigma (init 4)
Delete all lamedb and bouquet files.
Restart enigma (init 3)
Scan again with the plugin.
Post lamedb and the bouquet files.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 3, 2024

Here are the same files but with the Forced channel names option ON.
FORCEDNAMES_lamedb&Tricolor,HTB+bouquet.tar.gz.tar.gz

@Huevos
Copy link
Owner

Huevos commented Nov 3, 2024

HTB bouquet has no channels, just spacers.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 3, 2024

HTB bouquet has no channels, just spacers.

Done!
CLEANSCAN_lamedb&HTB+bouquet.tar.gz

@Huevos
Copy link
Owner

Huevos commented Nov 3, 2024

Your lamedb looks good:

services
044d:01680000:000b:0070:22:0
Первый канал
p:HTB+,C:0000
044e:01680000:000b:0070:22:0
Домашний
p:HTB+,C:0000
044f:01680000:000b:0070:22:0
МУЗ
p:HTB+,C:0000
0450:01680000:000b:0070:22:0
НТВ
p:HTB+,C:0000
0451:01680000:000b:0070:22:0
СТС
p:HTB+,C:0000
0452:01680000:000b:0070:22:0
Первый канал +2
p:HTB+,C:0000
0453:01680000:000b:0070:22:0
ОТР
p:HTB+,C:0000
0454:01680000:000b:0070:22:0
HTB +2
p:HTB+,C:0000
0456:01680000:000b:0070:22:0
ТВЦ
p:HTB+,C:0000
0457:01680000:000b:0070:22:0
RT Documentary
p:HTB+,C:0000
0458:01680000:000b:0070:22:0
Лапки LIVE
p:HTB+,C:0000

If you open channel list, press RED for all services... are the channel names screwed in that section?

I will test your lamedb here (in openvix) and see how those channel names look.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 3, 2024

If you open channel list, press RED for all services... are the channel names screwed in that section?

I will test your lamedb here (in openvix) and see how those channel names look.

  1. Clean LCN scan without Forced channel names:
  • red button (All channels) - OK
  • blue button (Last scanned bouquet) - OK
  1. Clean LCN scan with Forced channel names:
  • red button (All channels) - OK
  • blue button (Last scanned bouquet) - BAD channel names

Proof: CLEANSCAN_FORCEDNAMES.tar.gz

@Huevos
Copy link
Owner

Huevos commented Nov 3, 2024

By the way, as far as I know openATV have removed this plugin from their feeds.

@Huevos
Copy link
Owner

Huevos commented Nov 3, 2024

ab3bd52

That should fix the forced names.

Pleased test.

Then I can look at what is going wrong in the bouquet.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 3, 2024

That should fix the forced names.
Pleased test.

Great! It works now in both modes.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 3, 2024

By the way, as far as I know openATV have removed this plugin from their feeds.

I installed it from their feed just days ago. OpenATV 7.4.

@Huevos
Copy link
Owner

Huevos commented Nov 3, 2024

Please post the providers.py you are using.

@Huevos
Copy link
Owner

Huevos commented Nov 3, 2024

From your log:
[SatScanLcn] LCN list from BAT [4032, 4032, 4032, 4032, 4032, 4032, 4032, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4034, 4034, 4034, 4034, 4034]

This looks like complete nonsense that your provider is outputing.

@Huevos
Copy link
Owner

Huevos commented Nov 3, 2024

By the way, as far as I know openATV have removed this plugin from their feeds.

I installed it from their feed just days ago. OpenATV 7.4.

Definitely removed from the build:
oe-alliance/oe-alliance-core@d5d3886

@dikonov
Copy link
Contributor Author

dikonov commented Nov 4, 2024

Definitely removed from the build: oe-alliance/oe-alliance-core@d5d3886

Issue #900 oe-alliance/oe-alliance-core#900 reported.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 4, 2024

Here we use OpenViX.

It does not support my Sezam Marvel receivers, which have 4x tuners and transcoding functions, rarely if ever found in other models.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 4, 2024

From your log: [SatScanLcn] LCN list from BAT [4032, 4032, 4032, 4032, 4032, 4032, 4032, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4034, 4034, 4034, 4034, 4034]

This looks like complete nonsense that your provider is outputing.

Maybe the plugin should use NIT instead? Is there a how-to about writing providers.py and what to look for in the .ts sample files? Various sites say that LCN is a proprietary grey zone with many non-standard quirks.

Please post the providers.py you are using.

providers.py.tar.gz
The relevant sections for 36e have been posted before. The current version follows the changes suggested by you 3 days ago. I am ready to test other possible changes.

@Huevos
Copy link
Owner

Huevos commented Nov 4, 2024

You need to look at your transport stream recording for HTB. I see nothing in the NIT for LCN, only BAT.

Use a program like DVB Inspector or similar.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 4, 2024

You need to look at your transport stream recording for HTB. I see nothing in the NIT for LCN, only BAT.

Use a program like DVB Inspector or similar.

What am I supposed to find there? The variables in the provider enries are not seen in the DVB stream. What is bat_lcn_descriptor and how can I find it?

Maybe it is worth to make a fallback mode that would take all Last scanned channels and put them into the generated bouquet? The plugin successfully finds all relevant transponders ignoring ones for the other provider and finds all physically available channels it should find. It just fails to put them into the bouquet (and arrange in the LCN order). Unordered list is better than empty list.

@Huevos
Copy link
Owner

Huevos commented Nov 4, 2024

Just open your transport stream recording with DVB Inspector or similar program.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 4, 2024

Just open your transport stream recording with DVB Inspector or similar program.

And?
TSReader
The plugin wants some "bat_lcn_descriptor". I do not see anything called that in the TS, but there is "User Private Descriptor" = 0x83. This value is similar to the "bat_lcn_descriptor" for other providers in the plugin. I guess that it is the same, but it is just a guess.

TSReader2
Here I definitely see the LCN. And the logical channel # definitely follows the traditional order of channels. But how do I relate it with the variables in providers.py?

@Huevos
Copy link
Owner

Huevos commented Nov 4, 2024

HTB-1

@dikonov
Copy link
Contributor Author

dikonov commented Nov 4, 2024

So here is my current HTB+ entry.

"HTB+_0360": {
	"name": _("HTB+"),
	"transponder": {
		"frequency": 12341000,
		"symbol_rate": 27500000,
		"polarization": eDVBFrontendParametersSatellite.Polarisation_CircularLeft,
		"fec_inner": eDVBFrontendParametersSatellite.FEC_3_4,
		"orbital_position": 360,
		"system": eDVBFrontendParametersSatellite.System_DVB_S,
		"modulation": eDVBFrontendParametersSatellite.Modulation_QPSK,
		"roll_off": eDVBFrontendParametersSatellite.RollOff_auto,
		"original_network_id": 112,
		"transport_stream_id": 11,
	},
	"bat": {
		"bat_lcn_descriptor": 0x83,
		**"BouquetID": 0x1,**
		"BouquetIDs": {
			'Общероссийские': (0x1,),
			'Региональные': (0x2,),
			'Спорт': (0x3,),
			'Кино и сериалы': (0x4,),
			'Познавательные': (0x6,),
			'Развлекательные': (0x7,),
			'Детские': (0x8,),
			'Музыкальные': (0x9,),
			'Информационные': (0xA,),
			'Каналы для взрослых': (0xB,),
			'Радио': (0xC,),
			'Тест': (0xD,),
		}
	},
},

Since (I think so) you confirm my guess that the bat_lcn_descriptor = 0x83, the only thing in the "bat" section I am not sure about is "BouquetID": 0x1, Why it should be 0x1?

Bouquet 1 contains the main national channels and that's it. Other similar bouquets (2...B) contain topical channels (Sport, Cinema, Documentary, Kids, Music, etc.). At the same time bouquet 0x3000 references all channels together. What is it for? Isn't it the main content list from which individual parts of the provider's package are referenced?

Can I omit "BouquetID": altogether? Is it required? Which variables are required and which are optional? Why did you leave a purely speculative part?

	"nit": {
		"nit_other_table_id": 0x00,
	},

I do not see any nit_other_table in the .ts, and you told me that NIT does not provide any LCN data in this case.

@Huevos
Copy link
Owner

Huevos commented Nov 4, 2024

"nit_other_table_id": 0x00 means skip reading other table.

"BouquetIDs": { that is not correct. Should be "bat_regions": {

bouquet 0x3000 does not have an 0x83 LCN descriptor.

So try this:

	"HTB+_0360": {
		"name": _("HTB+"),
		"transponder": {
			"frequency": 12341000,
			"symbol_rate": 27500000,
			"polarization": eDVBFrontendParametersSatellite.Polarisation_CircularLeft,
			"fec_inner": eDVBFrontendParametersSatellite.FEC_3_4,
			"orbital_position": 360,
			"system": eDVBFrontendParametersSatellite.System_DVB_S,
			"modulation": eDVBFrontendParametersSatellite.Modulation_QPSK,
			"roll_off": eDVBFrontendParametersSatellite.RollOff_auto,
			"original_network_id": 112,
			"transport_stream_id": 11,
		},
		"bat": {
			"bat_lcn_descriptor": 0x83,
			**"BouquetID": 0x1,**
			"bat_regions": {
				'Общероссийские': (0x1,),
				'Региональные': (0x2,),
				'Спорт': (0x3,),
				'Кино и сериалы': (0x4,),
				'Познавательные': (0x6,),
				'Развлекательные': (0x7,),
				'Детские': (0x8,),
				'Музыкальные': (0x9,),
				'Информационные': (0xA,),
				'Каналы для взрослых': (0xB,),
				'Радио': (0xC,),
				'Тест': (0xD,),
			}
		},
		"nit": {
			"nit_other_table_id": 0x00,
		},
	},

@dikonov
Copy link
Contributor Author

dikonov commented Nov 4, 2024

"BouquetIDs": { that is not correct. Should be "bat_regions":

These are not regions. HTB+ has two "regions" broadcasted from two different satellites: 36e west and 56e east. They carry slightly different sets of channels. The bouquets here are topical. All of them should be tuned in every geographical region. Therefore I think that "bat_regions" is not the right option.

I have tested this configuration but nothing changed. The resulting bouquet is still bogus.

20241105-010620-enigma2-debug.log

@Huevos
Copy link
Owner

Huevos commented Nov 5, 2024

bat_regions is just a variable name. It means a bouquet from BAT. And it makes the "region" option available in the interface.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 5, 2024

bat_regions is just a variable name. It means a bouquet from BAT. And it makes the "region" option available in the interface.

And that option in the interface is not needed and is misleading for this provider. There are some "basic" and "extended" packages. Some channels are available to all subscribers (I am not one) while other require extra payment. There might be "basic" and several "premium" bouquets, but not what the interface suggests.

@Huevos
Copy link
Owner

Huevos commented Nov 5, 2024

The idea of the plugin is to read the data contained in the SI tables. You seem to want something different.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 5, 2024

The idea of the plugin is to read the data contained in the SI tables. You seem to want something different.

I do not know what the SI tables are. I want to get the plugin work and generate a list of channels, even if not ideal. Currently it generates a list of numbered spacers(?). The two providers do have LCN, even if it is a different style than, say, Polsat has.

@Huevos
Copy link
Owner

Huevos commented Nov 5, 2024

Service Information tables are the tables contained on the transport stream, e.g. NIT, SDT, BAT, etc.

The job of the plugin is to read those tables and create a bouquet. It job is not to decide what is appropriate for any particular provider or user.

If the tables are broken on your provider that is not the fault of the plugin.

@dikonov
Copy link
Contributor Author

dikonov commented Nov 6, 2024

Service Information tables are the tables contained on the transport stream, e.g. NIT, SDT, BAT, etc.

The job of the plugin is to read those tables and create a bouquet. It job is not to decide what is appropriate for any particular provider or user.

If the tables are broken on your provider that is not the fault of the plugin.

As far as I know after reading the net, LCN is not fully standard and there are flavours or quircks specific to different providers. It might be that HTB+ has its own flavour.

I do not know the internal logic of the plugin, but it should be able to support different variations. DVB analysis tools recognize LCN numbers and channels in BAT, so it should be parseable, even if the algorythm is a bit different.

When the plugin cannot build the correct list of channels, it could have a fallback mode to produce something usable (e.g. list of all channels from the provider's transponders) instead of garbage or at least tell that it has failed. Currently it says to the user that everything is OK, but the result is an empty list (Orange 16e) or a list of useless spacers (HTV+ 36e). I also tested Polsat at 13e and it works nicely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants