简体   繁体   English

如何从云存储中获取文件并作为本地文件处理而无需下载?

[英]How to get file from cloud storage and process as local file without downloading?

I am working on a project where I have to extract frames from a video by using ffmpeg (node.js). 我正在一个项目中,我必须使用ffmpeg(node.js)从视频中提取帧。 I first upload video to firebase storage from my client, and then I want to process it in the backend server. 我先从客户端将视频上传到Firebase存储,然后再在后端服务器中对其进行处理。 However, ffmpeg only accept file as if it is stored locally. 但是,ffmpeg仅接受文件,就好像文件存储在本地一样。

const ff =new ffmpeg('C:/Users/alexh/Desktop/alex/name.avi');

It will not work with url. 不适用于url。 I am wondering is any way I can get file from url as if it is stored locally or firebase can provide me a way to get the file? 我想知道有什么办法可以从url获取文件,就像它存储在本地还是firebase可以为我提供一种获取文件的方法吗? I don't want to use filebase trigger event because I want to send http request to backend server. 我不想使用文件触发事件,因为我想将HTTP请求发送到后端服务器。

Thank you so much 非常感谢

如果您是在Linux或OS X上运行的,则可以使用GCS Fuse将存储桶安装到文件系统上,然后直接将FFmpeg指向它。

The fluent-ffmpeg package supports operating on readable streams instead of just files. fluent-ffmpeg软件包支持对可读流进行操作,而不仅仅是文件。 The GCS Client library supports creating a readable stream for a GCS object . GCS客户端库支持为GCS对象创建可读流 By combining these you can has ffmpeg operate directly from GCS. 通过组合这些,可以使ffmpeg直接从GCS运行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用http cloud云功能从Firebase云存储下载文件时,没有此类文件或目录 - no such file or directory when downloading a file from firebase cloud storage using http cloud cloud functions 将远程映像文件下载到本地文件存储 - Downloading a remote image file to local file storage 将API文件下载到Firebase Cloud Storage? - Downloading an API file to Firebase Cloud Storage? 如何使用nodejs从谷歌云存储获取链接文件 - how to get link file from google cloud storage use nodejs 无法将文件从云存储下载到云功能临时存储以读取和处理CSV导入 - Can't Download File From Cloud Storage to Cloud Function Temporary Storage to Read and Process CSV Import 如何从谷歌云存储下载文件? - How to download file from Google Cloud Storage? APP Engine Google Cloud Storage - 下载文件时出现错误 500 - APP Engine Google Cloud Storage - Error 500 when downloading a file 从云功能中删除云存储中的文件 - Delete file in cloud storage from cloud functions 从谷歌云存储下载 excel 文件返回一个缓冲区,我怎样才能返回实际的 excel 文件,以便我可以在我的处理程序中写入它? - Downloading excel file from Google Cloud storage returns a buffer, how can I return the actual excel file so I can write to it in my handler? 如何从 nodeJS 中的 URL 获取文件,构建 zip 文件和 pipe 到云存储桶 - How to get files from URLs in nodeJS, build a zip file and pipe to cloud storage bucket
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM