【问题标题】:Best way to upload medium sized videos to azure blob storage?Best way to upload medium sized videos to azure blob storage?
【发布时间】:2022-12-27 14:32:51
【问题描述】:
I am currently on a student plan for azure (gotta stay finessing as a college student lol) and am looking for the best way to upload videos to azure blob storage. Currently, I am using an azure function api to upload the video, but I am encountering a "Javascript heap out of memory" error when I try and multiparts parse big video files.
Ideally, I'd be able to quickly upload 3.5 minute music videos from mobile and desktop to azure blob storage with this method.
Either a better way of uploading videos to blob storage from my front-end or a solution for the javascript heap out of memory error would be amazing help.
Here's the link to that other post, if you are curious: How to fix JavaScript heap out of memory on multipart.Parse() for azure function api
【问题讨论】:
标签:
azure
video
file-upload
azure-functions
azure-blob-storage
【解决方案1】:
Approaches:
-
After a workaround based on your issue, I would suggest that you use Azure Media Services.
-
Media Services can be integrated with Azure CDN. Refer to check Media Services-Managing streaming endpoints.
All supported formats use HTTP to transport data and benefit from HTTP caching. In live streaming, actual video/audio data is separated into fragments, which are cached in CDNs.
-
To start, I recommend that you use the Azure Storage SDK with Node.JS. The SDK will handle everything for you. Attaching few uploaders below to check accordingly.
Upload a video to Azure Blob examples
-
Refer MSDoc & SO thread by @Gopi for uploading a video with the .mp4 extension to Azure blob storage using C#.
-
You can upload a video using Azure functions directly. But to use Azure Functions, you must create a back-end component written in.NET, Java, JavaScript, or Python.
-
You can use the"Azure Storage Rest API"to upload files/video files using a storage account, like you mentioned. You will be able to get the desired result by using this Azure Storage Rest -API-MSDoc.