Question

I am in the middle of developing services that will deal with media files (audio/video) . These services are responsible for uploading and then streaming media files uploaded by client (IOS, Android but not limited to these devices/platforms).

We are using node.js with mongodb as database. In the near future our services will be part of Azure. (Portions of our backend are already there in Azure)

In that case i came across Azure media services. I know that it does't have any sdk to work with for Node.js so my only option here is to use REST Service from Azure Media Services.

My question are:

1) Whats the correct approach adapted in this scenario by developers already handling this scenario. I am open for approaches/practices here and change what i am planning to do currently.

2)If i use Azure Media Services. How would my client calls my services (node.js) which acts as a proxy for calling REST Services for Azure Media Services. How will this exactly work and i have file in hand in my proxy to re-upload. Or i will internally direct my services so that internally it uploads to Media Services .

3)How these media files uploaded in media services are related to a record in MongoDB. Like a record can have multiple media files.

I appreciate any pointers/explanations here.

Thanks,

Was it helpful?

Solution

To proper answer your question there are few questions need to be answered.

1.What functionality are you going to provide on top of azure media services. From your question it seems that main goal to let users to upload asset and them to have ability to stream uploaded content.

For this purpose you need to have following steps to be implemented in node js.

Assets are exposing ID and AlternativeID properties which you can use to map your metadata about content with WAMS assets and implement any additional Content Management logic.

You need to act as proxy if you have some user based authentication and don't want to have dedicate separate azure media account to one user. WAMS provides basic blocks for asset ingest, encode, package, ondemand delivery and in nearest future for live streaming.

It can be used as foundation for your cms system or you can act SSAS provider by adding additional authentication, authorization layer. Currently you can use third party offerings http://www.ezdrm.com/ for playback DRM protection or your own license server http://msdn.microsoft.com/en-us/library/windowsazure/dn223278.aspx.

OTHER TIPS

I have a small solution but I think it will require some work from you, maybe you wont like it that much, how about working with Windows Azure Mobile services. it support adding NPM now, the reason that I am telling you to use the Windows Azure Mobile services is that it will help you connect to your clients whatever was the application platform used.

http://weblogs.asp.net/scottgu/archive/2013/06/14/windows-azure-major-updates-for-mobile-backend-development.aspx

to integrate between the .Net and Node Js you can start by using Edge JS or signalR I think. http://www.infoq.com/articles/the_edge_of_net_and_node http://www.asp.net/signalr

I just want to suggest an idea that might be helpful to work around the lack of support of Media services in Node Js is that you use Blob storage for streaming. after all the Media Services is based on the Blob storage I think. here is a link that will guide you with the usage of the blob storage.

http://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/blob-storage/

here is also a question posted before about how to stream from blob storage using Node JS I hope you find it beneficial.

How to stream a Windows Azure Blob to the client using Node.js? Getting contents of a streaming Blob to be sent to a Node.js Server

here is also another link that will help you to do so "Geo-Protection for Video Blobs Using a Node.js Media Proxy" http://msdn.microsoft.com/en-us/magazine/dn198240.aspx

Just wanted to make sure that you got the Windows Azure Node Js SDK, you might find some solutions that can help you with the development of you application. https://github.com/WindowsAzure/azure-sdk-for-node

I hope my answer helps you let me know if you need anything else.

I have more recent Typescript based samples now for AMS v3 API using our latest javascript Node.js SDK here https://github.com/Azure-Samples/media-services-v3-node-tutorials

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top