简体   繁体   中英

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). I first upload video to firebase storage from my client, and then I want to process it in the backend server. However, ffmpeg only accept file as if it is stored locally.

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

It will not work with 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? I don't want to use filebase trigger event because I want to send http request to backend server.

Thank you so much

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

The fluent-ffmpeg package supports operating on readable streams instead of just files. The GCS Client library supports creating a readable stream for a GCS object . By combining these you can has ffmpeg operate directly from GCS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM