Add Metadata to asset in Azure Media Services - c#

I am developing a background service with .Net, that will upload some videos to the azure media services platform and I would like to add some custom metadata to each video I will upload. I have google for some time, and I found that there is no possibility to upload an asset. How to Add Metadata to assets in Azure Media Services? but having a look to the Azure dashboard I found, that selecting the properties of an asset I am able to add custom metadata manually. My question is, anybody have any idea how can I add this custom fields thougth through the azure media services API. Thanks in advance.

You would be able to add such metadata using Azure Storage APIs (and not via Media Services APIs). See this for example.

Related

Is it possible to use azure cognitive service on a webapp?

I am a novice in Azure and I am trying to create a web app with a text-to-speech agent using azure resources. So far I have the web app and separatly the voice agent. Do you know if it is possible to bind both so that when I click a button on the web app, the voice agent says something (anything would work for now).
If it is possible, what steps would you follow to achieve that?
I'm using .NET core and C#.
Thanks in advance for the time.
Yes, You can use the Speech Services REST API or SDK. Here are reference docs.
As well as the API reference document: Cognitive Services APIs Reference (microsoft.com)

Upload a file to Dropbox from Azure webjob

I have been looking all over the place but I'm having a hard time finding out how to upload a file to Dropbox from an Azure webjob. Is this even possible? I will be creating an excel file and a text document in my webjob that i will need to place in a certain Dropbox account (which i have access) folder.
According to your requirement, I assumed that you could follow the possible approaches below to achieve your purpose.
1.Call Dropbox API in your WebJob
You could leverage Dropbox.NET which is a portable Class Library for you to easily integrate Dropbox into your WebJob.
2. ApiHub extension for Azure WebJob
You could leverage Microsoft.Azure.WebJobs.Extensions.ApiHub which is a pre-release version for you to integrate Dropbox with WebJob. For more details, you could refer to Azure WebJobs extensions sample.
Alternatively (if you don't want to deal with DropBox API) you can build a logic app being triggered for example by HTTP request from your web job as DropBox connector exists:
https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-dropbox

Where is the Azure Media Service Region property?

The most simplest thing I thought... but no where to be found... When I'm creating throuh the portal a new media service I can choose a region for the new service, a storage account (with a different region (..question for another day)) and the rest for the properties.
However, when I connect with the SDK I got a CloudMediaContext. I can find any property for channels and live-streams/programs. However, where can I find the region for this Media Service Account? Is this coupled to another storage account (and why can I choose another region), or any other class or is this via another way coupled?
So there are two things going on here:
Control Plane: Control plane deals with the management of service. It includes things like creation of service, fetching service details, key regeneration etc.
Data Plane: Data plane deals with the data in the service. So for media services, data plane deals with managing assets, locators etc.
Azure Media Service SDK deals with data plane only. You give it an account name and key and using that it gives you CloudMediaContext and you use that to manage data in your service.
In order to view the properties of the service itself (like the region), you would need to use Azure Resource Manager (ARM) SDK which is a wrapper over Azure Resource Manager API and not the Media Service SDK. This ARM SDK has support for Media Services.

How can I expose my Azure Table storage data as JSON?

I am new to Azure and trying to get the data from Azure table storage. I am able to read it using c# code and do all CRUD operations. But I am looking for built in REST API from azure storage? Is it available?
Below article says that we need to write our own service and deploy.
https://blog.kloud.com.au/2016/06/09/using-microsoft-azure-table-service-rest-api-to-collect-data-samples
But this require me to have IIS ?? or do I have to write app service in c#??
I want JSON because I want to read it from android app but I do not want to use azure android SDK. I want pure REST API
This article http://chrisrisner.com/Mobile-Services-and-Windows-Azure-Storage is close but it's recommending me create SQL Azure database!! so I am confused.
Based on your requirement, I would recommend you go Shared Access Signature (SAS) route. In short, a SAS is a time-limited/permission-based access to your Azure Storage resources. This removes the need for you to store the storage access key in your application as it poses a major security risk and some other issues.
To read more about SAS, please see this link: https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-shared-access-signature-part-1. This should give you some idea about what is possible with SAS.
Here's how it would work. There will be a server component which will know about the account key. Your app would request this server component to generate and return the SAS URL. It is recommended that you only grant the necessary permissions and only for the required duration in the SAS.
Once your app has the SAS URL, they can simply make HTTP requests directly to Azure Storage by using this SAS URL and get the data back directly from Azure Tables in JSON format. For example, if you want to fetch entities from a table you would make Query Entities REST API call: https://msdn.microsoft.com/en-us/library/azure/dd179421.aspx.
To learn more about SAS, please see this link as well: https://msdn.microsoft.com/en-us/library/azure/ee395415.aspx.
I do not want to store storage key inside android app.
This app is just showing the temperature from a azure storage which is real time pushed by event hub from device to table storage
Regardless your requirement is simply, and it is correct that we don't recommend to expose your storage key in clients. However, to provide table storage entities to your clients, we still need a backend server.
If you have an Azure Mobile Apps server as a backend server for your devices, you can directly integrate Azure Storage SDK in custom APIs to provide table storage entities for your devices. Refer to https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-how-to-use-server-sdk/#how-to-define-a-custom-api-controller for more.
If you don't have an Azure Mobile Apps, you can leverage Auzre Function Apps for you simple requirement, whose environment has automatically added the assembly Microsoft.WindowsAzure.Storage, please refer to https://azure.microsoft.com/en-us/documentation/articles/functions-reference-csharp/ for more.

How can I use "Azure File Storage" with Web App Service?

I have been struggling to find some resources that help explain, how we use the File Storage with Web App Service.
There are ways to use it with the old Web Roles, Check here (Using the Azure File Service in your Cloud Services (Web and Worker Roles)).
However, there is NO OnStart() methods in "Azure Web Service".
If you're looking for mapping a drive to your Azure File Service share in your Web App using SMB protocol, then I don't think you can do as of today.
What you could do is make use of Azure File Service REST API and manipulate shares and files that way. You don't have to actually use the REST API per se; you can simply use the latest version of .Net Storage Client library which is a wrapper over REST API.
Please see this link for more details on how to use this using Storage Client library: https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-how-to-use-files/.
Yes, you can. In Linux Web Apps and Windows Containers Web Apps only.
In the Web App, under Application Settings you will find Mount storage (Preview) section where you can mount Storage account. Works like a charm.

Categories