e2openplugin-OpenWebif icon indicating copy to clipboard operation
e2openplugin-OpenWebif copied to clipboard

Request for current Service (or Video/Audio) bitrate

Open gizmocuz opened this issue 6 years ago • 3 comments

It would be great if the API could be extended to get the current Service bitrate (or video/audio bitrate) This (used) to be possible via the SNMP Agent python plugin

		service = self.session.nav.getCurrentService()
		if service:
			#stream() doesn't work in HEAD enigma2, default data demux for tuner 0 seems to be 2...
			demux = 2
			try:
				stream = service.stream()
				if stream:
					streamdata = stream.getStreamingData()
					if streamdata and 'demux' in streamdata:
						demux = streamdata["demux"]
			except:
				pass
			info = service.info()
			vpid = info.getInfo(iServiceInformation.sVideoPID)
			apid = info.getInfo(iServiceInformation.sAudioPID)
			cmd = "bitrate "
			cmd += str(demux)
			cmd += " "
			cmd += str(vpid)
			cmd += " "
			cmd += str(apid)
			self.running = True
			self.container.execute(cmd) 

Maybe this information could be added to the result of 'tunersignal' ?

Thank you in advance!

gizmocuz avatar Dec 05 '19 08:12 gizmocuz

We have 2 problems. 1.) getStreamingData is not available on all images 2.) self.container.execute(cmd) is a very bad implementation

Solution: Extend the service.info() with the bitrate info. -> needs to implement in enigma2

jbleyel avatar Mar 25 '20 12:03 jbleyel

@jbleyel , it would be great if that could be done, maybe with some more statistics (like Continuity Counter errors) Is there a place where we can request this ?

gizmocuz avatar Mar 25 '20 13:03 gizmocuz

enigma2 request are not so easy because of many different images. You can try to pull your request to OpenPli or OpenATV.

jbleyel avatar Mar 25 '20 19:03 jbleyel