我一直在尝试使用YouTube API通过ChannelBanners(v3数据API的一部分)上传频道横幅。
问题不在于上传,因为这个过程看起来相当简单,但实际上是要上传图像。
调用channelBanners.insert方法将二进制图像数据上传到YouTube。图像必须具有16:9的宽高比,并且至少为2048x1152像素。我们建议您上传2560像素x 1440像素的图像。
让我们说我想从其他YouTube频道下载横幅并将其上传到另一个频道。 YouTube频道API不提供brandingSettings
下超过2048x1152的图片,而是提供:
[bannerImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w1060-fcrop64=1,00005a57ffffa5a8-nd-c0xffffffff-rj-k-no
[bannerMobileImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w640-fcrop64=1,32b75a57cd48a5a8-nd-c0xffffffff-rj-k-no
[bannerTabletLowImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w1138-fcrop64=1,00005a57ffffa5a8-nd-c0xffffffff-rj-k-no
[bannerTabletImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w1707-fcrop64=1,00005a57ffffa5a8-nd-c0xffffffff-rj-k-no
[bannerTabletHdImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w2276-fcrop64=1,00005a57ffffa5a8-nd-c0xffffffff-rj-k-no
[bannerTabletExtraHdImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w2560-fcrop64=1,00005a57ffffa5a8-nd-c0xffffffff-rj-k-no
[bannerMobileLowImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w320-fcrop64=1,32b75a57cd48a5a8-nd-c0xffffffff-rj-k-no
[bannerMobileMediumHdImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w960-fcrop64=1,32b75a57cd48a5a8-nd-c0xffffffff-rj-k-no
[bannerMobileHdImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w1280-fcrop64=1,32b75a57cd48a5a8-nd-c0xffffffff-rj-k-no
[bannerMobileExtraHdImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w1440-fcrop64=1,32b75a57cd48a5a8-nd-c0xffffffff-rj-k-no
[bannerTvImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w2120-fcrop64=1,00000000ffffffff-nd-c0xffffffff-rj-k-no
[bannerTvLowImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w854-fcrop64=1,00000000ffffffff-nd-c0xffffffff-rj-k-no
[bannerTvMediumImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w1280-fcrop64=1,00000000ffffffff-nd-c0xffffffff-rj-k-no
[bannerTvHighImageUrl] => https://yt3.ggpht.com/xc4v6PgAiOeo-o3uCnh1EI9jF9oUV35vMH2eeQhhWbjWaK3ruINHzPYDJNJ3Mk_vxaBW85S-bWE=w1920-fcrop64=1,00000000ffffffff-nd-c0xffffffff-rj-k-no
如何从YouTube API获取完整分辨率的频道横幅图片,然后将其重新上传到其他频道?