Is it possible to encode video files on Azure Blob Storage for streaming purposes?

Jayesh Tiwari 36 Reputation points
2024-03-07T11:13:15.17+00:00

I have uploaded video files to Azure Storage, and I want to be able to stream them using the generated URL. Previously, we used Azure Media Services (AMS) for this where it used to encode the video to HLS protocol, which helps in streaming in chunks and in different qualities without wait. But since AMS will be retiring soon, I am looking for another scalable solution for efficient video streaming. Can anyone suggest an alternative solution to efficiently stream the videos without AMS?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,415 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,115 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anand Prakash Yadav 7,840 Reputation points Microsoft External Staff
    2024-03-08T10:46:49.5+00:00

    Hello Jayesh Tiwari,

    Thank you for posting your query here!

    Yes, Media services are going to retried starting from 30 June 2024. You need to migrate to a Microsoft partner solution for your on-demand encoding, live streaming, on-demand streaming, and content protection workflows and to Azure Video Indexer for your audio and video analysis workflows.

    Refer to this detailed documentation about the retirement guide of Azure Media Services and also other different Partner solutions that are available to migrate.

    You can also find a good alternative here: https://azuremarketplace.microsoft.com/de-de/marketplace/apps/3Q_GmbH.3q-video?tab=Overview

    Now coming to your question "Is it possible to encode video files on Azure Blob Storage for streaming purposes?"

    According to my search, Azure Blob service has added support using that header for video streaming a long time ago so this shouldn't be an issue today. You should be able to stream the video.

    I can stream one of my mp4 blob by creating a SAS URL and putting it in a <video> tag in an html document. From the network tab, I can see the correct Accept-Ranges header in the response and the video can be streamed with the progress bar working properly.  

    Note: I found the mp4 formatted videos will play in browser. I copied the URL from file's properties. However. MOV formatted files were not able to play. In that case, we need to convert the files as mp4.

    So, Azure Blobs does support this, you just need to enable it by setting the default version of the service to a newer one. https://learn.microsoft.com/en-us/rest/api/storageservices/Versioning-for-the-Azure-Storage-Services

    Suppose the Accept-Ranges is not enabled, from this blog I got it needs to set the default version of the service.

    So, updating the Azure blob storage API version should help.

    List of available versions: https://learn.microsoft.com/en-us/rest/api/storageservices/previous-azure-storage-service-versions.

    Just run:

    az storage account blob-service-properties update --default-service-version 2023-08-03 -n yourStorageAccountName -g yourStorageResourceGroupName
    

    Here is a similar thread that I answered which might help you: How come my videos hosted on Azure Storage Blobs don't allow me to scrub the video while streaming? - Microsoft Q&A

    I hope this helps! Please let me know if you have any other questions or need further clarification.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Amrinder Singh 5,790 Reputation points Microsoft Employee
    2024-03-07T12:05:02.16+00:00

    Hi @Jayesh Tiwari - Thanks for reaching out.

    You can try updating the default version of your Storage GPv2 account to anything higher than or equal to 2014-02-14, and then try seeking or streaming the videos. You can test this in your testing environment and see if this approach helps out.

    Kindly let me know if you have any further queries. I’m happy to assist you further. Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.