YouTube/Vimeo API - MP4 文件 [英] YouTube/Vimeo API - MP4 files
问题描述
我认为 YouTube 或 Vimeo 不再有(甚至付费)API,这将允许我使用渐进式下载流式传输我上传到那里的视频文件(MP4、MPEG-TS 甚至 FLV),对吗?
I think YouTube or Vimeo does not have (even paid) any longer API, that will allow me streaming with use of the progressive download the video files (MP4, MPEG-TS or even FLV) I have uploaded there, right?
其他平台可能有这样的API吗?
Is there possibly other platform have such API?
彼得
推荐答案
首先根据 API 3 视频链接未显示 Vimeo 现在正在处理 API 支持 此处 通过电子邮件获得额外支持.
First of all, according to API 3 Link to video not showing Vimeo is now handling API support here with additional support via Email.
对于 PRO 帐户,以下是使用新的 V3 API 在 Vimeo 上访问视频的 MP4 文件的步骤:
For a PRO account, here are the steps to accessing MP4 files for your videos on Vimeo using the new V3 API:
- 在此处创建一个新的 Vimeo 应用:https://developer.vimeo.com/apps/new
- 创建后,点击顶部的 oAuth2 按钮并复制您的访问令牌.
- 向 https://api.vimeo.com/videos/VIDEO_ID 并添加标题Authorization : Bearer ACCESS_TOKEN",其中 VIDEO_ID 是标准 Vimeo URL 中的 ID,ACCESS_TOKEN 是 #2 中的令牌.
- Create a new Vimeo app here: https://developer.vimeo.com/apps/new
- Once created, click on the oAuth2 button at the top and copy your access token.
- Make a GET request to https://api.vimeo.com/videos/VIDEO_ID and add the Header "Authorization : Bearer ACCESS_TOKEN" where VIDEO_ID is the ID in the standard Vimeo URL and ACCESS_TOKEN is the token from #2.
这将返回一个包含多个视频大小的文件"键.
This will return a "files" key that includes multiple video sizes.
如果您不是 PRO 用户或试图访问其他用户上传的文件,此链接似乎可以解决问题:http://player.vimeo.com/v2/video/VIDEO_ID/config.这只适用于视频可下载的情况.
If you're not a PRO user or are attempting to access files uploaded by other users, this link seems to do the trick: http://player.vimeo.com/v2/video/VIDEO_ID/config. This only works if the video is downloadable.
这篇关于YouTube/Vimeo API - MP4 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!