What is the best way of hosting a video on Azure? - azure

To clarify: I have a website hosted in Azure. I want to add a 1.5 minute howto video. I can't imagine it will get shown more than a few tens or hundreds a month (maybe a few thousand if the site takes off).
I was planning on using Azure Media Player to play the video.
In relation to this I thought the video would sit in a streaming endpoint.
But this seems an expensive way of doing this. Are there better ways (especially cheaper)?
EDIT: is it possible to host the video elsewhere and have it embedded in Azure?

The cheap way to do this would be to place the video in a blob storage then play it using a web page.
There is a video explaining how to do this here: https://www.youtube.com/watch?v=qmzns7PgP0A

I would recommended to use Media Service: video-on-demand, content delivery service with an Azure Media Services application in the Azure portal.
Azure Media Services lets you deliver any media, on virtually any device, to anywhere in the world using the cloud. The collection of services provide encoding, live or on-demand streaming, content protection and indexing for video and audio content.
The Windows Azure Media Services platform has four types of services: content uploading, encoding, encrypting content and streaming.
Media Service Pricing: https://azure.microsoft.com/en-in/pricing/details/media-services/
Additional information : Streaming Videos from Azure ( Blob or Media Services)

Related

Azure Media Services - creating a small video player

If I was to use Azure Media Services to consume encoding of small video files and then playing back on a web app and mobile app, do i need to turn on the 'Streaming Endpoint' option? I am getting charged ~$65 a month just to have streaming endpoint, not sure if i need it.
The pricing doesn't quite make sense because I can get the same basic features from Vimeo for $7 a month.
Am I consuming this correctly?
If I was to use Azure Media Services to consume encoding of small video files and then playing back on a web app and mobile app, do i need to turn on the 'Streaming Endpoint' option?
Yes, the official documentation explains that a streaming endpoint is the service that delivers content directly to the client application for live-streaming, video on demand, or progressive download.
So this means that you would need at least one streaming endpoint to be able to serve your videos to a client. A Media Services account already includes a default standard streaming endpoint. According to the documentation, this default streaming endpoint would be enough for the vast majority of workloads.
Take a look at the pricing page for more info: https://azure.microsoft.com/en-us/pricing/details/media-services/
According to the pricing page, the default streaming endpoint does cost ~$65/mo.
In regards to your comparison with Vimeo, the service that you end up using really depends on your particular case. While I understand pricing is a big factor when building an application, you should still consider the security of your videos at rest and in transit, scalability, availability of services, support, etc.

Microsoft Azure cdn vs media streaming services

So, I'm working on an application where admins will be able to upload videos, for others to view on different platforms (mobile devices, computers etc). It is to be hosted on Azure, and I'm having a bit difficulty figuring out if I need to use Media services or simply a CDN.
When does it make sense to use the Media services over simply uploading to a blob and viewing through CDN? What are the advantages of using one over another?
Microsoft Azure CDN pulls content from Azure Media Services streaming server, so you could stream your content from the edge. You don't have to use a CDN if you don't need to deliver content in a large scale at a time. Rather, you could directly streaming content from streaming server offered by Azure Media Services.
The reason you maybe confused is because there are CDN vendors in the market (such as Akamai) offers streaming server capability. But by CDN itself, the edge network was just for caching the bits, not acting like a streaming server.
Cheers,
Mingfei Yan

On-demand viewing of MP4 files from Azure Storage with Azure Media Player

I am working on a school project and using my MSDN subscription for Azure access. I have written a program that uploads MP4 recordings (video surveillance) from a private network to Azure storage on a scheduled basis.
I want to be able to view these MP4 files using the Azure Media Player. I will be the only one using this stream and it would only be on a very infrequent basis (while away on vacation). I played around with the Azure Media Services a bit and it seemed like the only way I could get an "endpoint" for the media player was to open a live streaming channel. Once I did that it gave me an endpoint which I put in the player and it played my video as expected. I turned in my project proposal to my professor based on this prototype and got it approved as my semester project (40% of my grade).
To my surprise two days later I got an email alert saying that my Azure account had shut down automatically due to my exceeding the $50/mth allocation. I was surprised since the files I uploaded amounted to only 5MB and I only downloaded them twice during my proof of concept work.
While reviewing my billing details it appears all these charges came from the media services channel and it appears to based on the time the channel is "alive". 43 hours of this pretty much ate up my whole allotment for the month.
Here are my questions (keeping in mind I am a decent C# developer but completely green about all things Azure):
1) Am I going about this the right way? Do I need a live streaming channel to use the Azure Media Player?
2) If yes to the above, is there a way I can start/stop the live streaming service from code? In this way could I send a command to Azure to wake up the channel when viewing is needed then shut down when complete?
3) Is there some other html5 based media player I could use against Azure file storage so I bypass the live streaming channel and associated costs?
Thanks for any help. When I called Microsoft support all they could do was explain the billing to me and steered me here for technical support.
Based on your project descriptions you already have files encoded to mp4 and uploaded to Azure Media Services.
You don't need to create streaming endpoint and start live channel to playback your files. You need instruct system to generate playback url which will accesible for you during defined period of time and use this url in player.
Example of code:
IAsset asset =_mediaContext.Assets.Where(c=>c.Name="Your MP4 Asset").First();
IAccessPolicy accessPolicy = _mediaContext.AccessPolicies.Create("Read15Min", TimeSpan.FromMinutes(15), AccessPermissions.Read);
ILocator locator = _mediaContext.Locators.CreateLocator("ReadOnlyLocator", LocatorType.Sas, asset, accessPolicy, startTime: null);
var uribuilder = new UriBuilder(locator.Path);
uribuilder.Path += "/" + asset.AssetFiles.First().Name;
var fileUri = uribuilder.ToString();
To test if it is actually working simply go to http://aka.ms/azuremediaplayer and paste value of fileUri to Url input textbox.
If you serious about security i would recommend to read about Content Protection in Azure Media Services and dynamically encrypt content to use token authentication. In my blog post I showed how you can integrate Azure AD authentication in your ASP.NET MVC app with Azure Media Services to protect your content.
You can point your Azure Media Player directly towards the mp4 file's "Absolute URI" found when marking the file and clicking "Edit" at the bottom.

Azure Media Services or simple Storage Account for video storage for STA

We are developing a "multi tenant application" (MTA) on AZURE. In addition we develop "single tenant applications" (STA) for customers that utilise MTA data via a REST API end point i.e so the STA can be hosted anywhere.
A specific STA uploads and stores video files. Security for these video files is important and 1xVideo 1xConcurrentUser most likely consumption use case. It not clear at this stage the user will consume the content by streaming or download.
QUESTIONS
Using Azure MEDIA SERVICES account/keys its easy to upload , store and download media content. What are the benefits of using MEDIA SERVICES over a standard Azure STORAGE ACCOUNT ? ? I understand MEDIA SERVICES use a STORAGE ACCOUNT.
Does isolating a STA into a new Azure subscription makes sense to isolate video related costs categorically ? the itemised bill contains 6000+ rows. Difficult to extract the relevant data for an STA each month. In theory a STA customer could in future take control of this account management and costs.
Is there a max number of CONTAINERS that can be added to a STORAGE ACCOUNT ?
Should the CONTAINER be of type PRIVATE to secure the content but still allow access for the STA?
Thank you
Scott,
Media Services is good if you're looking to accept incoming video and process it to serve in other formats or to leverage streaming media playback. Serving video directly out of an Azure Blob Storage Account is possible but it will not provide smooth streaming or transcoding (no streaming playback may mean stop / start of video for users with high latency connections).
I would advise against putting each STA into their own subscription. While it will give you a degree of control over the management of charging back usage to the STA user it will be a big overhead to manage. Your best bet would be to use an appropriate storage account / container setup to allow you track calls some other way and provide estimated costs. Don't forget that Azure is always changing and it may be that future features give you the ability to tag and track costs inside a subscription more effectively.
There is no limit on number of containers in a storage account. The limits are 50 storage accounts per subscription and a maximum of 500TB of storage per account. Storage and Subscription Limits are documented here: http://azure.microsoft.com/en-us/documentation/articles/azure-subscription-service-limits/#storagelimits
You can use Shared Access Signatures to control access to Blobs in Azure Blob Storage. See here for how to create and use them: http://msdn.microsoft.com/en-us/library/azure/jj721951.aspx and here for guidance on setting permissions on Blob Storage containers: http://msdn.microsoft.com/en-us/library/azure/ee393343.aspx
HTH
Simon.
I will try to answer the first question:
Using Azure MEDIA SERVICES account/keys its easy to upload , store and download media content. What are the benefits of using MEDIA SERVICES over a standard Azure STORAGE ACCOUNT ? ? I understand MEDIA SERVICES use a STORAGE ACCOUNT.
Answer: Azure Media Services origin server is the IIS media service in the cloud. All video contents are stored in Azure Blob storage and there is a mapping between the media service and storage. There are many advantages of using media server rather than directly downloading from storage: (1) Media server has the intelligent to forward the right data fragment(right bitrate, time stamp) to your client efficiently. (2) our origin server dynamically package multiple bitrate MP4 from storage account into multiple streaming format (HLS, Smooth streaming and MPEGDASH), which get to played on various devices and platform. Hence, you save on the cost for encoding your video into multiple formats. (3) Our origin server supports live streaming.
I think this question goes into why we invent media server. I have a blog explains how video streaming works for your reference: http://mingfeiy.com/adaptive-streaming-video-streaming.

Streaming audio/video from browser to Microsoft Azure

I have to make some kind of service, where people can record a video/an audio from the browser and watch/listen it later.
Is there any way to capture audio/video from the browser and instantly upload it to Microsoft Azure cloud service, that would be work on mobile devices too?
I've found how to upload existing video with C# or Java, but I need to stream it to Azure or in an extreme case somehow save it to the my server and upload it with C#/Java to Azure.
I would be grateful for any idea!

Resources