API访问不同的视频格式和分辨率 [英] API access to different video formats and resolutions

查看:204
本文介绍了API访问不同的视频格式和分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当视频文件上传到Google云端硬盘时,它会被转码为多种不同的格式和分辨率,以便根据平台,屏幕大小,网络带宽等有效预览视频文件。非常类似于将视频文件在YouTube上观看视频。

When a video file is uploaded to Google Drive, it gets transcoded to a bunch of different formats and resolutions, so that it can be previewed efficiently depending on the platform, screen size, network bandwidth, etc. Pretty much like putting a video on YouTube.

我在寻找的是一种获取直接链接到任何不同转码的方法,就像我可以获得一个URL下载原始文件。没关系,如果URL是临时的。要取得原始档案,我会执行档案:取得电话通过API,然后从该响应下载downloadLink URL。所以我希望有一个API调用的参数可以指定替代原始文件的360p webm代码转换(例如)。但是我没有看到任何这样的参数,也没有看到一个替代的API调用来做同样的事情。

What I'm looking for is a way to get a direct URL to any of the different transcodings, in the same way that I can get a URL to download the original file. It's ok if the URL is temporary. To get the original file, I'd do a File: get call through the API, then download the downloadLink URL from that response. So I was hoping there would be a parameter to the API call that would specify, instead of the original file, the 360p webm transcoding (for example). But I don't see any such parameter, nor an alternate API call to do the same thing.

在我的用例中,我会从JavaScript调用API在客户端,并将生成的URL粘贴到HTML元素中。我需要将视频与CORS标题一起提供(我想使用视频元素作为WebGL纹理)。虽然它也可能是有用的,有一个解决方案,不包括CORS头。

In my use case, I'd be calling the API from JavaScript on the client side, and pasting the resulting URL into an HTML element. I would need the video to be served with CORS headers (I want to use the video element as a WebGL texture). Though it might also be useful to have a solution that didn't include CORS headers.

任何方式来做到这一点?可能是一种非正式的解决方法?

Any way to do this? Maybe an unofficial workaround?

推荐答案

Google Drive API不支持此功能,也不是此产品的核心用例。

The Google Drive API doesn't support this, nor is this a core use case for the product.

这篇关于API访问不同的视频格式和分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆