Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The only place that exact video dimensions are exposed in a Data API call is when you make a <a href="https://developers.google.com/youtube/v3/docs/videos/list">videos.list(part=fileDetails, id=VIDEO_ID)</a> call using the v3 API, while authenticated as the owner of the video. It's returned in the <a href="https://developers.google.com/youtube/v3/docs/videos#fileDetails.videoStreams%5B%5D.aspectRatio">video.fileDetails.videoStreams[].aspectRatio</a> property. This isn't particularly useful, since you need to be authenticated as the video's owner in order to get that info.</p> <p>If you just have a webpage, and want to make a <a href="http://en.wikipedia.org/wiki/JSONP">JSONP</a> call to get a hint about whether a given video is 16:9 or 4:3, you can do that via something like</p> <p><a href="http://gdata.youtube.com/feeds/api/videos/">http://gdata.youtube.com/feeds/api/videos/</a><code>VIDEO_ID</code>?v=2&amp;alt=jsonc&amp;callback=myCallback</p> <p>E.g.</p> <p><a href="http://gdata.youtube.com/feeds/api/videos/F1IVb2_FYxQ?v=2&amp;alt=jsonc&amp;callback=myCallback">http://gdata.youtube.com/feeds/api/videos/F1IVb2_FYxQ?v=2&amp;alt=jsonc&amp;callback=myCallback</a></p> <p>has <code>"aspectRatio":"widescreen"</code> set in its response, which is a hint that the video is 16:9 (or close to 16:9).</p> <p><a href="http://gdata.youtube.com/feeds/api/videos/u1zgFlCw8Aw?v=2&amp;alt=jsonc&amp;callback=myCallback">http://gdata.youtube.com/feeds/api/videos/u1zgFlCw8Aw?v=2&amp;alt=jsonc&amp;callback=myCallback</a></p> <p>does not have <code>aspectRatio</code> set at all, which means that the videos is 4:3 (or close to 4:3). It's not always the exact aspect ration, but it's close enough for the vast majority of videos to be useful.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload