Video Streaming from Google Cloud Storage

笑着哭i 提交于 2020-04-08 10:37:03

问题


How would we go about getting a video from google cloud storage and streaming that video to a mobile device?

I dont see anything related to videos in the Java API like there is for getting images with ImagesServiceFactory

The videos are only going to be a maximum of 10-15 seconds long if that makes any difference.

Any advice on how to proceed here would be great


回答1:


There is no difference between streaming a video and downloading any other file from the Cloud Storage. Thus, no special video API.

If the files are not public, you need a servlet that will read the content of the video from Cloud Storage and stream it to the client. Note that you cannot run it on App Engine or managed VM as they do not support file streaming and the request size is limited to 32MB.

Your best option is to run this on a Compute Engine instance:

  1. Bandwidth between Compute Engine and Cloud Storage is free.
  2. Authentication is simple.

Alternatively, you may use a signed URL for your video files. This saves you from developing/deploying a separate Compute Engine instance just for the streaming purposes - signed URLs can be returned by your existing backend.



来源:https://stackoverflow.com/questions/35949662/video-streaming-from-google-cloud-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!