Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] add blob streaming instructions #159

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,8 @@ You can look at the help for analyze command to further customization.

# Deployment
## Running in Azure
The quickest way to run the tool in Azure is use the deployment scripts. See [deployment.md](deployment/deployment.md) for more instructions how to quickly run it.
The quickest way to run the tool in Azure is use the deployment scripts. See [deployment.md](deployment/deployment.md) for more instructions how to quickly run it.

# Test streaming of migrated content
One way to test streaming of migrated content is to stream directly from the migrated Azure blob storage. See [blobStreaming.md](doc/blobStreaming.md) for more instructions.

Binary file added doc/assets/enable_cors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions doc/blobStreaming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Set up streaming directly from Azure blob storage

1. Enable CORS:

From Azure portal, navigate to your migrated storage account page. You can enable CORS by scrolling down on the left bar to find the 'Resource sharing (CORS)' setting and click on it to enable CORS.

![](assets/enable_cors.png)

An example test settings is shown in the table below, but you can adjust it according to your own security preference. An useful reference to the settings is this page [azure storage services cors setting documentation](https://learn.microsoft.com/en-us/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services)

| Fields | Value |
| --- | --- |
| Allowed origins | * |
| Allowed methods | GET,PUT,OPTIONS |
| Allowed headers | * |
| Exposed headers | * |
| Max age | 5 |


2. Share blob container:

You will need to enable public access to your migrated storage account, and also share each containers that you want to stream from. You can find the instructions in the following Azure documentation [configure anonymous public read access from containers and blobs](https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-configure?tabs=portal)


3. Find the streaming url:

You can construct the list of streaming urls for your migrated assets by running

AMSMigrate.exe analyze -s <subscription> -g <resource group of media service> -n <media service account name>

and look at the output html file.

For each streamable asset, you will take the 'OutputPath' and 'ManifestName' columns to construct the DASH and HLS url. The rule is that you concatenate the OutputPath with ManifestName and then append .mpd or .m3u8 to get DASH or HLS url.

An example, if we have the following,

| OutputPath | ManifestName |
| --- | --- |
| https://test.blob.core.windows.net/ams-migration-output/asset-1234/ | fun_video |

then we will construct the following streaming urls,

| Type | Link |
| --- | --- |
| DASH:| https://test.blob.core.windows.net/ams-migration-output/asset-1234/fun_video.mpd |
| HLS: | https://test.blob.core.windows.net/ams-migration-output/asset-1234/fun_video.m3u8 |
Loading