StreamDetails subset - Aspect Ratio?
#1
Hello All.

I'm trying to come up with a single-command direct method of grabbing sub-components of "streamdetails" in a GetItem call. The basic call looks like this...

jsonrpc?request={"jsonrpc":"2.0","method":"Player.GetItem","params": {"properties":["streamdetails"],"playerid":1},"id":1}

This returns the full set of stream details, which usually looks something like this...

"streamdetails":{"audio":[{"channels":6,"codec":"dts","language":""}],"subtitle":[],"video":[{"aspect":1.8500000238418579102,"codec":"h264","duration":0,"height":1040,"stereomode":"","width":1920}]}

While this is good as a starting-point, I'd like to directly grab sub-properties of "video" directly, such as "aspect". Is there a command variant to return just video aspect or video codec? Would this be a specific property set passed to "GetItem", or is there a different JSON call that can get the info?

Thanks for any leads or ideas anyone may be able to contribute on this one.
Reply
#2
sure! you can try the XBMC.GetInfoLabels method ( http://kodi.wiki/view/JSON-RPC_API/v6#XB...InfoLabels )

following your example for the video aspect, your call should look similar to:

Code:
{"jsonrpc":"2.0","method":"XBMC.GetInfoLabels","id":1,"params":{"labels":["VideoPlayer.VideoAspect"]}}

As the method description says, see http://kodi.wiki/index.php?title=InfoLabels for a list of possible info labels
Reply
#3
Many thanks for this, Jorthefox...greatly appreciated.
Reply

Logout Mark Read Team Forum Stats Members Help
StreamDetails subset - Aspect Ratio?0