Unable to stream MP4 uploaded with azure media service v3 - .Net RRS feed

  • Question

  • I have uploaded MP4 file through .Net and i had tried to encrypt and stream the same,

    my streaming https://ampdemo.azureedge.net/?url=https://ganevickyservice-inso.streaming.media.azure.net/051fb784-9c4e-4c4c-8d14-47debe4ea8c0/TP_Final_Old.ism/manifest(format=mpd-time-csf,encryption=cenc)&playready=true&playreadytoken=Bearer%3DeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cm46bWljcm9zb2Z0OmF6dXJlOm1lZGlhc2VydmljZXM6Y29udGVudGtleWlkZW50aWZpZXIiOiIzZjkyODZiNy1iNjIzLTRkOWUtOTQ4ZS1iNzAzZGQ1MjkxNjYiLCJuYmYiOjE1NDAyODY2MTgsImV4cCI6MTU0MDI4NzgxOCwiaXNzIjoiaHR0cHM6Ly9zdHMuZ2FuZXZpY2t5c2VydmljZS5jb20iLCJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8ifQ.fUUs1IXTKfIBFk3jEiweeyH2durlzGmrXcXyTBeqsIc

    I am getting exception

    user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36
    14:59:03.606 | amp: error code: 0x10600002, currentTime: 0

    Why am i getting this exception? how to stream the video with encryption

    Download the uploaded file

    I also want to download the uploaded file using azure media service v3 (not getting any tutorial)

    please help out on these things, thanks in advance.
    • Edited by VickyS1993 Tuesday, October 23, 2018 9:44 AM
    Tuesday, October 23, 2018 9:28 AM

All replies

  • Your token was only valid between Tue, 23 Oct 2018 09:23:38 GMT and Tue, 23 Oct 2018 09:43:38 GMT.  If the request was made outside of that time then the token would not be valid and the PlayReady DRM would not be decrypted.

    However, that error indicates that there is a possible mismatch between the DRM type and the browser / plugin you're using.  Make sure the browser you are using is able to play the type of DRM you're using as per http://amp.azure.net/libs/amp/latest/docs/index.html#compatibility-matrix

    Tuesday, October 23, 2018 4:25 PM
  • Also to answer the download question - 

    You can download the video from your own storage account. When you created your Media Services account, you also created an Azure Storage account attached to it.  The Asset in Media Services is just a container (folder) in the Azure Storage account.  You can either download the file directly from that container using the Storage client SDKs, Azure Portal, or you can also get a progressive download SAS URL from the AMS account by creating a Streaming Locator without any DRM protection on it.  

    You can use one of our "Built-in" predefined Streaming Polices to get that. For example, on the REST API, you can call Create on a StreamingLocator, and pass in the following body with the pre-defined "clearStreamingPolicy" and your assetName.  

      "properties": {
        "StreamingPolicyName": "clearStreamingPolicy",
        "AssetName": "myOutputAsset"

    After creating the locator, you can then call /listpaths on the Locator to get the download paths and streaming paths.

    If you want to customize your policy, you can first create a "Clear" streaming policy with No Encryption on it, and set the enabled protocol for "download" to true, and turn on or off other protocols if you do not wish to allow them.

    The Streaming Policy body would look like this in the v3 Rest API body create call. 
    Link to Docs on StreamingPolicies/Create

      "properties": {
        "noEncryption": {
          "enabledProtocols": {
            "download": true,
            "dash": true,
            "hls": true,
            "smoothStreaming": true

    Wednesday, October 24, 2018 3:07 AM
  • I had even tried uploading and played when my token is alive

    URL: https://ampdemo.azureedge.net/?url=https://ganevickyservice-inso.streaming.media.azure.net/9d817209-ef9f-47c3-9c62-deab0d965746/2018-07-17%2011.30%20Meet%20Now.ism/manifest(format=mpd-time-csf,encryption=cenc)&playready=true&playreadytoken=Bearer%3DeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cm46bWljcm9zb2Z0OmF6dXJlOm1lZGlhc2VydmljZXM6Y29udGVudGtleWlkZW50aWZpZXIiOiJmMzFlYjZlNC0wNWExLTQyMTItYTNlNC1hYTVkZWM2YmQ5MTUiLCJuYmYiOjE1NDAzNzE1NTEsImV4cCI6MTU0MDM3Mjc1MSwiaXNzIjoiaHR0cHM6Ly9zdHMuZ2FuZXZpY2t5c2VydmljZS5jb20iLCJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8ifQ.k0A2DO0Oiwp1cZ-zEiUIjKiRdxTbQsFGlZ9tTdTPzXk
    Error Msg: 14:36:47.686 | amp: error code: 0x10600002, currentTime: 0

    It played for the first time when <g class="gr_ gr_10 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="10" id="10">i</g> try to stream with AES Encryption but failed after that. even <g class="gr_ gr_11 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="11" id="11">i</g> try to upload and stream to ensure my token is alive but facing error as well

    Followed: media-services-v3-dotnet-tutorials/AMSV3Tutorials/EncryptWithAES/Program.cs

    Url: https://ampdemo.azureedge.net/?url=https://ganevickyservice-inso.streaming.media.azure.net/54bce6b1-9c19-4156-b7f5-08b4fba459e8/2018-07-17%2011.30%20Meet%20Now.ism/manifest(format=mpd-time-csf,encryption=cbc)&aes=true&aestoken=Bearer%3DeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cm46bWljcm9zb2Z0OmF6dXJlOm1lZGlhc2VydmljZXM6Y29udGVudGtleWlkZW50aWZpZXIiOiIyNTIzMWMxYi05MWQ3LTQxOWMtYmJmOC00NzQ1MzkwZGJlNTIiLCJuYmYiOjE1NDAzNzA1NzIsImV4cCI6MTU0MDM3MTc3MiwiaXNzIjoiaHR0cHM6Ly9zdHMuZ2FuZXZpY2t5c2VydmljZS5jb20iLCJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8ifQ.nGVwChN7fNQSk67JZz8nElNZsZk1F-ZztIEsgNZJsRI
    Error msg: 14:41:27.832 | amp: error code: 0x20500004 msg: Http: 0x00200191, currentTime: 0
    • Edited by VickyS1993 Wednesday, October 24, 2018 9:22 AM
    Wednesday, October 24, 2018 9:22 AM