Get aspect ratio of a video in script - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Get aspect ratio of a video in script (/showthread.php?tid=80739) |
Get aspect ratio of a video in script - mikper - 2010-09-09 Hi! I was wondering if there is any way to get the aspect ratio of a video that is about to play (or playing). The thing is, I would like to create a script that changes the zoom on projector based on the aspect ratio, but if I can't get it in a python script, I wont bother. I've looked a bit at the Python API but could not find anything that seems to fit my requirements. Still, I am hoping that there is a way... Does anybody know? I have found the information I want within the XBMC sources (CStreamDetails holds the information), but the question is if it is exposed via the Python API. Otherwise I might want to extend the Python API to allow me to do this, but that makes this project a bit (or much) more complicated.... Cheers, Mikael - spiff - 2010-09-09 info label is videoplayer.videoaspect. just grab that, you might have to use a json call. |