locked
On demand streaming of MP4 files RRS feed

  • Question

  • 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.

    Saturday, June 27, 2015 11:36 PM

Answers

  • For #1, You don't need a live channel unless you are doing live streaming. In your case it looks like you are just uploading files so definitely you don't need live channels. However you might need streaming endpoint, but this really depends on what you want to achieve. If you want adaptive streaming and want to produce multiple protocols such as HLS, MPEG-DASH or Smooth Streaming you will need streaming endpoint which will cost you. In your case since the videos are so small and you are the one whos is accessing them occasionally, I will not recommend to use streaming endpoints. You can use direct storage access and progressive download which will work with any html5 based player even with the OS build in players. Just set the source to HTML5 <video> element. (This assumes your MP4 files are encoded with a supported video/audio codec)

    For #2, you don't need live channels, but in general all of the Azure Media components can be configured and managed using .NET or REST based APIs. You can stop/start your live channels, streaming endpoints using code. Please see https://msdn.microsoft.com/en-us/library/azure/hh973625.aspx

    For #3, yes you can use HTML5 based players with Azure Storage. You can just use media service portal and upload your video and publish it which will give you a direct storage URL or you can directly upload to storage.

    • Proposed as answer by Cenkd Wednesday, July 1, 2015 2:52 AM
    • Marked as answer by wadebee Saturday, July 4, 2015 12:21 AM
    Wednesday, July 1, 2015 2:52 AM

All replies

  • For #1, You don't need a live channel unless you are doing live streaming. In your case it looks like you are just uploading files so definitely you don't need live channels. However you might need streaming endpoint, but this really depends on what you want to achieve. If you want adaptive streaming and want to produce multiple protocols such as HLS, MPEG-DASH or Smooth Streaming you will need streaming endpoint which will cost you. In your case since the videos are so small and you are the one whos is accessing them occasionally, I will not recommend to use streaming endpoints. You can use direct storage access and progressive download which will work with any html5 based player even with the OS build in players. Just set the source to HTML5 <video> element. (This assumes your MP4 files are encoded with a supported video/audio codec)

    For #2, you don't need live channels, but in general all of the Azure Media components can be configured and managed using .NET or REST based APIs. You can stop/start your live channels, streaming endpoints using code. Please see https://msdn.microsoft.com/en-us/library/azure/hh973625.aspx

    For #3, yes you can use HTML5 based players with Azure Storage. You can just use media service portal and upload your video and publish it which will give you a direct storage URL or you can directly upload to storage.

    • Proposed as answer by Cenkd Wednesday, July 1, 2015 2:52 AM
    • Marked as answer by wadebee Saturday, July 4, 2015 12:21 AM
    Wednesday, July 1, 2015 2:52 AM
  • Thank you for covering all the questions - much appreciated!

    Wade Bee

    Saturday, July 4, 2015 12:21 AM