When I use the oembed URL in my PHP code and extract the $video->width
and $video->height
from my uploaded video, I get values back that don't match anything I've seen associated with my Youtube video.
Original video dimensions, as uploaded to Youtube: 640 x 336
oembed returns: 480 x 270
Smallest embed option when sharing from Youtube page UI: 560 x 316
Does anyone know where oembed gets these values? Why does it default to 480? Is there a way to get the true video dimensions, or least bump the default up to 640 x [proportional_height]
?
My goal is to preserve the native dimensions of the video (no scaling) when embedding on my website, without users actually needing to key-in the video dimensions again.