It looks like the vide_info is present only if the video is attached to a tweet in my own timeline??
That makes no sense at all: can someone from Twitter please explain?
Tested with my id 914278370606686208
where I’ve actually found
jsonObject.getJSONObject("extended_entities").getJSONArray("media").getJSONObject(0)
equals to
{"id":914278122736029697,"id_str":"914278122736029697","indices":[79,102],"media_url":"http:\/\/pbs.twimg.com\/ext_tw_video_thumb\/914278122736029697\/pu\/img\/OCmlwjmt3AmSgf-g.jpg","media_url_https":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/914278122736029697\/pu\/img\/OCmlwjmt3AmSgf-g.jpg","url":"https:\/\/t.co\/DS5F6VG7D0","display_url":"pic.twitter.com\/DS5F6VG7D0","expanded_url":"https:\/\/twitter.com\/giuliohome\/status\/914278370606686208\/video\/1","type":"video","sizes":{"small":{"w":340,"h":340,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"medium":{"w":600,"h":600,"resize":"fit"},"large":{"w":720,"h":720,"resize":"fit"}},"video_info":{"aspect_ratio":[1,1],"duration_millis":45000,"variants":[{"content_type":"application\/x-mpegURL","url":"https:\/\/video.twimg.com\/ext_tw_video\/914278122736029697\/pu\/pl\/Rx2WP4c8fS5iSXjl.m3u8"},{"bitrate":832000,"content_type":"video\/mp4","url":"https:\/\/video.twimg.com\/ext_tw_video\/914278122736029697\/pu\/vid\/480x480\/V7W0dbJzlqGnF1Pd.mp4"},{"bitrate":320000,"content_type":"video\/mp4","url":"https:\/\/video.twimg.com\/ext_tw_video\/914278122736029697\/pu\/vid\/240x240\/lEf-P2xyDdVhdfXl.mp4"},{"bitrate":1280000,"content_type":"video\/mp4","url":"https:\/\/video.twimg.com\/ext_tw_video\/914278122736029697\/pu\/vid\/720x720\/SJQxZ5qf70XSqwHf.mp4"}]},"additional_media_info":{"monetizable":false}}