Hi @Adam792
Can you check if my abertis.py is correct?
i get this error
Mux 12548 V
Ubuntu 20
Tvheadend 4.3.0~pre+202211211947
Oscam-emu (biss verified with tvi Portugal )
Thank and sorry for asking too much
Can you check if my abertis.py is correct?
import sys
pid = int(sys.argv[1])
packet = sys.stdin.buffer.read(188)
while packet !="":
tspid = ((packet[1] & 0x1f) << 8) | packet[2]
if tspid == pid :
afc = packet[3] & 0x30
if afc == 0x10 :
sys.stdout.flush()
sys.stdout.buffer.write(packet[4:])
elif afc == 0x30 :
sys.stdout.flush()
sys.stdout.buffer.write(packet[packet[4]+5:])
packet = sys.stdin.buffer.read(188)
i get this error
mpegts: Abertis PID 702 in Abertis - tuning on IPTV #1
2022-11-28 15:16:36.096 subscription: 0008: "scan" subscribing to mux "Abertis PID 702", weight: 6, adapter: "IPTV #1", network: "Abertis", service: "Raw PID Subscription"
2022-11-28 15:16:36.096 spawn: Executing "/home/hts/Abertis/tdt.sh"
2022-11-28 15:16:37.259 spawn: Traceback (most recent call last):
2022-11-28 15:16:37.259 spawn: File "/home/hts/Abertis/abertis.py", line 9, in
2022-11-28 15:16:37.259 spawn: tspid = ((packet[1] & 0x1f) << 8) | packet[2]
2022-11-28 15:16:37.259 spawn: IndexError: index out of range
2022-11-28 15:16:37.301 iptv: stdin pipe 40 unexpectedly closed: No data
2022-11-28 15:16:51.093 mpegts: Abertis PID 702 in Abertis - scan no data, failed
2022-11-28 15:16:51.093 subscription: 0008: "scan" unsubscribing
Mux 12548 V
{
"sid": 702,
"lcn": 0,
"lcn_minor": 0,
"lcn2": 0,
"srcid": 0,
"dvb_servicetype": 0,
"dvb_ignore_eit": false,
"prefcapid": 0,
"prefcapid_lock": 0,
"force_caid": 0,
"pts_shift": 0,
"created": 1669632706,
"last_seen": 1669632706,
"enabled": true,
"auto": 0,
"priority": 0,
"s_type_user": -1,
"svcname": "Abertis PID 702",
"verified": 1,
"pcr": 702,
"pmt": 8000,
"stream": [
{
"type": "H264",
"pid": 702,
"position": 0
},
{
"pid": 8191,
"type": "CA",
"position": 262144,
"caidlist": [
{
"caid": 9728
}
]
}
],
"uuid": "1a07a33b4b16c59ad969dfe24a463fcf"
}
Ubuntu 20
Tvheadend 4.3.0~pre+202211211947
Oscam-emu (biss verified with tvi Portugal )
Thank and sorry for asking too much