Best way to upload medium sized videos to azure blob storage? - azure

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

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.

Related

Upload video to Blob Storage using Azure Function

In my app I would like my users to upload local videos, which I would want to store in the Blob Storage. But I would like to achieve this by using the Azure Functions. Is this possible? If so, I couldn't find any resource that could point me in the right direction. If not what would be the ideal way to achieve this. I am building the app using flutter, for which we do not yet have the SDK's. Any help is appreciated.
There's no SDK available for Dart. You'll have to make a back-end part running in .NET, Java, JavaScript or Python in order to use Azure Functions.
But you can use the Azure Storage REST API to store the videos as blobs using a Storage Account.
Take a look at the official reference here. Using this, you'll be able to store the videos using Http.
Also, this tutorial might be useful.
The fella here is using the File Service instead the Blob Service.
A point of interest is that you have to be in mind some limitations, not that it's impossible to do what you want to, but is good to be aware:
There are limitations to the storage service.
[...] You can only upload 4mb “chunks” per upload. So if your
files exeed 4mb you have to split them into parts. If you are a good
programmer you can make use of tasks and await to start multiple
threads. Please consult the Azure limits documentation to see if any
other restrictions apply.

Blob Storage vs Azure Media Services

I'm using blob storage to serve uploaded user posted videos in a xamarin application, but the performance is terrible. Can Azure media services serve these videos with good performance?
Try one of our quick starts for encoding and streaming and see if you get better performance for your scenario.
https://learn.microsoft.com/en-us/azure/media-services/latest/
There are some threads on using adaptive streaming in Xamarin as well.

Azure Blob Storage Videos

I'm creating a xamarin forms app with Azure and I want it to use large images and videos.
I already know how to make it work with images (Blob Storage and Azure functions) but I have no idea with videos.
I mean if an user upload a 4K video into my blob storage, it has to be compressed (probably before being send to the blob storage). I don't know where to start - I've seen Blob storage encoding, Media services and CDN but I don't know if it's the right path. Can someone enlighten me on that matter?

Cut videos from Azure Blob Storage

I have a web app that is hosted in Azure; one of it's functionalities is to be able to make a few cuts from the video(generate 2 or 3 small videos of 5-10 seconds from a larger video).
The videos are persisted in Azure Blob Storage.
How do you suggest to accomplish this in the Azure environment?
The actual cutting of the videos will be initiated by a web job. I'm also concerned about the pricing(within the Azure environment), I'm taking into account the possibility of high traffic.
Any feedback is appreciated.
Thank you.
Assuming you have video-cutting code that operates on files through normal I/O: You'd need to download the video file from blob, process it via code (or whatever library you've employed), and then store the result back in blob storage. You cannot reference a blob directly with normal standard IO libraries.
If, however, videos are stored in Azure File storage (which is an SMB layer on top of blob storage, then you will be able to directly manipulate your video files.
Web Jobs run within an App Service (just like Web Apps), so you have access to a certain amount of local disk space (depending on App Service tier) for use. You should have no problem temporarily storing a video file within your web app's disk space, for editing operations.
You asked about cost: Again, assuming you're talking about running code within a Web Job (app service), you're just paying for whatever App Service tier you've chosen.
How you actually do those edit operations is entirely up to you (language, library, etc).
Azure Blob Storage is simply an object store which stores the data. It does not have the capability you're looking for.
Azure Media Service however is the service you should look into. The media served by this service makes use of Azure Blob Storage.
For editing video, may I suggest you take a look at Video Editor Plugin for Azure Media Player. You can read more about this plugin here: https://azure.microsoft.com/en-in/blog/video-editor-plugin/. You can also try it out here: http://ampdemo.azureedge.net/amp_editor.html.

Azure media service vs regular file storage for processing videos

What should I use from Azure for an application where I am uploading videos and I want to process videos to obtain information with my own worker roles but I dont want to stream the videos. Should I use Media service or regular blob storage?
#Devsined, per my experience, my suggestion is that uploading & processing videos to & from blob storage is the better choice to obtain information. Even I think, if having Azure App services consideration, you can upload videos into queue storage first, then to store into blob storage, and using webjobs to handle the vedio from queue and record the obtained inforamtion to Azure Database.
Any concern, please feel free to let me know.

Resources