# Tuesday, August 21, 2018

Azure Media Services allows you to manage video content in a highly-scalable, highly secure way.

Videos and associated files are saved as "Assets" and stored in Azure Blob Storage. You can live stream videos or upload video files from your local system.

In this article, I will walk through the steps to upload, encode, and share a video.

The steps are:

  1. Create a new Azure Media Service
  2. Upload a video
  3. Encode the video
  4. Play the encoded video in the Azure portal
  5. Share the video in another player

Create a new Azure Media Service

The first step is to create a new Azure Media Service. You will need an Azure account to do this.

Navigate to the Azure portal and log in.

Click the [Create a Resource] button (Fig. 1) at the top left of the portal.

Fig01-CreateNewResource
Fig. 1

From the menu, select Mobile | Media Services, as shown in Fig. 2.

Fig02-MobileMediaServices
Fig. 2

The "Create Media Service" blade displays, as shown in Fig. 3.

Fig03-CreateMediaServiceBlade
Fig. 3

At the "Account Name" field, enter a unique name for your Azure Media Service Account.

At the "Resource Group" field, select the "Create new" radio button and enter a unique name for the resource group in which to store this Media Service.

At the "Location" dropdown, select an Azure region that is close to you.

Click the arrow next to the "Storage Account" prompt to expand the "Choose storage account" blade; then, click "Create new" in this blade to display the "Create storage account" blade, as shown in Fig. 4.

Fig04-NewStorageAccount
Fig. 4

Enter a unique name for the storage account in which to store your media assets and click the [OK] button.

Click the [Create] button in the "Create Media Service" blade to begin creating the service. This may take a a minute or so.

Upload a video

After the Media Service is created, open the service and select "Assets" to open the "Assets" blade, as shown in Fig. 5.

Fig05-AssetsBlade
Fig. 5

Click the [Upload] button (Fig. 6) to display the "Upload a video asset" blade, as shown in Fig. 7.

Fig06-UploadButton
Fig. 6

Fig07-UploadAVideoAssetBlade
Fig. 7

Click the Folder icon (Fig. 8) and select a video from your local computer.

Fig08-FolderIcon
Fig. 8

A progress bar indicates when the video has been uploaded. After your video is uploaded, close the "Upload a video asset" blade and  return to the "Assets" blade. The video should now appear in the Asset list, as shown in Fig. 9.

Fig09-AssetList
Fig. 9

Encode the video

In the "Assets" blade list, click on the uploaded video asset to display a property blade for the video asset, as shown in Fig. 10.

Fig10-VideoAssetProperties
Fig. 10

Click the [Encode] button (Fig. 11) to open the "Encode an asset" blade, as shown in Fig. 12.

Fig11-EncodeButton
Fig. 11

Fig12-EncodeAnAssetBlade
Fig. 12

In the "Encoding preset" dropdown, you may select the desired output format, but the default ("Content Adaptive Multiple Bitrate MP4") works well for this demo.

Click the [Create] button to begin encoding.

You can close the property asset blade now.

By staring encoding, you created a new Job for this media service. View this job by selecting "Jobs" in the Media Service blade, which displays the "Jobs" blade, as shown in Fig. 13.

Fig13-JobsBlade
Fig. 13

Note the status of the job you created, which will first be "Queued"; then "Processing"; then "Finished".

When the job is Finished (Fig. 14), close the "Jobs" blade and return to the "Assets" blade, where you should see a new Asset, representing the encoded video.

Fig14-FinishedJob
Fig. 14

Click the encoded asset to open its property page, as shown in Fig. 15.

Fig15-EncodeAssetPropertyPage
Fig. 15

Click the [Publish] button to display the corresponding "Publish the asset" blade, as shown in Fig. 16.

Fig16-PublishTheAsset
Fig. 16

Check the checkbox next to "To begin streaming, start running 'default' streaming endpoint".

Click the [Add] button to publish the encoded video asset.

Play the encoded video in the Azure portal

When the endpoint has started, the [Play] button in the encoded Asset property page is enabled (Fig. 17). Click the [Play] button to open the Media Player blade within the portal, as shown in Fig. 18.

Fig17-PlayButton
Fig. 17

Fig18-MediaPlayer
Fig. 18

Copy the PLAYBACK URL to use in the next step. It will look something like this:

http://dgtestms-usea.streaming.media.azure.net/1acb35e1-373c-481a-b37d-3e0e10394b0a/TelephoneLine.ism/manifest

Share the video in another player

It is unlikely your users will have access to your Azure Portal, so you should send them a link with a player they can use. You can use the free Azure Media Player to share your video.

Navigate to https://ampdemo.azureedge.net/azuremediaplayer.html

The page in Fig. 19 displays.

Fig19-AzureMediaPlayer
Fig. 19

In the URL field, paste your PLAYBACK URL (without the "http://") that you copied from the Azure Portal. It should look something like this:

dgtestms-usea.streaming.media.azure.net/1acb35e1-373c-481a-b37d-3e0e10394b0a/TelephoneLine.ism/manifest

Click the [Update Player] button. Your video should start playing.

To share this video and its players with others, click the [get share url] button and the displayed code. It should look something like this:

https://aka.ms/azuremediaplayer?url=%2F%2Fdgtestms-usea.streaming.media.azure.net%2F1acb35e1-373c-481a-b37d-3e0e10394b0a%2FTelephoneLine.ism%2Fmanifest

You can email this link to others or create a link on your web page.

Click on the dropdown next to the "Code" tab to see other ways to share this video and player.

In this article, I showed you how to upload, encode, and share a video using Azure Media Services.

Azure | Video
Tuesday, August 21, 2018 8:58:00 AM (GMT Daylight Time, UTC+01:00)
# Monday, August 20, 2018
Monday, August 20, 2018 8:25:00 AM (GMT Daylight Time, UTC+01:00)
# Sunday, August 19, 2018

ELOticketIt has been a long time.

Electric Light Orchestra had not played a concert in Detroit in 37 years. And it has been about the same amount of time since an ELO single cracked the US top 40. 

But despite peaking in the studio in the 1970s, enough 50-something rock fans remembered them with enough fondness to pack Little Caesars Arena Thursday night in Detroit.

Only Jeff Lynne remains from the ELO of their heyday; but Lynne was always the face of the band, as the lead singer, songwriter, and producer of most of their songs and albums. At age 70, Lynne looks the same as he did decades ago, his aging face hiding behind long brown curls, a beard, and dark glasses, just as it did during the band's heyday. His voice is still strong, although he delegated some of the lead vocals to another singer.

I made the trek to Detroit from Chicago in large part to reunite with some old high school friends and enjoy a night of memories.

Mr. Lynne did not disappoint. Known for pop melodies over complex arrangements, he brought with him a string section and 4 keyboardists to accompany his rock band and backing vocalists.

ELOinconcertThe set list was strong on the hits of the late 70s. For about 90 minutes, he played songs like "Evil Woman", "Do Ya", "Rockaria", and "Sweet Talkin' Woman" took me back to my high school and junior high school days. The acoustics were surprisingly good for a hockey arena and the sellout crowd responded to each memory the band played. He even played "Handle With Care" from his days with the Traveling Wilburys supergroup, delighting the audience with videos of him recording with Tom Petty, Roy Orbison, George Harrison, and Bob Dylan. ELO closed the set with some of their biggest hits: "Don't Bring Me Down", "Turn to Stone", and "Mr. Blue Sky". They were gone from the stage for barely a minute before returning to play an extended version of Chuck Berry's "Roll Over Beethoven".

For me, it was a chance to reconnect with my past. Old memories, old friends, old songs, and my old home town made Thursday night a special memory.

Sunday, August 19, 2018 11:34:23 PM (GMT Daylight Time, UTC+01:00)
# Friday, August 17, 2018

By default, when I create and launch a UWP app in Visual Studio, a debugging toolbar displays, as shown in Fig. 1.

Fig 1-DebuggingToolbar
Fig. 1

This can be useful during development, but it also can get in the way. It hides elements on my form and it does not look good during a demo.

Suppressing this toolbar is simple, but it took me some time to find it.

From the Visual Studio menu, select Tools | Options, as shown in Fig. 2.

Fig 2-ToolsOptions
Fig. 2

The Options dialog displays. Expand the "Debugging" section on the left and select "General", as shown in Fig. 3

Fig 3-DebugGeneralOptions
Fig. 3

Within the Debugging / General section, clear the checkbox next to "Show runtime tools in application"

Click the [OK] button to apply these changes. The toolbar will not display when you run your project from Visual Studio.

To re-enable this toolbar, open the Options dialog and check the checkbox and click [OK].

Friday, August 17, 2018 9:44:00 AM (GMT Daylight Time, UTC+01:00)
# Thursday, August 16, 2018

GCast 9:

Azure Linux Virtual Machines

Microsoft Azure supports many open source and non-Microsoft technologies, including Linux VMs. Learn how to create and connect to a Linux VM hosted in Azure.

Azure | GCast | Screencast | Video
Thursday, August 16, 2018 8:22:00 AM (GMT Daylight Time, UTC+01:00)
# Wednesday, August 15, 2018

Here is my presentation "Building and Training your own Custom Image Recognition AI" that I delivered in June at NDC-Oslo in Norway.

Building and Training your own Custom Image Recognition AI
Wednesday, August 15, 2018 9:53:00 AM (GMT Daylight Time, UTC+01:00)
# Tuesday, August 14, 2018

ClockworkOrangeA Clockwork Orange by Anthony Burgess is the story of Alex - a juvenile delinquent sociopath living in a dystopian society of the near future. Alex and his friends spend their days and nights  terrorizing anyone they can. Alex fills his life with rape, battery, robbery, and (eventually) murder. In prison, Alex becomes the subject of an experimental treatment that forces him to become violently ill at even the thought of violence or sex. He is released back into the violent society, where he is harmless, but has no way to defend himself.

This book is a morality play - primarily about whether removal of free will is justified if it results in greater lawfulness and whether the needs of society take precedence over the rights of individuals. The message is not subtle. Burgess fills the first third of the book with acts of extreme violence in order to emphasize Alex's corruption. When he is treated and released, his punishment comes quickly, harshly, and very violently.

One of the reasons I love this book is Burgess's creative use of language. It is told in the first person by Alex, who speaks in Nasdat, the slang of  his day. Burgess invented Nadsat by combining English and Russian words ("droog" for "friend"; "golova" for "head") with a bit of cockney rhyming ("pretty polly" for "money") and some childlike phrases ("appy polly loggy" for "apology"). This may slow down the reading as we must infer meaning of words from their context; but it adds a timeless quality to the book that it would not have had the author chosen an existing slang from a specific period. 

This book is not for everyone. The use of Nadsat makes it more difficult than most books of this length. Some readers will not be able to get past the violence. Some may think that, because of Alex's intelligence and charm, Burgess is glorifying him and his violence. But the author uses this violence as a setup for Alex's fall. Alex justifies his ultraviolent lifestyle because he lives in an ultraviolent society. But he takes this logic way too far, contributing mightily to the violence and blaming all his misfortunes on others. Still, he is proved right in a way, as he is completely unable to cope in a world when he becomes incapable of responding with any violence. Alex is a somewhat sympathetic anti-hero, but his soul is clearly corrupted - perhaps beyond redemption.

The book does not take a position on the moral questions it raises - particularly around the rights of individuals versus the safety of society. Clearly, Alex and his droogs were a great threat to their world and citizens feared even to go outside at night. But the government's solution was also a failure, causing them to re-think how they addressed crime.

Burgess himself did not count A Clockwork Orange among his best novels. He claimed he wrote it in just three weeks and he preferred stories with a subtler message.

But I loved it. I loved the language and the style. I loved the scenes that would mirror themselves in the beginning and end of the book. I loved the twisted sense of justice displayed in the story. And I loved how the beauty of the language contrasted so sharply with the ugliness of the actions it was describing. This tension kept me focused throughout the book.

It is a real horrorshow story that remains in the golova of me and my droogs.

Tuesday, August 14, 2018 9:51:00 AM (GMT Daylight Time, UTC+01:00)
# Monday, August 13, 2018
Monday, August 13, 2018 8:41:00 AM (GMT Daylight Time, UTC+01:00)
# Sunday, August 12, 2018

Here is my presentation "How Cloud Computing Empowers a Data Scientist" that I delivered in June at IT Camp in Cluj-Napoca, Romania.

ITCamp 2018 - David Giard - How Cloud Computing Empowers a Data Scientist from ITCamp on Vimeo.

Sunday, August 12, 2018 9:14:00 AM (GMT Daylight Time, UTC+01:00)
# Saturday, August 11, 2018

Here is my presentation “Own Your Own Career – Advice from a Veteran Consultant” that I delivered in June at IT Camp in Cluj-Napoca, Romania.

ITCamp 2018 - David Giard - Own Your Own Career – Advice from a Veteran Consultant from ITCamp on Vimeo.

Saturday, August 11, 2018 8:09:27 PM (GMT Daylight Time, UTC+01:00)