# Saturday, 25 August 2018

In an earlier article, I showed how to create an Azure Media Service; then, upload, encode, and share a video with that service.

In this article, I will show how to live-stream video content using Azure Media Services.

You will need to install some streaming software on your computer to do this. I chose Wirecast by Telestream. You can download a free trial at https://www.telestream.net/wirecast/overview.htm. You may use any software you like.

The 3 steps to live streaming with Azure Media Services are:

  1. Configure an Azure Media Service
  2. Stream your content with streaming software
  3. Share the stream

STEP 1: CONFIGURE AZURE MEDIA SERVICE

First, create an Azure Media Service, as described in Step 1 of this article.

Open your Azure Media Service and select "Live Streaming" from the menu to open the "Live Streaming" blade, as shown in Fig. 1.

Fig01-LiveStreamingBlade
Fig. 1

In the "Live Streaming" blade, click the [Quick create] button (Fig. 2) to open the "Quick Create Channel" blade, as shown in Fig. 3.

Fig02-QuickCreateButton
Fig. 2

Fig03-QuickCreateBlade
Fig. 3

At the "Name" field, enter a name for this channel.

Verify that the "Automatically start the channel after creation" checkbox is checked.

Click the [Create] button to create the channel.

After a few minutes, the channel will display with a status of "Running" in the list on the "Live Streaming" blade, as shown in Fig. 4.

Fig04-LiveStreamingChannelList
Fig. 4

NOTE: The Quick Create option creates a channel with RTMP protocol, Pass Through encoding, and no IP restrictions on viewing the stream. This works fine in many cases; but, if you would like different settings, you can click the [Custom create] button instead.

Click the channel in the list to open a blade for that channel's details, as shown in Fig. 5.

Fig05-ChannelDetails
Fig. 5

Note the INGEST URL (Primary) field. You will need this in your streaming software. The icon to the right allows you to copy this value to your clipboard.

Click the [Live event] button (Fig. 6) at the top of the Channel blade to open the "Live Event" blade, as shown in Fig. 7

Fig06-LiveEventButton
Fig. 6

Fig07-LiveEventBlade
Fig. 7

At the "Name" field, enter a name for your Live Event. It must be unique for this channel.

Click the [OK] button to create and start the live event.

PART 2: STREAMING SOFTWARE

You will need to configure your streaming software to stream to Azure Media Service. The instructions below are for Wirecast, but you may use any streaming software you like.

Launch Wirecast.

From the menu, select Output | Output Settings.

If prompted, set the Destination to "RTMP Server" and click [OK], as shown in Fig. 6

Fig08-Destination
Fig. 8

The "Output Settings" window displays, as shown in Fig. 7.

Fig09-OutputSettings
Fig. 9

In the "Address" field, paste the INGEST URL (Primary) value from the Azure Media Service channel blade from Step 1.

The Layers are at the bottom of the Wirecast UI. Select the [+] icon to the left of the first layer, as shown inf Fig. 8.

Fig10-LayerIcon
Fig. 10

In the "Add Shot" dialog, expand video capture and select your front facing camera and click the [Add] button, as shown in Fig. 9.

Fig11-AddShot
Fig. 11

You will see the image from the camera in the Preview window, as shown in Fig. 10

Fig12-PreviewWindow
Fig. 12

NOTE: Alternatively, you may wish to share a screen capture or a different camera or one of the other options.

The image captured from your camera will display in the "Preview" window. Make this the live image by clicking the "Go" button (Fig. 11) below the Preview window.

Fig13-GoButton
Fig. 13

The image will now also appear in the Live window to the right of the Preview window, as shown in Fig. 14

Fig14-PreviewAndLive
Fig. 14

From the menu, select Output | Start/Stop Broadcasting | Start RTMP Server, as shown in Fig. 15.

Fig15-Start Broadcasting
Fig. 15

An error displays if the channel is not running or if you improperly copied the Ingest URL.

PART 3: SHARE YOUR LIVE STREAM

Return to the Azure portal and open the "Live Event" blade, as described above.

Click the [Watch] button (Fig. 16)

Fig16-WatchButton
Fig. 16

If successful, you should see your live stream in a preview window, as shown in Fig. 17.

Fig17-ChannelPreview
Fig. 17

You can share the video by copying the "PLAYBACK URL" into any player. I did so using the Azure Media Player The results are shown in Fig. 18.

Fig18-AzureMediaPlayer
Fig. 18

In this article, I showed you how to use Azure Media Services to live stream a video.

Saturday, 25 August 2018 20:47:56 (GMT Daylight Time, UTC+01:00)
# Thursday, 23 August 2018

GCast 10:

Azure Linux Virtual Machines

Learn how to use the Chocolatey package manager to quickly install Windows applications and their dependencies.

DevOps | GCast | Video
Thursday, 23 August 2018 09:09:00 (GMT Daylight Time, UTC+01:00)
# Wednesday, 22 August 2018

19841984 by George Orwell describes a society in which everything is completely controlled by the government, which is controlled by "The Party". Not only are specific actions illegal, but so are many thoughts. Independent thinking, love, and questioning or even doubting the word of The Party are crimes dealt with in the harshest way. The Party has perfected ways of maintaining its authority.

In the giant country of Oceania, it is illegal to question anything the government says. If they tell you that 2+2=5, you must accept this without question.

Citizens routinely disappear, and all traces of their existence are wiped from the public record. Torture is a  common punishment for transgressions.

The country of Oceania is constantly at war with one of the other two countries in the world. No one has seen the war, but the threat of these enemies justifies oppressive measures against the citizens of Oceania.

Citizens are under constant surveillance - from pervasive electronic devices and from other citizens. Every home contains a Telescreen, that broadcasts party programs and watches and hears everything in the room 24 hours a day; Children are encouraged to inform on their parents and workers to turn in their colleagues.

The Party is developing a new language - "Newspeak", which eliminates dissident ideas by removing words that describe free thought as a way of eliminating the very concepts from the minds of the people.

The Party controls all communications, including newspapers, TV, and books. Books that do not glorify The Party are either destroyed or  rewritten.

When The Party changes its name or breaks a promise, or a prediction proves false, all previous news sources are modified to match the current dogma.

The mission of The Ministry of Truth is to rewrite newspapers and other historical records to match the current position of The Party.

Winston Smith is a low-level bureaucrat working in The Ministry of Truth. He has lost faith in the government, but his fear keeps him playing by its rules. Then, he meets and falls in love with Julia. Together they defy The Party by have a secret affair and, eventually, by plotting to actively work against The Party. Smith even keeps a secret diary of his thoughts and doubts - a serious offense.

Their affair gives them brief hope, but The Party is powerful, and its agents are far-reaching. And they know how to manipulate both actions and thoughts. Winston and Julia try desperately to maintain thier humanity, but The Party is desperate to maintain its power. Suffice it to say this is not a happy love story.

This book has maintained its importance in part because it is believable, despite the extremes of the society. It describes how those in power will do almost anything to maintain that power. Orwell's details are extraordinary. He builds a society with controls in place to suppress the populace completely.

If the book has any weakness, it is when it switches to explicit explanations of how the government is conspiring against its own people. For me, it was sufficient to watch Winston and Julia and the rest of the citizenry experience and suffer from these manipulations. But Orwell felt the need to spend pages detailing his warnings, which seems heavy-handed.

Orwell was a disillusioned ex-socialist and some of the novel touches on the failures encountered in socialist countries, such as shortages of essential goods. But 1984 is less about socialism than it is about the absolute corruption of absolute power.

The year 1984 has come and gone without the global dictatorship predicted by Orwell; but the warning signs listed in the book 1984 continue to haunt us today.

Orwell said, "The Party told you to reject the evidence of your eyes and ears" and we see politicians practicing this now. When people in power argue that "Truth is not truth" or "Alternative facts" are as valid as actual facts or that any news critical of themselves is "Fake news", they are exercising the same techniques about which Orwell warned us.  The concept of Thought Crime is still alive, if punishments are not as harsh as in Oceania. The far-right labels "unpatriotic" black men who peacefully protest; while the far left has successfully ruined the lives of people they deemed politically incorrect.

The bleak, dystopian future that Orwell describes has not come to pass. But its warning signs still exist. And 1984 reminds us that we must remain vigilant to avoid this future.

Wednesday, 22 August 2018 20:10:56 (GMT Daylight Time, UTC+01:00)
# Tuesday, 21 August 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, 21 August 2018 08:58:00 (GMT Daylight Time, UTC+01:00)
# Monday, 20 August 2018
Monday, 20 August 2018 08:25:00 (GMT Daylight Time, UTC+01:00)
# Sunday, 19 August 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, 19 August 2018 23:34:23 (GMT Daylight Time, UTC+01:00)
# Friday, 17 August 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, 17 August 2018 09:44:00 (GMT Daylight Time, UTC+01:00)
# Thursday, 16 August 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, 16 August 2018 08:22:00 (GMT Daylight Time, UTC+01:00)
# Wednesday, 15 August 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, 15 August 2018 09:53:00 (GMT Daylight Time, UTC+01:00)
# Tuesday, 14 August 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, 14 August 2018 09:51:00 (GMT Daylight Time, UTC+01:00)