azure media service v3 upload from https url RRS feed

  • Question

  • does anyone know how we can upload to azure media service asset from a url without encoding? the video stored on s3 amazon is in mp4 format and I don't need to encode it (it takes time), but I need to upload it to my azure media service and make it public for streaming on client side video players. I use asp.net and azure media service sdk.
    Wednesday, April 15, 2020 11:11 PM

All replies

  • There are a couple ways to get the content from S3 to Azure blob. The AzCopy tool can copy content from S3 to an Azure Blob, or you could also just use the Azure Storage client SDK to copy the blob from S3. 

    AzCopy - https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-s3

    You would need to first use the AMS v3 API to create an empty Asset.
    This operation creates a container in the storage account associated with your Media Services account. The API for create Asset returns the container name (for example, "container": "asset-b8d8b68a-2d7f-4d8c-81bb-8c7bbbe67ee4").

    You can upload directly to that container, or you can get a SAS URL to use with AzCopy or the storage SDK to copy the asset. 

    You can use the Media Services API to list the asset container URLs.

    AssetContainerSas.listContainerSas takes a ListContainerSasInput parameter on which you set expiryTime. The time should be set to < 24 hours.

    The asset must be an MP4 file that uses H264 video and AAC audio and is encoded as closed GOP with 2-6 second GOPs to be viable for streaming. To optimize for streaming, you should run a custom encoding job that just uses the CopyVideo and CopyAudio settings for the encoder to generate a new MP4 file with a streaming manifest (.ism file) generated to improve the performance on the Streaming server. That file has the index information that the streaming origin server needs. 


    Once you publish the asset and get the Streaming Locator URL - you can test that it works by requesting the HLS or DASH manifest. If the server responds with a valid manifest you are good to go. 

    Thursday, April 16, 2020 12:49 AM
  • Hi,

    Please let us know if the above recommendation worked for you. If you need further assistance please reply here.

    Monday, April 20, 2020 3:22 AM