SlideShare a Scribd company logo
Capture
Record
Clip
Embed and play
Search
Video from newbie to ninja
http://creativecommons.org/licenses/by-nc-sa/3.0/
Vito Flavio Lorusso
@vflorusso
http://github.com/vflorusso
Capture, record, clip, embed and play, search: video from newbie to ninja
Things that kept me busy…
6. CDN
4. Cloud Ingest2. Broadcaster
Toronto Facility
3. Encoding
5. Storage & Streaming
7. Immersive Player
Client
15 live feeds
1. FIFA Broadcast
Facilities
H.264
HLS
DASH
What does
“video in the cloud”
look like?
INGEST
ENCODE
DELIVER
PACKAGE
ENCRYPT
“This looks complicated…
I am just a web developer…
and I want my Youtube”
Creating the Media Services
Account
Create a Storage Account
New-AzureStorageAccount -StorageAccountName [name] -Label
[label] -Location [location] -Type [storage-type]
Create a Media Services Account
New-AzureMediaServicesAccount -Name [ams-name] -
StorageAccountName [stg-name] -Location [location]
Create a Media Services Account
Get-AzureMediaServicesAccount -Name [ams-accountname]|Format-
Table Name, MediaServicesPrimaryAccountKey
Creating the CloudMediaContext
using Microsoft.WindowsAzure.MediaServices;
using Microsoft.WindowsAzure.MediaServices.Client;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
using Microsoft.WindowsAzure.Storage.Blob;
public static CloudMediaContext createAMSContext()
{
MediaServicesCredentials credentials = new
MediaServicesCredentials(amsAccountName, amsAccountKey);
CloudMediaContext mediaClient = new
CloudMediaContext(credentials);
return mediaClient;
}
Creating your with Azure
Youtube
Vimeo
Dailymotion
MP4 Video
Upload and
Create Asset
Media Services
Account
WEB APP
Uploading videos… (1/2)
static public IAsset CreateAssetAndUploadSingleFile(CloudMediaContext amsAccount,
AssetCreationOptions assetCreationOptions, string singleFilePath)
{
var assetName = "UploadSingleFile_" + DateTime.UtcNow.ToString();
var asset = CreateEmptyAsset(amsAccount, assetName, assetCreationOptions);
var fileName = Path.GetFileName(singleFilePath);
var assetFile = asset.AssetFiles.Create(fileName);
Console.WriteLine("Created assetFile {0}", assetFile.Name);
…
Uploading videos… 2/2
var accessPolicy = amsAccount.AccessPolicies.Create(assetName,
TimeSpan.FromDays(3),
AccessPermissions.Write | AccessPermissions.List);
var locator = amsAccount.Locators.CreateLocator(LocatorType.Sas,
asset, accessPolicy);
Console.WriteLine("Upload {0}", assetFile.Name);
assetFile.Upload(singleFilePath);
Console.WriteLine("Done uploading of {0} using Upload()",
assetFile.Name);
locator.Delete();
accessPolicy.Delete();
return asset;
}
…
Creating your with Azure
Youtube
Vimeo
Dailymotion
MP4 Video
Upload and
Create Asset
Media Services
Account
Media Services
Encoding Units
Process
Asset
Subtitles
Thumbnails
manifest
Adaptive bitrate
MP4 video
WEB APP
Processing… Encode
static public IAsset EncodeToAdaptiveBitrateMP4Set(IAsset asset, string
pathToLocalPresetFile)
{
IJob job = _context.Jobs.Create("Media Encoder Standard Job");
IMediaProcessor processor = GetLatestMediaProcessorByName("Media Encoder
Standard");
ITask task = job.Tasks.AddNew("My encoding task",
processor,
"H264 Multiple Bitrate 720p",
TaskOptions.None);
task.InputAssets.Add(asset);
task.OutputAssets.AddNew("Output asset",
AssetCreationOptions.None);
job.StateChanged += new
EventHandler<JobStateChangedEventArgs>(JobStateChanged);
job.Submit();
job.GetExecutionProgressTask(CancellationToken.None).Wait();
return job.OutputMediaAssets[0];
}
Processing… Thumbnails
<?xml version="1.0" encoding="utf-8"?> <Thumbnail Size="100%,*" Type="Jpeg"
Filename="{OriginalFilename}_{Size}_{ThumbnailTime}_{ThumbnailIndex}_{Date}_{Ti
me}.{DefaultExtension}"> <Time Value="10%" Step="10%" Stop="95%"/> </Thumbnail>
string configuration = File.ReadAllText(Path.GetFullPath(configFilePath +
@"Thumbnails.xml"));
ITask task = job.Tasks.AddNew("My thumbnail task", processor, configuration,
TaskOptions.ProtectedConfiguration);
Processing… Subtitles
string configuration = string.IsNullOrEmpty(configurationFile) ? "" :
File.ReadAllText(configurationFile);
ITask task = job.Tasks.AddNew("My Indexing Task",
processor,
configuration,
TaskOptions.None);
<?xml version="1.0" encoding="utf-8"?> <configuration version="2.0"> <input>
<metadata key="title" value="[Title of the media file]" /> <metadata
key="description" value="[Description of the media file]" /> </input>
<settings> </settings> <features> <feature name="ASR"> <settings> <add
key="Language" value="English"/> <add key="CaptionFormats"
value="ttml;sami;webvtt"/> <add key="GenerateAIB" value ="true" /> <add
key="GenerateKeywords" value ="true" /> </settings> </feature> </features>
</configuration>
Creating your with Azure
Youtube
Vimeo
Dailymotion
MP4 Video
Upload and
Create Asset
Media Services
Account
Media Services
Encoding Units
Process
Asset
Subtitles
Thumbnails
manifest
Adaptive bitrate
MP4 video
Media Services
Streaming EndpointsCDN
WEB APP
Creating the Endpoint
public static void createStreamingEndpoint(CloudMediaContext amsAccount,
string seName)
{
IStreamingEndpoint amsEndpoint =
amsAccount.StreamingEndpoints.Create(seName, 1);
amsEndpoint.StartAsync();
}
Get the streaming URL (1/2)
static string streamSmoothLegacy = "(format=fmp4-v20)";
static string streamDash = "(format=mpd-time-csf)";
static string streamHLSv4 = "(format=m3u8-aapl)";
static string streamHLSv3 = "(format=m3u8-aapl-v3)";
static string streamHDS = "(format=f4m-f4f)";
private static string GetStreamingOriginLocatorEndPoint(CloudMediaContext
amsAccount, IAsset assetToStream)
{
var theManifest = from f in assetToStream.AssetFiles
where f.Name.EndsWith(".ism")
select f;
// Cast the reference to a true IAssetFile type.
IAssetFile manifestFile = theManifest.First();
IAccessPolicy policy = null;
ILocator originLocator = null;
// Create a 30-day readonly access policy.
policy = amsAccount.AccessPolicies.Create("Streaming policy",
TimeSpan.FromDays(30),
AccessPermissions.Read);
…
// Create an OnDemandOrigin locator to the asset.
originLocator =
amsAccount.Locators.CreateLocator(LocatorType.OnDemandOrigin, assetToStream,
policy,
DateTime.UtcNow.AddMinutes(-5));
// Create a full URL to the manifest file. Use this for playback
// in streaming media clients.
string urlForClientStreaming = originLocator.Path +
manifestFile.Name + "/manifest";
// Return the locator.
return urlForClientStreaming;
}
Get the streaming URL (2/2)
…
Managing Media Services from
«code»
• Command Line
• Windows: PowerShell
• Code
• Azure Media Services REST APIs
• Azure Media Services SDK for .NET
• Azure SDK for Java
• Azure Media Services for Node.js
• Azure PHP SDK
Wrapping up: what makes a
Media Service
Media Service Account
Storage Account
AssetAssetAsset
Streaming Endpoint
Streaming Unit
Encoding
Job
Task
Live Streaming
Channel
Program
Creating your with Azure
Youtube
Vimeo
Dailymotion
MP4 Video
Upload and
Create Asset
Media Services
Account
Media Services
Encoding Units
Process
Asset
Subtitles
Thumbnails
manifest
Adaptive bitrate
MP4 video
Media Services
Streaming EndpointsCDN
Azure
Search
WEB APP
<video /> <img /> <input /> <div />
Create Search Account
#only lowercase letters and numbers accepted
$searchdeploymentname = "vitolosearch01"
$dbdeploymentname = "vitotestdb02"
$dbservername = "vitotestdbsrv02"
$dbadminname = "vito"
$dbpassword = Read-Host "Type DB password"
#parameters for creating the search service
$searchparams = @{name=$deploymentname; location=$location; sku= "standard";
replicaCount=1; partitionCount=1}
Switch-AzureMode AzureResourceManager
Add-AzureAccount -Credential $credential
Select-AzureSubscription $subscriptionName
New-AzureResourceGroup –Name $resourcegroupname –Location $location
New-AzureResourceGroupDeployment -ResourceGroupName $resourcegroupname -
nameFromTemplate $searchdeploymentname -DeploymentName $searchdeploymentname -
TemplateFile .Microsoft.Search.1.0.5.json -TemplateParameterObject $searchparams
Create Index
string searchServiceName =
ConfigurationManager.AppSettings["SearchServiceName"];
string apiKey =
ConfigurationManager.AppSettings["SearchServiceApiKey"];
_searchClient = new SearchServiceClient(searchServiceName, new
SearchCredentials(apiKey));
_indexClient = _searchClient.Indexes.GetClient(_moviesIndexName);
_serviceUri = new Uri("https://" +
ConfigurationManager.AppSettings["SearchServiceName"] + ".search.windows.net");
_httpClient = new HttpClient();
_httpClient.DefaultRequestHeaders.Add("api-key", apiKey);
CreateMovieIndex();
CreateMovieIndex()
internal static void CreateIndex(string collectionName)
{
try
{
var definition = new Index()
{
Name = collectionName,
Fields = new[]
{
new Field(“MOVIE_KEY", DataType.String) { IsKey = true,
IsSearchable = false, IsFilterable = false, IsSortable = false, IsFacetable =
false, IsRetrievable = true},
new Field(“MOVIE_DATA", DataType.String) { IsKey = false,
IsSearchable = true, IsFilterable = true, IsSortable = false, IsFacetable =
true, IsRetrievable = true}
}
};
_searchClient.Indexes.Create(definition);
}
catch (Exception ex)
{
Console.WriteLine("Error creating index: {0}rn",
ex.Message.ToString());
}
}
Wrap up: Azure Search
Search Service Client
Collection
Index
Fields
Facets Indexer
Search Query key
Creating your with Azure
Youtube
Vimeo
Dailymotion
MP4 Video
Upload and
Create Asset
Media Services
Account
Media Services
Encoding Units
Process
Asset
Subtitles
Thumbnails
manifest
Adaptive bitrate
MP4 video
Media Services
Streaming EndpointsCDN
Azure
Search
WEB APP
<video /> <img /> <input /> <div />
The web page: Media Player
<link href=“http://amp.azure.net/libs/amp/latest/skins/amp-
default/azuremediaplayer.min.css" rel="stylesheet">
<script src=
“http://amp.azure.net/libs/amp/[version]/azuremediaplayer.min.js"></script>
<video id="vid1" class="azuremediaplayer amp-default-skin" autoplay
controls width="640" height="400" poster="poster.jpg" data-
setup='{"nativeControlsForTouch": false}'>
<source
src="http://amssamples.streaming.mediaservices.windows.net/91492
735-c523-432b-ba01-
faba6c2206a2/AzureMediaServicesPromo.ism/manifest"
type="application/vnd.ms-sstr+xml" />
<p class="amp-no-js"> To view this video please enable
JavaScript, and consider upgrading to a web browser that
supports HTML5 video </p>
</video>
The web page: Search
<html>
<head>
<script src="azure-search.min.js"></script>
</head>
<body>
<script>
var client = AzureSearch({
url: "https://MY_SEARCH_SERVICE_NAME.search.windows.net",
key:"MY_QUERY_KEY"
});
client.search('myindex', {search:'document'}, function(err, results){
// results is an array of matching documents
});
</script>
</body>
</html>
Questions?
Useful links
Azure Media Services Dev Center
http://azure.microsoft.com/en-us/develop/media-services/
Azure Media Services Explorer
http://aka.ms/amse
Azure Media Player
http://aka.ms/azuremediaplayer
Azure Search
https://azure.microsoft.com/en-
us/documentation/articles/search-workflow/
webnextconf.eu

More Related Content

What's hot

Ajax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesAjax Performance Tuning and Best Practices
Ajax Performance Tuning and Best Practices
Doris Chen
 
Security and performance designs for client-server communications
Security and performance designs for client-server communicationsSecurity and performance designs for client-server communications
Security and performance designs for client-server communications
WO Community
 
Gruntwork Executive Summary
Gruntwork Executive SummaryGruntwork Executive Summary
Gruntwork Executive Summary
Yevgeniy Brikman
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
Jeremy Lindblom
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
維佋 唐
 
JavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developersJavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developers
FestGroup
 
JSLounge - TypeScript 소개
JSLounge - TypeScript 소개JSLounge - TypeScript 소개
JSLounge - TypeScript 소개
Reagan Hwang
 
Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019
Adam Tomat
 
OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)
David Bosschaert
 
An Overview of Node.js
An Overview of Node.jsAn Overview of Node.js
An Overview of Node.js
Ayush Mishra
 
Immutable Deployments with AWS CloudFormation and AWS Lambda
Immutable Deployments with AWS CloudFormation and AWS LambdaImmutable Deployments with AWS CloudFormation and AWS Lambda
Immutable Deployments with AWS CloudFormation and AWS Lambda
AOE
 
Log in to a Linux VM in Azure using AAD authentication
Log in to a Linux VM in Azure using AAD authenticationLog in to a Linux VM in Azure using AAD authentication
Log in to a Linux VM in Azure using AAD authentication
Takayoshi Tanaka
 
Node.js and Parse
Node.js and ParseNode.js and Parse
Node.js and Parse
Nicholas McClay
 
Industrializing the creation of machine images and Docker containers for clou...
Industrializing the creation of machine images and Docker containers for clou...Industrializing the creation of machine images and Docker containers for clou...
Industrializing the creation of machine images and Docker containers for clou...
OW2
 
MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise securityMuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
akashdprajapati
 
HTML5와 모바일
HTML5와 모바일HTML5와 모바일
HTML5와 모바일
ACCESS
 
Apache spark with akka couchbase code by bhawani
Apache spark with akka couchbase code by bhawaniApache spark with akka couchbase code by bhawani
Apache spark with akka couchbase code by bhawani
Bhawani N Prasad
 
支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒
Toki Kanno
 
Scale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App FabricScale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App Fabric
Chris Dufour
 
A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)
Nati Shalom
 

What's hot (20)

Ajax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesAjax Performance Tuning and Best Practices
Ajax Performance Tuning and Best Practices
 
Security and performance designs for client-server communications
Security and performance designs for client-server communicationsSecurity and performance designs for client-server communications
Security and performance designs for client-server communications
 
Gruntwork Executive Summary
Gruntwork Executive SummaryGruntwork Executive Summary
Gruntwork Executive Summary
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
 
JavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developersJavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developers
 
JSLounge - TypeScript 소개
JSLounge - TypeScript 소개JSLounge - TypeScript 소개
JSLounge - TypeScript 소개
 
Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019
 
OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)
 
An Overview of Node.js
An Overview of Node.jsAn Overview of Node.js
An Overview of Node.js
 
Immutable Deployments with AWS CloudFormation and AWS Lambda
Immutable Deployments with AWS CloudFormation and AWS LambdaImmutable Deployments with AWS CloudFormation and AWS Lambda
Immutable Deployments with AWS CloudFormation and AWS Lambda
 
Log in to a Linux VM in Azure using AAD authentication
Log in to a Linux VM in Azure using AAD authenticationLog in to a Linux VM in Azure using AAD authentication
Log in to a Linux VM in Azure using AAD authentication
 
Node.js and Parse
Node.js and ParseNode.js and Parse
Node.js and Parse
 
Industrializing the creation of machine images and Docker containers for clou...
Industrializing the creation of machine images and Docker containers for clou...Industrializing the creation of machine images and Docker containers for clou...
Industrializing the creation of machine images and Docker containers for clou...
 
MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise securityMuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
 
HTML5와 모바일
HTML5와 모바일HTML5와 모바일
HTML5와 모바일
 
Apache spark with akka couchbase code by bhawani
Apache spark with akka couchbase code by bhawaniApache spark with akka couchbase code by bhawani
Apache spark with akka couchbase code by bhawani
 
支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒
 
Scale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App FabricScale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App Fabric
 
A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)
 

Similar to Capture, record, clip, embed and play, search: video from newbie to ninja

Playing with php_on_azure
Playing with php_on_azurePlaying with php_on_azure
Playing with php_on_azure
CEDRIC DERUE
 
Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...
Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...
Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...
MUG-Lyon Microsoft User Group
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AI
Hiroshi Tanaka
 
C fowler azure-dojo
C fowler azure-dojoC fowler azure-dojo
C fowler azure-dojo
sdeconf
 
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
Dae Kim
 
Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D...
Windows Azure Web Sites- Things they don’t teach kids in school - Comunity D...Windows Azure Web Sites- Things they don’t teach kids in school - Comunity D...
Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D...
Maarten Balliauw
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
Andrey Karpov
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
Dylan Jay
 
AWS Cyber Security Best Practices
AWS Cyber Security Best PracticesAWS Cyber Security Best Practices
AWS Cyber Security Best Practices
DoiT International
 
Building Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEisBuilding Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEis
FIWARE
 
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShellCCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
walk2talk srl
 
Seguranca em APP Rails
Seguranca em APP RailsSeguranca em APP Rails
Seguranca em APP Rails
Daniel Lopes
 
Cloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSCloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWS
Amine Sadry
 
PHP on Windows and on Azure
PHP on Windows and on AzurePHP on Windows and on Azure
PHP on Windows and on Azure
Maarten Balliauw
 
前端概述
前端概述前端概述
前端概述
Ethan Zhang
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
Anup Hariharan Nair
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
Justin Cataldo
 
Saving Time And Effort With QuickBase Api - Sergio Haro
Saving Time And Effort With QuickBase Api - Sergio HaroSaving Time And Effort With QuickBase Api - Sergio Haro
Saving Time And Effort With QuickBase Api - Sergio Haro
QuickBase, Inc.
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
Kevin DeRudder
 
Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code Suite
Atlassian
 

Similar to Capture, record, clip, embed and play, search: video from newbie to ninja (20)

Playing with php_on_azure
Playing with php_on_azurePlaying with php_on_azure
Playing with php_on_azure
 
Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...
Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...
Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AI
 
C fowler azure-dojo
C fowler azure-dojoC fowler azure-dojo
C fowler azure-dojo
 
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
 
Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D...
Windows Azure Web Sites- Things they don’t teach kids in school - Comunity D...Windows Azure Web Sites- Things they don’t teach kids in school - Comunity D...
Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D...
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
 
AWS Cyber Security Best Practices
AWS Cyber Security Best PracticesAWS Cyber Security Best Practices
AWS Cyber Security Best Practices
 
Building Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEisBuilding Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEis
 
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShellCCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
CCI2018 - Automatizzare la creazione di risorse con ARM template e PowerShell
 
Seguranca em APP Rails
Seguranca em APP RailsSeguranca em APP Rails
Seguranca em APP Rails
 
Cloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSCloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWS
 
PHP on Windows and on Azure
PHP on Windows and on AzurePHP on Windows and on Azure
PHP on Windows and on Azure
 
前端概述
前端概述前端概述
前端概述
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
 
Saving Time And Effort With QuickBase Api - Sergio Haro
Saving Time And Effort With QuickBase Api - Sergio HaroSaving Time And Effort With QuickBase Api - Sergio Haro
Saving Time And Effort With QuickBase Api - Sergio Haro
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code Suite
 

More from Vito Flavio Lorusso

Prestashop and Azure
Prestashop and AzurePrestashop and Azure
Prestashop and Azure
Vito Flavio Lorusso
 
Automatizzare tutto con Azure Resource Manager
Automatizzare tutto con Azure Resource ManagerAutomatizzare tutto con Azure Resource Manager
Automatizzare tutto con Azure Resource Manager
Vito Flavio Lorusso
 
Oltre il Worker Role, da Serverless computing a VM Scale Set
Oltre il Worker Role, da Serverless computing a VM Scale SetOltre il Worker Role, da Serverless computing a VM Scale Set
Oltre il Worker Role, da Serverless computing a VM Scale Set
Vito Flavio Lorusso
 
Nosql why and how on Microsoft Azure
Nosql why and how on Microsoft AzureNosql why and how on Microsoft Azure
Nosql why and how on Microsoft Azure
Vito Flavio Lorusso
 
Cosa non fare assolutamente sul cloud
Cosa non fare assolutamente sul cloudCosa non fare assolutamente sul cloud
Cosa non fare assolutamente sul cloud
Vito Flavio Lorusso
 
Windows azure e il supporto ai paradigmi del cloud
Windows azure e il supporto ai paradigmi del cloudWindows azure e il supporto ai paradigmi del cloud
Windows azure e il supporto ai paradigmi del cloud
Vito Flavio Lorusso
 
Windows Azure and Joomla! @ Joomla day 2013
Windows Azure and Joomla! @ Joomla day 2013Windows Azure and Joomla! @ Joomla day 2013
Windows Azure and Joomla! @ Joomla day 2013
Vito Flavio Lorusso
 
WPC2012 Windows Azure - Architetture e costi nell'era del cloud
WPC2012 Windows Azure - Architetture e costi nell'era del cloudWPC2012 Windows Azure - Architetture e costi nell'era del cloud
WPC2012 Windows Azure - Architetture e costi nell'era del cloud
Vito Flavio Lorusso
 

More from Vito Flavio Lorusso (8)

Prestashop and Azure
Prestashop and AzurePrestashop and Azure
Prestashop and Azure
 
Automatizzare tutto con Azure Resource Manager
Automatizzare tutto con Azure Resource ManagerAutomatizzare tutto con Azure Resource Manager
Automatizzare tutto con Azure Resource Manager
 
Oltre il Worker Role, da Serverless computing a VM Scale Set
Oltre il Worker Role, da Serverless computing a VM Scale SetOltre il Worker Role, da Serverless computing a VM Scale Set
Oltre il Worker Role, da Serverless computing a VM Scale Set
 
Nosql why and how on Microsoft Azure
Nosql why and how on Microsoft AzureNosql why and how on Microsoft Azure
Nosql why and how on Microsoft Azure
 
Cosa non fare assolutamente sul cloud
Cosa non fare assolutamente sul cloudCosa non fare assolutamente sul cloud
Cosa non fare assolutamente sul cloud
 
Windows azure e il supporto ai paradigmi del cloud
Windows azure e il supporto ai paradigmi del cloudWindows azure e il supporto ai paradigmi del cloud
Windows azure e il supporto ai paradigmi del cloud
 
Windows Azure and Joomla! @ Joomla day 2013
Windows Azure and Joomla! @ Joomla day 2013Windows Azure and Joomla! @ Joomla day 2013
Windows Azure and Joomla! @ Joomla day 2013
 
WPC2012 Windows Azure - Architetture e costi nell'era del cloud
WPC2012 Windows Azure - Architetture e costi nell'era del cloudWPC2012 Windows Azure - Architetture e costi nell'era del cloud
WPC2012 Windows Azure - Architetture e costi nell'era del cloud
 

Recently uploaded

Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
elbertablack
 
Use of Ontologies in Chemical Kinetic Database CHEMCONNECT
Use of Ontologies in Chemical Kinetic Database CHEMCONNECTUse of Ontologies in Chemical Kinetic Database CHEMCONNECT
Use of Ontologies in Chemical Kinetic Database CHEMCONNECT
Edward Blurock
 
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
mahigarg2024#G05
 
Software Defined Networking, Concepts and Practical Implementations
Software Defined Networking, Concepts and Practical ImplementationsSoftware Defined Networking, Concepts and Practical Implementations
Software Defined Networking, Concepts and Practical Implementations
Bangladesh Network Operators Group
 
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
paridubey2024#G05
 
Girls Call Shimla 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Shimla 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Shimla 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Shimla 000XX00000 Provide Best And Top Girl Service And No1 in City
dilbaagsingh0898
 
Understanding Threat Intelligence | What is Threat Intelligence
Understanding Threat Intelligence | What is Threat IntelligenceUnderstanding Threat Intelligence | What is Threat Intelligence
Understanding Threat Intelligence | What is Threat Intelligence
Lumiverse Solutions Pvt Ltd
 
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdfTop 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Krishna L
 
Geolocation and Geofeed Implementation bdNOG18
Geolocation and Geofeed Implementation bdNOG18Geolocation and Geofeed Implementation bdNOG18
Geolocation and Geofeed Implementation bdNOG18
Bangladesh Network Operators Group
 
Team Cymru Community Services,Overview of all public services
Team Cymru Community Services,Overview of all public servicesTeam Cymru Community Services,Overview of all public services
Team Cymru Community Services,Overview of all public services
Bangladesh Network Operators Group
 
Rent remote desktop server mangohost .net
Rent remote desktop server mangohost .netRent remote desktop server mangohost .net
Rent remote desktop server mangohost .net
pdfsubmission50
 
Trump Assassination Shirt Trump Assassination Shirt
Trump Assassination Shirt Trump Assassination ShirtTrump Assassination Shirt Trump Assassination Shirt
Trump Assassination Shirt Trump Assassination Shirt
exgf28
 
Portugal Dreamin 24 - How to easily use an API with Flows
Portugal Dreamin 24  - How to easily use an API with FlowsPortugal Dreamin 24  - How to easily use an API with Flows
Portugal Dreamin 24 - How to easily use an API with Flows
Thierry TROUIN ☁
 
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
shamrisumri
 
Web development Platform Constraints.pptx
Web development Platform Constraints.pptxWeb development Platform Constraints.pptx
Web development Platform Constraints.pptx
ssuser2f6682
 
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
ffg01100
 
Network Security version1.0 - Module 3.pptx
Network Security version1.0 - Module 3.pptxNetwork Security version1.0 - Module 3.pptx
Network Security version1.0 - Module 3.pptx
Infotainmentforall
 
Top 50 Data Science Jobs on LinkedIn.docx
Top 50 Data Science Jobs on LinkedIn.docxTop 50 Data Science Jobs on LinkedIn.docx
Top 50 Data Science Jobs on LinkedIn.docx
analyticsinsightmaga
 
My President is bulletproof t shirts hoodie
My President is bulletproof t shirts hoodieMy President is bulletproof t shirts hoodie
My President is bulletproof t shirts hoodie
exgf28
 
Ontology for the semantic enhancement, database definition and management and...
Ontology for the semantic enhancement, database definition and management and...Ontology for the semantic enhancement, database definition and management and...
Ontology for the semantic enhancement, database definition and management and...
Edward Blurock
 

Recently uploaded (20)

Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
 
Use of Ontologies in Chemical Kinetic Database CHEMCONNECT
Use of Ontologies in Chemical Kinetic Database CHEMCONNECTUse of Ontologies in Chemical Kinetic Database CHEMCONNECT
Use of Ontologies in Chemical Kinetic Database CHEMCONNECT
 
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
 
Software Defined Networking, Concepts and Practical Implementations
Software Defined Networking, Concepts and Practical ImplementationsSoftware Defined Networking, Concepts and Practical Implementations
Software Defined Networking, Concepts and Practical Implementations
 
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
Kolkata @Girls @Call WhatsApp Numbers 🫦0000XX0000🫦 List For Friendship Girls ...
 
Girls Call Shimla 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Shimla 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Shimla 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Shimla 000XX00000 Provide Best And Top Girl Service And No1 in City
 
Understanding Threat Intelligence | What is Threat Intelligence
Understanding Threat Intelligence | What is Threat IntelligenceUnderstanding Threat Intelligence | What is Threat Intelligence
Understanding Threat Intelligence | What is Threat Intelligence
 
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdfTop 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
 
Geolocation and Geofeed Implementation bdNOG18
Geolocation and Geofeed Implementation bdNOG18Geolocation and Geofeed Implementation bdNOG18
Geolocation and Geofeed Implementation bdNOG18
 
Team Cymru Community Services,Overview of all public services
Team Cymru Community Services,Overview of all public servicesTeam Cymru Community Services,Overview of all public services
Team Cymru Community Services,Overview of all public services
 
Rent remote desktop server mangohost .net
Rent remote desktop server mangohost .netRent remote desktop server mangohost .net
Rent remote desktop server mangohost .net
 
Trump Assassination Shirt Trump Assassination Shirt
Trump Assassination Shirt Trump Assassination ShirtTrump Assassination Shirt Trump Assassination Shirt
Trump Assassination Shirt Trump Assassination Shirt
 
Portugal Dreamin 24 - How to easily use an API with Flows
Portugal Dreamin 24  - How to easily use an API with FlowsPortugal Dreamin 24  - How to easily use an API with Flows
Portugal Dreamin 24 - How to easily use an API with Flows
 
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
 
Web development Platform Constraints.pptx
Web development Platform Constraints.pptxWeb development Platform Constraints.pptx
Web development Platform Constraints.pptx
 
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
 
Network Security version1.0 - Module 3.pptx
Network Security version1.0 - Module 3.pptxNetwork Security version1.0 - Module 3.pptx
Network Security version1.0 - Module 3.pptx
 
Top 50 Data Science Jobs on LinkedIn.docx
Top 50 Data Science Jobs on LinkedIn.docxTop 50 Data Science Jobs on LinkedIn.docx
Top 50 Data Science Jobs on LinkedIn.docx
 
My President is bulletproof t shirts hoodie
My President is bulletproof t shirts hoodieMy President is bulletproof t shirts hoodie
My President is bulletproof t shirts hoodie
 
Ontology for the semantic enhancement, database definition and management and...
Ontology for the semantic enhancement, database definition and management and...Ontology for the semantic enhancement, database definition and management and...
Ontology for the semantic enhancement, database definition and management and...
 

Capture, record, clip, embed and play, search: video from newbie to ninja

  • 1. Capture Record Clip Embed and play Search Video from newbie to ninja http://creativecommons.org/licenses/by-nc-sa/3.0/ Vito Flavio Lorusso @vflorusso http://github.com/vflorusso
  • 3. Things that kept me busy… 6. CDN 4. Cloud Ingest2. Broadcaster Toronto Facility 3. Encoding 5. Storage & Streaming 7. Immersive Player Client 15 live feeds 1. FIFA Broadcast Facilities
  • 4. H.264 HLS DASH What does “video in the cloud” look like? INGEST ENCODE DELIVER PACKAGE ENCRYPT
  • 5. “This looks complicated… I am just a web developer… and I want my Youtube”
  • 6. Creating the Media Services Account Create a Storage Account New-AzureStorageAccount -StorageAccountName [name] -Label [label] -Location [location] -Type [storage-type] Create a Media Services Account New-AzureMediaServicesAccount -Name [ams-name] - StorageAccountName [stg-name] -Location [location] Create a Media Services Account Get-AzureMediaServicesAccount -Name [ams-accountname]|Format- Table Name, MediaServicesPrimaryAccountKey
  • 7. Creating the CloudMediaContext using Microsoft.WindowsAzure.MediaServices; using Microsoft.WindowsAzure.MediaServices.Client; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; public static CloudMediaContext createAMSContext() { MediaServicesCredentials credentials = new MediaServicesCredentials(amsAccountName, amsAccountKey); CloudMediaContext mediaClient = new CloudMediaContext(credentials); return mediaClient; }
  • 8. Creating your with Azure Youtube Vimeo Dailymotion MP4 Video Upload and Create Asset Media Services Account WEB APP
  • 9. Uploading videos… (1/2) static public IAsset CreateAssetAndUploadSingleFile(CloudMediaContext amsAccount, AssetCreationOptions assetCreationOptions, string singleFilePath) { var assetName = "UploadSingleFile_" + DateTime.UtcNow.ToString(); var asset = CreateEmptyAsset(amsAccount, assetName, assetCreationOptions); var fileName = Path.GetFileName(singleFilePath); var assetFile = asset.AssetFiles.Create(fileName); Console.WriteLine("Created assetFile {0}", assetFile.Name); …
  • 10. Uploading videos… 2/2 var accessPolicy = amsAccount.AccessPolicies.Create(assetName, TimeSpan.FromDays(3), AccessPermissions.Write | AccessPermissions.List); var locator = amsAccount.Locators.CreateLocator(LocatorType.Sas, asset, accessPolicy); Console.WriteLine("Upload {0}", assetFile.Name); assetFile.Upload(singleFilePath); Console.WriteLine("Done uploading of {0} using Upload()", assetFile.Name); locator.Delete(); accessPolicy.Delete(); return asset; } …
  • 11. Creating your with Azure Youtube Vimeo Dailymotion MP4 Video Upload and Create Asset Media Services Account Media Services Encoding Units Process Asset Subtitles Thumbnails manifest Adaptive bitrate MP4 video WEB APP
  • 12. Processing… Encode static public IAsset EncodeToAdaptiveBitrateMP4Set(IAsset asset, string pathToLocalPresetFile) { IJob job = _context.Jobs.Create("Media Encoder Standard Job"); IMediaProcessor processor = GetLatestMediaProcessorByName("Media Encoder Standard"); ITask task = job.Tasks.AddNew("My encoding task", processor, "H264 Multiple Bitrate 720p", TaskOptions.None); task.InputAssets.Add(asset); task.OutputAssets.AddNew("Output asset", AssetCreationOptions.None); job.StateChanged += new EventHandler<JobStateChangedEventArgs>(JobStateChanged); job.Submit(); job.GetExecutionProgressTask(CancellationToken.None).Wait(); return job.OutputMediaAssets[0]; }
  • 13. Processing… Thumbnails <?xml version="1.0" encoding="utf-8"?> <Thumbnail Size="100%,*" Type="Jpeg" Filename="{OriginalFilename}_{Size}_{ThumbnailTime}_{ThumbnailIndex}_{Date}_{Ti me}.{DefaultExtension}"> <Time Value="10%" Step="10%" Stop="95%"/> </Thumbnail> string configuration = File.ReadAllText(Path.GetFullPath(configFilePath + @"Thumbnails.xml")); ITask task = job.Tasks.AddNew("My thumbnail task", processor, configuration, TaskOptions.ProtectedConfiguration);
  • 14. Processing… Subtitles string configuration = string.IsNullOrEmpty(configurationFile) ? "" : File.ReadAllText(configurationFile); ITask task = job.Tasks.AddNew("My Indexing Task", processor, configuration, TaskOptions.None); <?xml version="1.0" encoding="utf-8"?> <configuration version="2.0"> <input> <metadata key="title" value="[Title of the media file]" /> <metadata key="description" value="[Description of the media file]" /> </input> <settings> </settings> <features> <feature name="ASR"> <settings> <add key="Language" value="English"/> <add key="CaptionFormats" value="ttml;sami;webvtt"/> <add key="GenerateAIB" value ="true" /> <add key="GenerateKeywords" value ="true" /> </settings> </feature> </features> </configuration>
  • 15. Creating your with Azure Youtube Vimeo Dailymotion MP4 Video Upload and Create Asset Media Services Account Media Services Encoding Units Process Asset Subtitles Thumbnails manifest Adaptive bitrate MP4 video Media Services Streaming EndpointsCDN WEB APP
  • 16. Creating the Endpoint public static void createStreamingEndpoint(CloudMediaContext amsAccount, string seName) { IStreamingEndpoint amsEndpoint = amsAccount.StreamingEndpoints.Create(seName, 1); amsEndpoint.StartAsync(); }
  • 17. Get the streaming URL (1/2) static string streamSmoothLegacy = "(format=fmp4-v20)"; static string streamDash = "(format=mpd-time-csf)"; static string streamHLSv4 = "(format=m3u8-aapl)"; static string streamHLSv3 = "(format=m3u8-aapl-v3)"; static string streamHDS = "(format=f4m-f4f)"; private static string GetStreamingOriginLocatorEndPoint(CloudMediaContext amsAccount, IAsset assetToStream) { var theManifest = from f in assetToStream.AssetFiles where f.Name.EndsWith(".ism") select f; // Cast the reference to a true IAssetFile type. IAssetFile manifestFile = theManifest.First(); IAccessPolicy policy = null; ILocator originLocator = null; // Create a 30-day readonly access policy. policy = amsAccount.AccessPolicies.Create("Streaming policy", TimeSpan.FromDays(30), AccessPermissions.Read); …
  • 18. // Create an OnDemandOrigin locator to the asset. originLocator = amsAccount.Locators.CreateLocator(LocatorType.OnDemandOrigin, assetToStream, policy, DateTime.UtcNow.AddMinutes(-5)); // Create a full URL to the manifest file. Use this for playback // in streaming media clients. string urlForClientStreaming = originLocator.Path + manifestFile.Name + "/manifest"; // Return the locator. return urlForClientStreaming; } Get the streaming URL (2/2) …
  • 19. Managing Media Services from «code» • Command Line • Windows: PowerShell • Code • Azure Media Services REST APIs • Azure Media Services SDK for .NET • Azure SDK for Java • Azure Media Services for Node.js • Azure PHP SDK
  • 20. Wrapping up: what makes a Media Service Media Service Account Storage Account AssetAssetAsset Streaming Endpoint Streaming Unit Encoding Job Task Live Streaming Channel Program
  • 21. Creating your with Azure Youtube Vimeo Dailymotion MP4 Video Upload and Create Asset Media Services Account Media Services Encoding Units Process Asset Subtitles Thumbnails manifest Adaptive bitrate MP4 video Media Services Streaming EndpointsCDN Azure Search WEB APP <video /> <img /> <input /> <div />
  • 22. Create Search Account #only lowercase letters and numbers accepted $searchdeploymentname = "vitolosearch01" $dbdeploymentname = "vitotestdb02" $dbservername = "vitotestdbsrv02" $dbadminname = "vito" $dbpassword = Read-Host "Type DB password" #parameters for creating the search service $searchparams = @{name=$deploymentname; location=$location; sku= "standard"; replicaCount=1; partitionCount=1} Switch-AzureMode AzureResourceManager Add-AzureAccount -Credential $credential Select-AzureSubscription $subscriptionName New-AzureResourceGroup –Name $resourcegroupname –Location $location New-AzureResourceGroupDeployment -ResourceGroupName $resourcegroupname - nameFromTemplate $searchdeploymentname -DeploymentName $searchdeploymentname - TemplateFile .Microsoft.Search.1.0.5.json -TemplateParameterObject $searchparams
  • 23. Create Index string searchServiceName = ConfigurationManager.AppSettings["SearchServiceName"]; string apiKey = ConfigurationManager.AppSettings["SearchServiceApiKey"]; _searchClient = new SearchServiceClient(searchServiceName, new SearchCredentials(apiKey)); _indexClient = _searchClient.Indexes.GetClient(_moviesIndexName); _serviceUri = new Uri("https://" + ConfigurationManager.AppSettings["SearchServiceName"] + ".search.windows.net"); _httpClient = new HttpClient(); _httpClient.DefaultRequestHeaders.Add("api-key", apiKey); CreateMovieIndex();
  • 24. CreateMovieIndex() internal static void CreateIndex(string collectionName) { try { var definition = new Index() { Name = collectionName, Fields = new[] { new Field(“MOVIE_KEY", DataType.String) { IsKey = true, IsSearchable = false, IsFilterable = false, IsSortable = false, IsFacetable = false, IsRetrievable = true}, new Field(“MOVIE_DATA", DataType.String) { IsKey = false, IsSearchable = true, IsFilterable = true, IsSortable = false, IsFacetable = true, IsRetrievable = true} } }; _searchClient.Indexes.Create(definition); } catch (Exception ex) { Console.WriteLine("Error creating index: {0}rn", ex.Message.ToString()); } }
  • 25. Wrap up: Azure Search Search Service Client Collection Index Fields Facets Indexer Search Query key
  • 26. Creating your with Azure Youtube Vimeo Dailymotion MP4 Video Upload and Create Asset Media Services Account Media Services Encoding Units Process Asset Subtitles Thumbnails manifest Adaptive bitrate MP4 video Media Services Streaming EndpointsCDN Azure Search WEB APP <video /> <img /> <input /> <div />
  • 27. The web page: Media Player <link href=“http://amp.azure.net/libs/amp/latest/skins/amp- default/azuremediaplayer.min.css" rel="stylesheet"> <script src= “http://amp.azure.net/libs/amp/[version]/azuremediaplayer.min.js"></script> <video id="vid1" class="azuremediaplayer amp-default-skin" autoplay controls width="640" height="400" poster="poster.jpg" data- setup='{"nativeControlsForTouch": false}'> <source src="http://amssamples.streaming.mediaservices.windows.net/91492 735-c523-432b-ba01- faba6c2206a2/AzureMediaServicesPromo.ism/manifest" type="application/vnd.ms-sstr+xml" /> <p class="amp-no-js"> To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video </p> </video>
  • 28. The web page: Search <html> <head> <script src="azure-search.min.js"></script> </head> <body> <script> var client = AzureSearch({ url: "https://MY_SEARCH_SERVICE_NAME.search.windows.net", key:"MY_QUERY_KEY" }); client.search('myindex', {search:'document'}, function(err, results){ // results is an array of matching documents }); </script> </body> </html>
  • 30. Useful links Azure Media Services Dev Center http://azure.microsoft.com/en-us/develop/media-services/ Azure Media Services Explorer http://aka.ms/amse Azure Media Player http://aka.ms/azuremediaplayer Azure Search https://azure.microsoft.com/en- us/documentation/articles/search-workflow/