Jump to content


keratos

Member Since 27 Nov 2014
Offline Last Active 20 Apr 2018 13:12
-----

Topics I've Started

IPTV glitching/ freezing

20 April 2018 - 12:38

Hi all, before I set out the issue - I ACCEPT that sat boxes are designed for satellite TV; however, we are acutely aware of the existence of many a plugin / script / function even images themselves, dedicated to watching live TV stream from a server using MPEG-TS . So , ....

 

I have a supplier of live TV. They have an android app and it works flawlessly on my phone and on an android TV box. Never any issues. 

 

However,

 

When I configure my OpenPli 6.2RC 19/4/2018 build on my VU+ Duo box, using suls' excellent E2M3U2BOUQUET plugin, and watch TV streams, they freeze or glitch, The period at which they do this is random, and the freeze time is random but no more than about 2 seconds on OpenPLi. I did try OpenVIX, VTI, BH, OpenATV, OpenHD. All images displayed variances in terms of number of freezes and duration of freeze, but by the far the "best" was OpenPLi. Hardly surprising as quite a few images use OpenPLi source. I also noted that changing the channel at freeze, correctly played the new channel.

 

So, I was wondering what this freezing is due to :

 

1. Supplier: NO! The TV works flawlessly all day on two concurrent devices (mobile phone and a cheap ebay android TV box). No freezes, glitches. Cannot be the supplier. 

 

2. Network (WAN, LAN, Router): NO! because I have no problems whatsoever watching TV four hours concurrently on the android phone and android TV box.

 

3. CPU. NO! because the CPU is around 2% utilised when watching TV

 

4. RAM. NO! because there is plenty of RAM free and I have also tried with Swap file on and off.

 

5. Network adapter on the VU+ Duo. POSSIBLY? I dont know enough about how these work at the lower layers, but I guess the card was never intended to process video intensive packet data? The box used Broadcomm's BCM7335 SoC my phone (Honor 7x) uses the HiSilicon Kirin 659 octa-core. Far superior. Not sure what the android TV box (cost £40) uses (cheap eBay) but unlikely to be as good as the Honor 7X.

 

6. E2M3UPLUGIN : NO! Ive tried all the combinations of IPTV/DVB/Service ID types. A search of the net for "freeze" and "IPTV" and "enigma" reveals this is a common problem even when not using the E2M3U2BOUQUET plugin.

 

7. Enigma2 codebase.: POSSIBLY: The fact that different images gave different results is interesting. I also read on the net that someone has provided a fix for InfoBar(something). I also tried the serviceapp plugin and this did improve things greatly. So I'm leaning toward an enigma2 code issue - well not "issue" but an improvement than can be applied.

 

Does anyone know what or how we can improve this in OpenPLi?

 

 

 

 


hide spinner during plugin execution

25 August 2017 - 09:03

So i have my plugin code that performs an update (doesnt matter what) as per below...

 

my plugin.py file creates an instance of myUpdater class. The screen appears correctly, the progress bar increments correctly, but how do I prevent the spinner. I guess the core system detects that the thread is taking longer than "expected" so displays the spinner. Indeed, the enigma2 output log confirms this when running enigma2 from the command line interactively rather than a service.

 

 

 

 

from Screens.Screen import Screen

from Components.Label import Label

from Components.ProgressBar import ProgressBar

from Components.ActionMap import ActionMap


 

class myUpdater(Screen):

  skin = """

  <screen position="center,center" size="840,160" flags="wfNoBorder" backgroundColor="background">

  <widget name="status" position="20,10" size="800,70" transparent="1" font="RegularLight;46" foregroundColor="foreground" backgroundColor="background" valign="center" halign="left" noWrap="1" />

  <widget name="progress" position="0,88" size="840,6" transparent="1" alphatest="blend" pixmap="MetrixFullHD/white.png" borderWidth="0" />

  <widget name="key_red" position="20,100" size="10,60" backgroundColor="red" />

  <widget name="key_green" position="20,100" size="10,60" backgroundColor="green" />

  </screen>

  """

 

 

def __init__(self, session):

  Screen.__init__(self, session)

  self["key_red"] = Label()

  self["key_red"].hide()

  self["key_green"] = Label()

  self["key_green"].show()

 

  self["actions"] = ActionMap(["OkCancelActions","ColorActions"],

  {

   "ok": self.ok,

   "cancel": self.exit,

   "green": self.startUpdate,

   "red": self.stopUpdate

  }, -1)

 

  self["status"] = Label(_("Press green to start update!"))
  self["progress"] = ProgressBar()

  self["progress"].hide()

 

 

def ok(self):

  self.close()

 

 

def exit(self):

  self.close()

 

 

def startUpdate(self):

  self["key_red"].show()

  self["key_green"].hide()

  self["status"].setText(_("Updating......"))

  ...

  ... some code ....

  ...

  setProgress(20)

  ...

  ... some code ....

  ...

  setProgress(40)

  ...

  ... some code ....

  ...

  setProgress(60)

  ...

  ... and so on...

 
 

def setProgress(self,val):

  self["progress"].setValue(val)

  self["progress"].show()

 

 


hide spinner during plugin execution

25 August 2017 - 08:55

from Screens.Screen import Screen
from Components.Label import Label
from Components.ProgressBar import ProgressBar
from Components.ActionMap import ActionMap
from Tools.Downloader import downloadWithProgress


class MyMetrixUpdater(Screen):
skin = """
   <screen position="center,center" size="840,160" flags="wfNoBorder" backgroundColor="background">
   <widget name="status" position="20,10" size="800,70" transparent="1" font="RegularLight;46" foregroundColor="foreground" backgroundColor="background" valign="center" halign="left" noWrap="1" />
   <widget name="progress" position="0,88" size="840,6" transparent="1" borderWidth="0" />
   <widget name="key_red" position="20,100" size="10,60" backgroundColor="red" />
   <widget name="key_green" position="20,100" size="10,60" backgroundColor="green" />
   </screen>
   """

def __init__(self, session):
   Screen.__init__(self, session)
   self["key_red"] = Label()
   self["key_red"].hide()
   self["key_green"] = Label()
   self["actions"] = ActionMap(["OkCancelActions","ColorActions"],
{
"ok": self.ok,
"cancel": self.exit,
"green": self.startUpdate,
"red": self.stopUpdate
}, -1)


self["key"] = Label(_("Start update"))
self["status"] = Label(_("Press green to start update!"))
self["progress"] = ProgressBar()
self["progress"].hide()


def ok(self):
self.close()


def exit(self):
self.close()


def startUpdate(self):
self["key"].setText(_("Abort"))
self["key_red"].show()
self["key_green"].hide()
self["status"].setText(_("Download files..."))
localurl = '/tmp/enigma2-plugin-skins-pvmc-skin_1.0_all.ipk'
sourceurl = 'http://metrixfullhd.w1.ms5.eu/dl-counter/download/enigma2-plugin-skins-pvmc-skin_1.0_all.ipk'
self.download = downloadWithProgress(sourceurl,localurl)
self.download.addProgress(self.downloadProgress)
self.download.start().addCallback(self.downloadFinished).addErrback(self.downloadFailed)


def stopUpdate(self):
self["status"].setText(_("Update is aborting..."))


def downloadFinished(self, string=""):
self["status"].setText(_("Download successfully!"))


def downloadFailed(self, failure_instance=None, error_message=""):
text = _("Error downloading files!")
if error_message == "" and failure_instance is not None:
error_message = failure_instance.getErrorMessage()
text += ": " + error_message
self["status"].setText(text)


def downloadProgress(self, recvbytes, totalbytes):
progress = int(100 * recvbytes / float(totalbytes))
self["progress"].setValue(int(progress))
self["progress"].show()