Skip to content

Commit c820b3a

Browse files
authored
Merge pull request #107206 from Juliako/v2vsv3
split an article
2 parents f4169fe + dd95d9d commit c820b3a

File tree

6 files changed

+161
-119
lines changed

6 files changed

+161
-119
lines changed

articles/media-services/latest/TOC.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,14 @@
199199
- name: Streaming
200200
displayName: failover, bcdr, HA, high availability
201201
href: media-services-high-availability-streaming.md
202-
- name: Migration guidance from v2 to v3
203-
href: migrate-from-v2-to-v3.md
204-
displayName: naming
202+
- name: Migration from v2 to v3
203+
items:
204+
- name: v2 vs v3
205+
displayName: migrate, v2 to v3
206+
href: media-services-v2-vs-v3.md
207+
- name: Migration guidance
208+
href: migrate-from-v2-to-v3.md
209+
displayName: naming
205210
- name: How-to guides
206211
items:
207212
- name: Get started
@@ -340,7 +345,6 @@
340345
href: live-event-error-codes.md
341346
- name: Job error codes
342347
href: job-error-codes.md
343-
- name: Resources
344348
- name: Reference
345349
items:
346350
- name: OpenAPI Specification (Swagger)
@@ -364,6 +368,7 @@
364368
href: https://aka.ms/ams-v3-go-ref
365369
- name: Resource Manager template
366370
href: /azure/templates/microsoft.media/allversions
371+
- name: Resources
367372
items:
368373
- name: Azure Media Services community
369374
displayName: forums, twitter, feedback

articles/media-services/latest/assets-concept.md

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ editor: ''
1212
ms.service: media-services
1313
ms.workload:
1414
ms.topic: article
15-
ms.date: 08/29/2019
15+
ms.date: 03/09/2020
1616
ms.author: juliako
1717
ms.custom: seodec18
1818

1919
---
2020

21-
# Assets in Azure Media Services
21+
# Assets in Azure Media Services v3
2222

2323
In Azure Media Services, an [Asset](https://docs.microsoft.com/rest/api/media/assets) is a core concept. It is where you input media (for example, through upload or live ingest), output media (from a job output), and publish media from (for streaming).
2424

@@ -38,37 +38,6 @@ Asset's names must be unique. Media Services v3 resource names (for example, Ass
3838

3939
The names of files/blobs within an asset must follow both the [blob name requirements](https://docs.microsoft.com/rest/api/storageservices/Naming-and-Referencing-Containers--Blobs--and-Metadata) and the [NTFS name requirements](https://docs.microsoft.com/windows/win32/fileio/naming-a-file). The reason for these requirements is the files can get copied from blob storage to a local NTFS disk for processing.
4040

41-
## Map v3 asset properties to v2
42-
43-
The following table shows how the [Asset](https://docs.microsoft.com/rest/api/media/assets/createorupdate#asset)'s properties in v3 map to Asset's properties in v2.
44-
45-
|v3 properties|v2 properties|
46-
|---|---|
47-
|`id` - (unique) the full Azure Resource Manager path, see examples in [Asset](https://docs.microsoft.com/rest/api/media/assets/createorupdate)||
48-
|`name` - (unique) see [Naming conventions](media-services-apis-overview.md#naming-conventions) ||
49-
|`alternateId`|`AlternateId`|
50-
|`assetId`|`Id` - (unique) value starts with the `nb:cid:UUID:` prefix.|
51-
|`created`|`Created`|
52-
|`description`|`Name`|
53-
|`lastModified`|`LastModified`|
54-
|`storageAccountName`|`StorageAccountName`|
55-
|`storageEncryptionFormat`| `Options` (creation options)|
56-
|`type`||
57-
58-
## Storage side encryption
59-
60-
To protect your Assets at rest, the assets should be encrypted by the storage side encryption. The following table shows how the storage side encryption works in Media Services:
61-
62-
|Encryption option|Description|Media Services v2|Media Services v3|
63-
|---|---|---|---|
64-
|Media Services Storage Encryption|AES-256 encryption, key managed by Media Services.|Supported<sup>(1)</sup>|Not supported<sup>(2)</sup>|
65-
|[Storage Service Encryption for Data at Rest](https://docs.microsoft.com/azure/storage/common/storage-service-encryption)|Server-side encryption offered by Azure Storage, key managed by Azure or by customer.|Supported|Supported|
66-
|[Storage Client-Side Encryption](https://docs.microsoft.com/azure/storage/common/storage-client-side-encryption)|Client-side encryption offered by Azure storage, key managed by customer in Key Vault.|Not supported|Not supported|
67-
68-
<sup>1</sup> While Media Services does support handling of content in the clear/without any form of encryption, doing so isn't recommended.
69-
70-
<sup>2</sup> In Media Services v3, storage encryption (AES-256 encryption) is only supported for backwards compatibility when your Assets were created with Media Services v2. Meaning v3 works with existing storage encrypted assets but won't allow creation of new ones.
71-
7241
## Next steps
7342

7443
[Manage assets in Media Services](manage-asset-concept.md)

articles/media-services/latest/frequently-asked-questions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ When using pagination, you should always use the next link to enumerate the coll
4949

5050
### What features are not yet available in Azure Media Services v3?
5151

52-
For details, see [feature gaps with respect to v2 APIs](migrate-from-v2-to-v3.md#feature-gaps-with-respect-to-v2-apis).
52+
For details, see [feature gaps with respect to v2 APIs](media-services-v2-vs-v3.md#feature-gaps-with-respect-to-v2-apis).
5353

5454
### What is the process of moving a Media Services account between subscriptions?
5555

@@ -143,7 +143,7 @@ For all other management tasks (for example, [Transforms and Jobs](transforms-jo
143143

144144
The AssetFiles were removed from the AMS API in order to separate Media Services from Storage SDK dependency. Now Storage, not Media Services, keeps the information that belongs in Storage.
145145

146-
For more information, see [Migrate to Media Services v3](migrate-from-v2-to-v3.md).
146+
For more information, see [Migrate to Media Services v3](media-services-v2-vs-v3.md).
147147

148148
### Where did client-side storage encryption go?
149149

articles/media-services/latest/media-services-overview.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,23 @@ ms.custom: mvc
2323

2424
# Azure Media Services v3 overview
2525

26-
Azure Media Services is a cloud-based platform that enables you to build solutions that achieve broadcast-quality video streaming, enhance accessibility and distribution, analyze content, and much more. Whether you're an app developer, a call center, a government agency, or an entertainment company, Media Services helps you create apps that deliver media experiences of outstanding quality to large audiences on todays most popular mobile devices and browsers.
26+
Azure Media Services is a cloud-based platform that enables you to build solutions that achieve broadcast-quality video streaming, enhance accessibility and distribution, analyze content, and much more. Whether you're an app developer, a call center, a government agency, or an entertainment company, Media Services helps you create apps that deliver media experiences of outstanding quality to large audiences on today's most popular mobile devices and browsers.
2727

2828
The Media Services v3 SDKs are based on [Media Services v3 OpenAPI Specification (Swagger)](https://aka.ms/ams-v3-rest-sdk).
2929

3030
> [!NOTE]
31-
> You can use the [Azure portal](https://portal.azure.com/) to manage v3 [Live Events](live-events-outputs-concept.md), view v3 [Assets](assets-concept.md), get info about accessing APIs. For all other management tasks (for example, Transforms and Jobs), use the [REST API](https://aka.ms/ams-v3-rest-ref), [CLI](https://aka.ms/ams-v3-cli-ref), or one of the supported [SDKs](media-services-apis-overview.md#sdks).
31+
> Currently, you can use the [Azure portal](https://portal.azure.com/) to: manage Media Services v3 [Live Events](live-events-outputs-concept.md), view (not manage) v3 [Assets](assets-concept.md), [get info about accessing APIs](access-api-portal.md).
32+
> For all other management tasks (for example, [Transforms and Jobs](transforms-jobs-concept.md) and [Content protection](content-protection-overview.md)), use the [REST API](https://aka.ms/ams-v3-rest-ref), [CLI](https://aka.ms/ams-v3-cli-ref), or one of the supported [SDKs](media-services-apis-overview.md#sdks).
33+
34+
[!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
3235

3336
## Compliance, Privacy and Security
3437

3538
As an important reminder, you must comply with all applicable laws in your use of Azure Media Services, and you may not use Media Services or any Azure service in a manner that violates the rights of others, or that may be harmful to others.
3639

3740
Before uploading any video/image to Media Services, You must have all the proper rights to use the video/image, including, where required by law, all the necessary consents from individuals (if any) in the video/image, for the use, processing, and storage of their data in Media Services and Azure. Some jurisdictions may impose special legal requirements for the collection, online processing and storage of certain categories of data, such as biometric data. Before using Media Services and Azure for the processing and storage of any data subject to special legal requirements, You must ensure compliance with any such legal requirements that may apply to You.
3841

39-
To learn about compliance, privacy and security in Media Services please visit the Microsoft [Trust Center](https://www.microsoft.com/trust-center/?rtc=1). For Microsofts privacy obligations, data handling and retention practices, including how to delete your data, please review Microsofts [Privacy Statement](https://privacy.microsoft.com/PrivacyStatement), the [Online Services Terms](https://www.microsoft.com/licensing/product-licensing/products?rtc=1) (OST) and [Data Processing Addendum](https://www.microsoftvolumelicensing.com/DocumentSearch.aspx?Mode=3&DocumentTypeId=67) (DPA). By using Media Services, you agree to be bound by the OST, DPA and the Privacy Statement.
42+
To learn about compliance, privacy and security in Media Services please visit the Microsoft [Trust Center](https://www.microsoft.com/trust-center/?rtc=1). For Microsoft's privacy obligations, data handling and retention practices, including how to delete your data, please review Microsoft's [Privacy Statement](https://privacy.microsoft.com/PrivacyStatement), the [Online Services Terms](https://www.microsoft.com/licensing/product-licensing/products?rtc=1) ("OST") and [Data Processing Addendum](https://www.microsoftvolumelicensing.com/DocumentSearch.aspx?Mode=3&DocumentTypeId=67) ("DPA"). By using Media Services, you agree to be bound by the OST, DPA and the Privacy Statement.
4043

4144
## What can I do with Media Services?
4245

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
title: Migrate from Azure Media Services v2 to v3
3+
description: This article describes changes that were introduced in Azure Media Services v3 and shows differences between two versions.
4+
services: media-services
5+
documentationcenter: na
6+
author: Juliako
7+
manager: femila
8+
editor: ''
9+
tags: ''
10+
keywords: azure media services, stream, broadcast, live, offline
11+
12+
ms.service: media-services
13+
ms.devlang: multiple
14+
ms.topic: article
15+
ms.tgt_pltfrm: multiple
16+
ms.workload: media
17+
ms.date: 03/09/2020
18+
ms.author: juliako
19+
---
20+
21+
# Media Services v2 vs. v3
22+
23+
This article describes changes that were introduced in Azure Media Services v3 and shows differences between two versions.
24+
25+
## General changes from v2
26+
27+
* For assets created with v3, Media Services supports only the [Azure Storage server-side storage encryption](https://docs.microsoft.com/azure/storage/common/storage-service-encryption).
28+
* You can use v3 APIs with Assets created with v2 APIs that had [storage encryption](../previous/media-services-rest-storage-encryption.md) (AES 256) provided by Media Services.
29+
* You cannot create new Assets with the legacy AES 256 [storage encryption](../previous/media-services-rest-storage-encryption.md) using v3 APIs.
30+
* The [Asset](assets-concept.md)'s properties in v3 differ to from v2, see [how the properties map](#map-v3-asset-properties-to-v2).
31+
* The v3 SDKs are now decoupled from the Storage SDK, which gives you more control over the version of Storage SDK you want to use and avoids versioning issues.
32+
* In the v3 APIs, all of the encoding bit rates are in bits per second. This is different than the v2 Media Encoder Standard presets. For example, the bitrate in v2 would be specified as 128 (kbps), but in v3 it would be 128000 (bits/second).
33+
* Entities AssetFiles, AccessPolicies, and IngestManifests do not exist in v3.
34+
* The IAsset.ParentAssets property does not exist in v3.
35+
* ContentKeys is no longer an entity, it is now a property of the Streaming Locator.
36+
* Event Grid support replaces NotificationEndpoints.
37+
* The following entities were renamed
38+
* Job Output replaces Task, and is now part of a Job.
39+
* Streaming Locator replaces Locator.
40+
* Live Event replaces Channel.<br/>Live Events billing is based on Live Channel meters. For more information, see [billing](live-event-states-billing.md) and [pricing](https://azure.microsoft.com/pricing/details/media-services/).
41+
* Live Output replaces Program.
42+
* Live Outputs start on creation and stop when deleted. Programs worked differently in the v2 APIs, they had to be started after creation.
43+
* To get information about a job, you need to know the Transform name under which the job was created.
44+
* In v2, XML [input](../previous/media-services-input-metadata-schema.md) and [output](../previous/media-services-output-metadata-schema.md) metadata files get generated as the result of an encoding job. In v3, the metadata format changed from XML to JSON.
45+
* In Media Services v2, initialization vector (IV) can be specified. In Media Services v3, the FairPlay IV cannot be specified. While it does not impact customers using Media Services for both packaging and license delivery, it can be an issue when using a third party DRM system to deliver the FairPlay licenses (hybrid mode). In that case, it is important to know that the FairPlay IV is derived from the cbcs key ID and can be retrieved using this formula:
46+
47+
```
48+
string cbcsIV = Convert.ToBase64String(HexStringToByteArray(cbcsGuid.ToString().Replace("-", string.Empty)));
49+
```
50+
51+
with
52+
53+
```
54+
public static byte[] HexStringToByteArray(string hex)
55+
{
56+
return Enumerable.Range(0, hex.Length)
57+
.Where(x => x % 2 == 0)
58+
.Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
59+
.ToArray();
60+
}
61+
```
62+
63+
For more information, see the [Azure Functions C# code for Media Services v3 in hybrid mode for both Live and VOD operations](https://github.com/Azure-Samples/media-services-v3-dotnet-core-functions-integration/tree/master/LiveAndVodDRMOperationsV3).
64+
65+
> [!NOTE]
66+
> Review the naming conventions that are applied to [Media Services v3 resources](media-services-apis-overview.md#naming-conventions). Also review [naming blobs](assets-concept.md#naming).
67+
68+
## Feature gaps with respect to v2 APIs
69+
70+
The v3 API has the following feature gaps with respect to the v2 API. Closing the gaps is work in progress.
71+
72+
* The [Premium Encoder](../previous/media-services-premium-workflow-encoder-formats.md) and the legacy [media analytics processors](../previous/media-services-analytics-overview.md) (Azure Media Services Indexer 2 Preview, Face Redactor, etc.) are not accessible via v3.<br/>Customers who wish to migrate from the Media Indexer 1 or 2 preview can immediately use the AudioAnalyzer preset in the v3 API. This new preset contains more features than the older Media Indexer 1 or 2.
73+
* Many of the [advanced features of the Media Encoder Standard in v2](../previous/media-services-advanced-encoding-with-mes.md) APIs are currently not available in v3, such as:
74+
75+
* Stitching of Assets
76+
* Overlays
77+
* Cropping
78+
* Thumbnail Sprites
79+
* Inserting a silent audio track when input has no audio
80+
* Inserting a video track when input has no video
81+
* Live Events with transcoding currently do not support Slate insertion mid-stream and ad marker insertion via API call.
82+
83+
## Asset specific changes
84+
85+
### Map v3 asset properties to v2
86+
87+
The following table shows how the [Asset](https://docs.microsoft.com/rest/api/media/assets/createorupdate#asset)'s properties in v3 map to Asset's properties in v2.
88+
89+
|v3 properties|v2 properties|
90+
|---|---|
91+
|`id` - (unique) the full Azure Resource Manager path, see examples in [Asset](https://docs.microsoft.com/rest/api/media/assets/createorupdate)||
92+
|`name` - (unique) see [Naming conventions](media-services-apis-overview.md#naming-conventions) ||
93+
|`alternateId`|`AlternateId`|
94+
|`assetId`|`Id` - (unique) value starts with the `nb:cid:UUID:` prefix.|
95+
|`created`|`Created`|
96+
|`description`|`Name`|
97+
|`lastModified`|`LastModified`|
98+
|`storageAccountName`|`StorageAccountName`|
99+
|`storageEncryptionFormat`| `Options` (creation options)|
100+
|`type`||
101+
102+
### Storage side encryption
103+
104+
To protect your Assets at rest, the assets should be encrypted by the storage side encryption. The following table shows how the storage side encryption works in Media Services:
105+
106+
|Encryption option|Description|Media Services v2|Media Services v3|
107+
|---|---|---|---|
108+
|Media Services Storage Encryption|AES-256 encryption, key managed by Media Services.|Supported<sup>(1)</sup>|Not supported<sup>(2)</sup>|
109+
|[Storage Service Encryption for Data at Rest](https://docs.microsoft.com/azure/storage/common/storage-service-encryption)|Server-side encryption offered by Azure Storage, key managed by Azure or by customer.|Supported|Supported|
110+
|[Storage Client-Side Encryption](https://docs.microsoft.com/azure/storage/common/storage-client-side-encryption)|Client-side encryption offered by Azure storage, key managed by customer in Key Vault.|Not supported|Not supported|
111+
112+
<sup>1</sup> While Media Services does support handling of content in the clear/without any form of encryption, doing so isn't recommended.
113+
114+
<sup>2</sup> In Media Services v3, storage encryption (AES-256 encryption) is only supported for backwards compatibility when your Assets were created with Media Services v2. Meaning v3 works with existing storage encrypted assets but won't allow creation of new ones.
115+
116+
## Code differences
117+
118+
The following table shows the code differences between v2 and v3 for common scenarios.
119+
120+
|Scenario|V2 API|V3 API|
121+
|---|---|---|
122+
|Create an asset and upload a file |[v2 .NET example](https://github.com/Azure-Samples/media-services-dotnet-dynamic-encryption-with-aes/blob/master/DynamicEncryptionWithAES/DynamicEncryptionWithAES/Program.cs#L113)|[v3 .NET example](https://github.com/Azure-Samples/media-services-v3-dotnet-tutorials/blob/master/AMSV3Tutorials/UploadEncodeAndStreamFiles/Program.cs#L169)|
123+
|Submit a job|[v2 .NET example](https://github.com/Azure-Samples/media-services-dotnet-dynamic-encryption-with-aes/blob/master/DynamicEncryptionWithAES/DynamicEncryptionWithAES/Program.cs#L146)|[v3 .NET example](https://github.com/Azure-Samples/media-services-v3-dotnet-tutorials/blob/master/AMSV3Tutorials/UploadEncodeAndStreamFiles/Program.cs#L298)<br/><br/>Shows how to first create a Transform and then submit a Job.|
124+
|Publish an asset with AES encryption |1. Create ContentKeyAuthorizationPolicyOption<br/>2. Create ContentKeyAuthorizationPolicy<br/>3. Create AssetDeliveryPolicy<br/>4. Create Asset and upload content OR Submit job and use output asset<br/>5. Associate AssetDeliveryPolicy with Asset<br/>6. Create ContentKey<br/>7. Attach ContentKey to Asset<br/>8. Create AccessPolicy<br/>9. Create Locator<br/><br/>[v2 .NET example](https://github.com/Azure-Samples/media-services-dotnet-dynamic-encryption-with-aes/blob/master/DynamicEncryptionWithAES/DynamicEncryptionWithAES/Program.cs#L64)|1. Create Content Key Policy<br/>2. Create Asset<br/>3. Upload content or use Asset as JobOutput<br/>4. Create Streaming Locator<br/><br/>[v3 .NET example](https://github.com/Azure-Samples/media-services-v3-dotnet-tutorials/blob/master/AMSV3Tutorials/EncryptWithAES/Program.cs#L105)|
125+
|Get job details and manage jobs |[Manage jobs with v2](../previous/media-services-dotnet-manage-entities.md#get-a-job-reference) |[Manage jobs with v3](https://github.com/Azure-Samples/media-services-v3-dotnet-tutorials/blob/master/AMSV3Tutorials/UploadEncodeAndStreamFiles/Program.cs#L546)|
126+
127+
> [!NOTE]
128+
> Please bookmark this article and keep checking for updates.
129+
130+
## Ask questions, give feedback, get updates
131+
132+
Check out the [Azure Media Services community](media-services-community.md) article to see different ways you can ask questions, give feedback, and get updates about Media Services.
133+
134+
## Next steps
135+
136+
[Migration guidance for moving from Media Services v2 to v3](migrate-from-v2-to-v3.md)

0 commit comments

Comments
 (0)