Is there any way I can use same container for all the Assets I create in Azure Media Service instead of getting new container on each asset creation ?

Akash Kadia 41 Reputation points
2021-08-25T13:44:20.15+00:00

I am processing video in azure media service for streaming option from blob container of same storage account by passing blob url. But when ever i process any video with new asset a new container is added under Blob containers and I need to do this for large number of videos on daily basis. So is there a way to use single container for all asset generate in media service OR is there any other option I can directly stream blob video without using media service ? Also when ever I encode video using "StandardEncoderPreset" it generates files for 5-6 different resolutions for various screen size. is there way to generate only a single file with one mentioned resolution ?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,194 questions
Community Center | Not monitored
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Xavier Pouyat 591 Reputation points Microsoft Employee
    2021-08-26T08:52:30.98+00:00

    Having a single container for all output assets is technically possible, but I would not recommend it if you plan to stream your content from Azure Media Services (for performance reasons). Can you explain why you want to put all encoded files in a single container ? If your goal is to simplify the download of the encoded files, then I think you can do it. You have to make sure that each source file has a unique file name so the output files are unique too. I just did a test, a drawback is the fact that files like Thumbnail000001.jpg may be overwritten by the last encoding job. To use the same output asset / container for each encoding job, you can pass the same output asset to each job. The API supports it. But again, please explain why you want a single container.

    With AMSE, here is the result with two encoding jobs :
    126722-2021-08-26-10h40-24.png

    Regarding a preset that generates a single stream and auto adapt, I think it will be possible in the near future. It will be possible to to customize the Content Aware Encoding preset. See https://github.com/Azure-Samples/media-services-v3-dotnet/issues/41

    1 person found this answer helpful.

  2. Xavier Pouyat 591 Reputation points Microsoft Employee
    2021-08-25T14:32:43.26+00:00

    Azure Media Services require a storage container per asset. Please note that you can control the name of this container if you wish.
    If you don't want to create a source asset, it is possible to pass a https URL as a source for an encoding job. So you can put all your source files in the same container, at least.

    If you want to generate only one bitrate, you can use a built-in preset like "H264SingleBitrate1080p", "H264SingleBitrate720p" or "H264SingleBitrateSD" in the transform, or create your own preset too.

    built-in presets : https://learn.microsoft.com/en-us/rest/api/media/transforms/create-or-update#encodernamedpreset

    Creating a custom preset : https://learn.microsoft.com/en-us/azure/media-services/latest/transform-custom-preset-cli-how-to


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.