You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/media-services/latest/assets-concept.md
+11-73Lines changed: 11 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,84 +20,24 @@ ms.custom: seodec18
20
20
21
21
# Assets in Azure Media Services
22
22
23
-
In Azure Media Services, an [Asset](https://docs.microsoft.com/rest/api/media/assets)contains information about digital files stored in Azure Storage (including video, audio, images, thumbnail collections, text tracks, and closed caption files).
23
+
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).
24
24
25
-
An Asset is mapped to a blob container in the [Azure Storage account](storage-account-concept.md) and the files in the Asset are stored as block blobs in that container. Media Services supports Blob tiers when the account uses General-purpose v2 (GPv2) storage. With GPv2, you can move files to [Cool or Archive storage](https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers). **Archive** storage is suitable for archiving source files when no longer needed (for example, after they've been encoded).
25
+
An Asset is mapped to a blob container in the [Azure Storage account](storage-account-concept.md) and the files in the Asset are stored as block blobs in that container. Assets contain information about digital files stored in Azure Storage (including video, audio, images, thumbnail collections, text tracks, and closed caption files).
26
+
27
+
Media Services supports Blob tiers when the account uses General-purpose v2 (GPv2) storage. With GPv2, you can move files to [Cool or Archive storage](https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers). **Archive** storage is suitable for archiving source files when no longer needed (for example, after they've been encoded).
26
28
27
29
The **Archive** storage tier is only recommended for very large source files that have already been encoded and the encoding Job output was put in an output blob container. The blobs in the output container that you want to associate with an Asset and use to stream or analyze your content must exist in a **Hot** or **Cool** storage tier.
28
30
29
-
###Naming
31
+
## Naming
30
32
31
-
####Assets
33
+
### Assets
32
34
33
35
Asset's names must be unique. Media Services v3 resource names (for example, Assets, Jobs, Transforms) are subject to Azure Resource Manager naming constraints. For more information, see [Naming conventions](media-services-apis-overview.md#naming-conventions).
34
36
35
-
####Blobs
37
+
### Blobs
36
38
37
39
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.
38
40
39
-
## Upload digital files into Assets
40
-
41
-
After the digital files are uploaded into storage and associated with an Asset, they can be used in the Media Services encoding, streaming, and analyzing content workflows. One of the common Media Services workflows is to upload, encode, and stream a file. This section outlines the general steps.
42
-
43
-
> [!TIP]
44
-
> Before you start developing, review [Developing with Media Services v3 APIs](media-services-apis-overview.md) (includes information on accessing APIs, naming conventions, and so on).
45
-
46
-
1. Use the Media Services v3 API to create a new "input" Asset. This operation creates a container in the storage account associated with your Media Services account. The API returns the container name (for example, `"container": "asset-b8d8b68a-2d7f-4d8c-81bb-8c7bbbe67ee4"`).
47
-
48
-
If you already have a blob container that you want to associate with an Asset, you can specify the container name when you create the Asset. Media Services currently only supports blobs in the container root and not with paths in the file name. Thus, a container with the "input.mp4" file name will work. However, a container with the "videos/inputs/input.mp4" file name won't work.
49
-
50
-
You can use the Azure CLI to upload directly to any storage account and container that you have rights to in your subscription.
51
-
52
-
The container name must be unique and follow storage naming guidelines. The name doesn't have to follow the Media Services Asset container name (Asset-GUID) formatting.
53
-
54
-
```azurecli
55
-
az storage blob upload -f /path/to/file -c MyContainer -n MyBlob
56
-
```
57
-
2. Get a SAS URL with read-write permissions that will be used to upload digital files into the Asset container. You can use the Media Services API to [list the asset container URLs](https://docs.microsoft.com/rest/api/media/assets/listcontainersas).
58
-
3. Use the Azure Storage APIs or SDKs (for example, the [Storage REST API](../../storage/common/storage-rest-api-auth.md) or [.NET SDK](../../storage/blobs/storage-quickstart-blobs-dotnet.md)) to upload files into the Asset container.
59
-
4. Use Media Services v3 APIs to create a Transform and a Job to process your "input" Asset. For more information, see [Transforms and Jobs](transform-concept.md).
60
-
5. Stream the content from the "output" asset.
61
-
62
-
For a full .NET example that shows how to create the Asset, get a writable SAS URL to the Asset’s container in storage, and upload the file into the container in storage using the SAS URL, see [Create a job input from a local file](job-input-from-local-file-how-to.md).
63
-
64
-
### Create a new asset
65
-
66
-
> [!NOTE]
67
-
> An Asset's properties of the Datetime type are always in UTC format.
68
-
69
-
#### REST
70
-
71
-
```
72
-
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{amsAccountName}/assets/{assetName}?api-version=2018-07-01
73
-
```
74
-
75
-
For a REST example, see the [Create an Asset with REST](https://docs.microsoft.com/rest/api/media/assets/createorupdate#examples) example.
76
-
77
-
The example shows how to create the **Request Body** where you can specify description, container name, storage account, and other useful info.
For a full example, see [Create a job input from a local file](job-input-from-local-file-how-to.md). In Media Services v3, a job's input can also be created from HTTPS URLs (see [Create a job input from an HTTPS URL](job-input-from-http-how-to.md)).
100
-
101
41
## Map v3 asset properties to v2
102
42
103
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.
@@ -129,12 +69,10 @@ To protect your Assets at rest, the assets should be encrypted by the storage si
129
69
130
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.
131
71
132
-
## Filtering, ordering, paging
72
+
## Next steps
133
73
134
-
See [Filtering, ordering, paging of Media Services entities](entities-overview.md).
74
+
[Manage assets in Media Services](manage-asset-concept.md)
135
75
136
-
## Next steps
76
+
## Also see
137
77
138
-
*[Stream a file](stream-files-dotnet-quickstart.md)
139
-
*[Using a cloud DVR](live-event-cloud-dvr.md)
140
-
*[Differences between Media Services v2 and v3](migrate-from-v2-to-v3.md)
78
+
[Differences between Media Services v2 and v3](migrate-from-v2-to-v3.md)
title: Download the results of a job - Azure Media Services
3
+
description: This article demonstrates how to download the results of a job.
4
+
services: media-services
5
+
documentationcenter: ''
6
+
author: Juliako
7
+
manager: femila
8
+
editor: ''
9
+
10
+
ms.service: media-services
11
+
ms.workload:
12
+
ms.topic: article
13
+
ms.date: 02/18/2019
14
+
ms.author: juliako
15
+
---
16
+
17
+
# Download the results of a job
18
+
19
+
In Azure Media Services, when processing your videos (for example, encoding or analyzing) you need to create an output [asset](assets-concept.md) to store the result of your [job](transforms-jobs-concept.md). You can then download these results to a local folder using Media Service and Storage APIs.
20
+
21
+
This article demonstrates how to download the results using Java and .NET SDKs.
22
+
23
+
## Java
24
+
25
+
```java
26
+
/**
27
+
* Use Media Service and Storage APIs to download the output files to a local folder
28
+
* @param manager The entry point of Azure Media resource management
29
+
* @param resourceGroup The name of the resource group within the Azure subscription
30
+
* @param accountName The Media Services account name
31
+
* @param assetName The asset name
32
+
* @param outputFolder The output folder for downloaded files.
See the full code sample: [EncodingWithMESPredefinedPreset](https://github.com/Azure-Samples/media-services-v3-java/blob/master/VideoEncoding/EncodingWithMESPredefinedPreset/src/main/java/sample/EncodingWithMESPredefinedPreset.java)
67
+
68
+
## .NET
69
+
70
+
```csharp
71
+
/// <summary>
72
+
/// Use Media Service and Storage APIs to download the output files to a local folder
73
+
/// </summary>
74
+
/// <paramname="client">The Media Services client.</param>
75
+
/// <paramname="resourceGroupName">The name of the resource group within the Azure subscription.</param>
76
+
/// <paramname="accountName">The Media Services account name.</param>
See the full code sample: [EncodingWithMESPredefinedPreset](https://github.com/Azure-Samples/media-services-v3-dotnet/blob/master/VideoEncoding/EncodingWithMESPredefinedPreset/Program.cs)
116
+
117
+
## Next steps
118
+
119
+
[Create a job input from an HTTPS URL](job-input-from-http-how-to.md).
0 commit comments