Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £99! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £149! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[ABM-MISC] ABM with use of IPTV Streams

@bbbuk, sorry I forgot about this thread. Abu reminded me about your PR.

Lets try a bit of a different way. Code is attached.

Stream type is set in the xml file. So to add a stream type do it like this...

Code:
<stream url="http://stream.source:port/live/username/F36/password/308.ts" target="701" name="our name 1" streamtype="4097" />

So stream type is case by case, not global. Are you happy with this format?
I like that :). Provides more flexibility if want certain service refs on different streams.

I'm using my modded version currently so I'll try this likely at weekend from unmodified version before applying your POC.

With regards to description, I think something like ServiceRef or ServiceRefType. For consistency really as the original introduction of recording IPTV in E2 uses ServiceReference (see original git).
 
All the other attributes are lower case so we need to stick to that.

Give it a test, then we will decide what to name it.

Also maybe limit allowed types to 1, 4097, 5001 and 5002.
 
Okay tried this with vanilla ABM except for your two modded files and crashed at end of scan.

Relevant part of crash log:-
Code:
<   260.929> [ABM-DvbScanner] Reading transponders...
<   264.859> [gRC] main thread is non-idle! display spinner!
<   266.247> [ABM-DvbScanner] Scan complete, netid:  None
<   266.257> [ABM-DvbScanner] Added/Updated 74 transponders with network_id = 0x20
<   266.257> [ABM-DvbScanner] Reading services (SKY)...
<   270.370> [ABM-DvbScanner] Read 606 services with bouquet_id = 0x1001
<   270.370> [ABM-DvbScanner] Reading services extra info...
<   285.513> [ABM-DvbScanner] Read extra info for 733 services
<   285.523> [ABM-Manager][read] sat_282_sky_uk, Done
<   285.535> [eDVBFrontend1] set dynamic current limiting
<   285.632> [ABM-Manager][save] Saving...
<   285.643> [ABM-Manager][save] Bouquets to hide: {'sat_282_sky_uk': [1050]}
<   285.643> [ABM-Manager][save] TV bouquets to keep: []
<   285.643> [ABM-Manager][save] Radio bouquets to keep: []
<   285.644> [ABM-Manager][save] Add provider prefix to bouqets: False
<   285.644> [ABM-BouquetsWriter] Writing lamedb...
<   286.979> [ABM-BouquetsWriter] Wrote 62 transponders and 733 services
<   287.033> [ABM-Tools][customLCN] No custom video LCN file for sat_282_sky_uk.
<   287.042> [ABM-Tools][customLCN] No custom radio LCN file for sat_282_sky_uk.
<   287.123> [ABM-Tools][customMix] Reading CustomMix file for sat_282_sky_uk.
<   287.148> Traceback (most recent call last):
<   287.148>   File "/usr/lib/enigma2/python/Plugins/SystemPlugins/AutoBouquetsMaker/scanner/main.py", line 523, in doBuildIndex
<   287.148>   File "/usr/lib/enigma2/python/Plugins/SystemPlugins/AutoBouquetsMaker/scanner/manager.py", line 151, in save
<   287.149>   File "/usr/lib/enigma2/python/Plugins/SystemPlugins/AutoBouquetsMaker/scanner/tools.py", line 192, in customMix
<   287.149>     if streamtype and "stream" in customised["video"][target]: # if a stream was added above, a custom streamtype may also be added
<   287.149> KeyError: 170
<   287.149> [ePyObject] (CallObject(<bound method AutoBouquetsMaker.doBuildIndex of <class 'Plugins.SystemPlugins.AutoBouquetsMaker.scanner.main.AutoBouquetsMaker'>>,()) failed)

When I removed the custom xml file there is no crash.

I added to end of custom xml file the following tag info:-
Code:
target="106" streamtype="4097" />
 
Passed xml validation check.

I have just noticed that in @Huevos example xml file, it also has a "name" tag in addition to the "streamtype" tag he mentioned. The "name" tag is new and isn't in my xml file as all I did was add "streamtype" tag. Eg:

Code:
<stream url="http://stream.source:port/live/username/F36/password/106" target="106" streamtype="4097" />
 
This worked for me

Code:
<custommix>

    <streams>
        <stream url="http%3a//xxxxxxxx.ts" target="107" streamtype="4097" />
    </streams>
</custommix>
 
Ok, thanks :)

Edited xml so it had just one stream and it was okay. I'll slowly add the other streams to see where it falls over but I suspect I know where it will. I'll post back with results...
 
Found what error was eventually :)

It's what happens when the "target" channel doesn't exist so in my error above channel 170 no longer exists (most likely moved).

Commented out that and one or two others and works fine. I'll have to figure out what these channels were/are and where they've moved to.

Could it be coded so that it gracefully handles situations where target channel doesn't exist like ignoring that line and moves on to next one?
 
Found what error was eventually :)

It's what happens when the "target" channel doesn't exist so in my error above channel 170 no longer exists (most likely moved).

Commented out that and one or two others and works fine. I'll have to figure out what these channels were/are and where they've moved to.

Could it be coded so that it gracefully handles situations where target channel doesn't exist like ignoring that line and moves on to next one?
Ok, so we need some sort of sanity test...

Remove...
Code:
if streamtype and "stream" in customised["video"][target]:

Replace with...
Code:
if streamtype and target and target in customised["video"] and "stream" in customised["video"][target]:

Not tested. :confused:
 
Ok, so we need some sort of sanity test...

Remove...
Code:
if streamtype and "stream" in customised["video"][target]:

Replace with...
Code:
if streamtype and target and target in customised["video"] and "stream" in customised["video"][target]:
That works, thanks.

Things tested:-
* Defaults to servicereftype of 1 when tag not present
* Doesn't crash if target stream doesn't exist
* Can have different service ref types for different channels

Thanks again :)
 
Should we limit serviceRefTypes to 1, 4097, 5001, 5002? Are there any others?
 
They are the only serviceref types that I know of.

How about defaulting to 1 if serviceref type isn't one of those mentioned?
 
Here is the final version (not tested).

Attribute name has been changed to "servicereftype".

Text for adding to "README.txt":
Code:
You can also give your stream a "service reference type". This allows you to tell the receiver which playback software 
to use for that individual stream.

In this example "servicereftype" has been added.

<custommix>
	<streams>
		<stream url="http://stream.source:port/live/username/F36/password/308.ts" target="118" servicereftype="4097" />
	</streams>
</custommix>

The following is a list of currently valid "service reference types".

1, processed by the SoC (for when buffering is not required),
4097, processed by gstreamer via servicemp3,
5001, processed by gestreamer via gst-player,
5002, processed via extplayer3.
 

Attachments

Last edited:
They are the only serviceref types that I know of.

How about defaulting to 1 if serviceref type isn't one of those mentioned?
Code attached above should do that automatically.
 
@Huevos, above code works fine as intended except for small typo in tools.py:-
SERVICEREF_ALLOWED_TYPES = [1, 4097, 5001, 5002]

Thanks again :)
 
Create a PR here regarding your work on this @Huevos.

Thanks again :)
 
Last edited:

OpenViX Feeds Status

Back
Top