gpt4 book ai didi

javascript - Google Drive API——直接下载不同格式的视频

转载 作者:行者123 更新时间:2023-12-01 15:28:19 25 4
gpt4 key购买 nike

众所周知,通过简单地检索可以直接下载任何文件(任何大小)(甚至将视频嵌入网站等)的 Google API key ,问题是:当在形式:

https://www.googleapis.com/drive/v3/files/### fileId ###?alt=media&key=### API key ### inserting the file ID and API key in place.



如果我想嵌入一个已经是 .mp4 格式的视频,这可以工作,但如果我想将一个 .mpg 视频嵌入到 HTML 网站:默认情况下,.mpg 格式是不可嵌入的,但它知道Google Drive 会自动将其所有视频文件转换为可在浏览器中播放的各种格式,因此:

如何访问 Google Drive 中视频的不同视频格式?最好,我正在寻找一种编程方式来获取它(如 Node.js 或 PHP)。

最佳答案

您需要集成您的 Google DriveCloud Convert (这是一项手工作业)
https://zapier.com/apps/cloudconvert/integrations/google-drive

或者

您可以使用Integromat为你做(它带有各种自动化脚本)
https://www.integromat.com/en/integrations/cloudconvert/google-drive

完成后 - 您可以使用 nodejs、php、python、angular 等使用 Cloud Convert 的 API。
https://cloudconvert.com/api/v1/
(免费计划支持每个 session 最大 1GB 文件转换)

最重要的 - API 具有 Google Cloud 集成
https://cloudconvert.com/api/v1/googlecloud

转换器:
php的云转换
https://github.com/cloudconvert/cloudconvert-php

用于 nodejs 的云转换
https://github.com/cloudconvert/cloudconvert-node

希望这对你来说是一个很好的起点..

关于javascript - Google Drive API——直接下载不同格式的视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54994926/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com