2014-08-06, 13:50
As I was writing code to try to open the current XBMC.log to search and find the most recent of the following line and parse it:
I thought I might give it a go and humbly request whether this information might be made available via the python api?
Currently, via InfoLabels, we can retrieve VideoCodec, VideoResolution and VideoAspect.
Unfortunately, VideoResolution != pheight and VideoResolution * VideoAspect != pwidth. So this results in all sorts of other means of trying to get this information since python does not natively provide any libraries that can retrieve this kind of info. Currently, I use a python wrapper around a third party dll (mediainfo) and since dlls cannot be included in the official repo, then I need to provide a means of downloading that dll and then it becomes an issue of platform specificity.
Since the needed info is printed into the log, I was considering reading the log and parsing it when the 'onPlaybackStarted' event fires.
However this seems a bit crazy when XBMC (Kodi) knows this info.
Is there anyone on the dev team that would be willing to make this info available via the python api? Whether its a property of xbmc.Player, an InfoLabel or even via JSON?
Thanks for your consideration. I understand it's a bit of work, likely for someone that doesn't write in python. If I had any talent whatsoever in cpp, I would give it a go, but I am sadly lacking there.
Code:
07:27:22 T:8936 NOTICE: fps: 23.976024, pwidth: 1280, pheight: 720, dwidth: 1280, dheight: 720
I thought I might give it a go and humbly request whether this information might be made available via the python api?
Currently, via InfoLabels, we can retrieve VideoCodec, VideoResolution and VideoAspect.
Unfortunately, VideoResolution != pheight and VideoResolution * VideoAspect != pwidth. So this results in all sorts of other means of trying to get this information since python does not natively provide any libraries that can retrieve this kind of info. Currently, I use a python wrapper around a third party dll (mediainfo) and since dlls cannot be included in the official repo, then I need to provide a means of downloading that dll and then it becomes an issue of platform specificity.
Since the needed info is printed into the log, I was considering reading the log and parsing it when the 'onPlaybackStarted' event fires.
However this seems a bit crazy when XBMC (Kodi) knows this info.
Is there anyone on the dev team that would be willing to make this info available via the python api? Whether its a property of xbmc.Player, an InfoLabel or even via JSON?
Thanks for your consideration. I understand it's a bit of work, likely for someone that doesn't write in python. If I had any talent whatsoever in cpp, I would give it a go, but I am sadly lacking there.