Saving to Azure Blob
Introduction
This tutorial is designed to guide you through the process of saving files to Azure Blob Storage, a cloud storage service from Microsoft Azure.
By the end of this tutorial, you'll be able to set up a destination object for saving files to Azure Blob Storage, understanding the necessary parameters for configuration.
Supported Protocols
Protocol | Description |
---|---|
azblob:// | Azure Blob Storage Protocol |
1Creating a Blob Storage Container
- Log into the Azure portal and navigate to the Azure Storage Account service.
- Create a new storage account or use an existing one.
- Inside the storage account, create a new blob container.
Please see Manage blob containers using the Azure portal - Azure Storage for more details.
2Getting Your Azure Blob Credentials
- In the Azure portal, go to the storage account you want to use.
- Under "Access keys", find the 'Storage account name' and 'Key'; these are your credentials.
3Saving Output to Azure Blob
In order to save your outputs to your Azure Blob Storage, define your destination object using the following structure.
Destination Object Structure
"destination": {
"url": "azblob://endpoint/blob_container/path",
"key": "storage_account_name",
"secret": "storage_account_key"
}
Attributes of Azure Blob Destination Object
Attribute | Description |
---|---|
url | Your Azure Blob Destination URL. Includes the endpoint, blob container, and path. |
key | Your Azure Storage account name. |
secret | Your Azure Storage account key. |
secret | Your Azure Storage account key. |
URL Structure for Azure Blob
The url used for your Azure Blob Storage destination object consists of endpoint, blob container, and path if applicable. Check the examples for single file and ABR formats like HLS and DASH below:
azblob://[endpoint]/[blob_container]/[path]
When saving ABR outputs like HLS or DASH, please specify the path to a folder where the contents of the HLS or DASH stream should be located:
"destination": {
"url": "azblob://[endpoint]/[blob_container]/folder"
}
Components of URL
endpoint | Typically "core.windows.net" or any other custom domain name if set up by the client. |
blob_container | The name of your blob container in Azure Storage. |
path | Path where the file will be saved inside the blob container. |
Destination Object Example
"destination": {
"url": "azblob://core.windows.net/my-blob-container/folder/output.mp4",
"key": "myStorageAccount",
"secret": "myStorageAccountKey"
}
"destination": {
"url": "azblob://core.windows.net/my-blob-container/folder",
"key": "myStorageAccount",
"secret": "myStorageAccountKey"
}
Considerations
-
Access Control: Configure access policies in Azure to control who can access your blob storage.
-
Blob Types: Understand the different types of blobs (block, append, page) for appropriate usage.
-
Authentication Errors: Double-check your storage account name and key for accuracy.
-
Blob Container Access: Ensure the blob container exists and has the correct access level set.
-
Explore advanced Azure Blob Storage features like automated lifecycle management and hierarchical namespace.