# Sunday, January 31, 2021

Ready Player Two by Ernest Cline continues the story of Wade Watts that began in the author's first novel "Ready Player One" - a novel of the near future that was a huge hit with middle aged nerds.

Wade and his friends are now in control of the largest company in the world. This company that controls the OASIS - a virtual world in which people can escape and live out their fantasies. Wade is rich and famous, but he is not happy. He has lost his girlfriend, has little contact with his friends, and is unpopular with the public and he is to blame for most of his problems. His world turns even worse when a malevolent AI within the OASIS hacks the entire system, trapping millions of users inside and threatening to kill them unless Wade and friends complete a quest to find the Seven Shards.

The hook of this novel is not dissimilar to the earlier one: young people must navigate a virtual world, showing off their video game proficiency and knowledge of late 20th century pop culture to overcome a series of challenges .

There are a couple key differences with the earlier novel: RP2 has a much darker tone than RP1; and there is a narrower focus on pop culture in this one. While RP1 bombarded the reader with an enormous amount of 1980s and 1990s references, RP2 dives deeper into fewer topic topics, such as Tolkien's Middle Earth, the music of Prince, and the movies of John Hughes. The lines between good and evil are less clearly drawn.

I appreciated that this book acknowledges a glaring logic hole in its predecessor. The earlier novel presented the creators of the OASIS as benevolent geniuses trying to build an alternate, better world than the dystopia outside. But it ignored one important corollary: as people spent more time escaping into virtual reality or supporting its infrastructure and economy, they neglected the real world even more, causing contributing to its accelerated deterioration. "Ready Player Two" raises this issue and highlights even more flaws in the OASIS creators. The addictive nature of the virtual world is intensified by the introduction of headsets that offer a more immersive experience by interacting directly with the user's brain waves.

With a film adaptation almost certain, it was difficult to read it without envisioning how it would translate to a big screen with expensive CGI affects.

Ready Player Two presents a familiar formula which will resonate with Cline's fans. We can see the themes Cline is addressing: The corruption of wealth and power; The dangers of addiction; and the inevitable disappointment of hero worship. But the execution lacks the originality and charm of the first book. Still, I found it to be enjoyable escapism.

Sunday, January 31, 2021 8:07:53 PM (GMT Standard Time, UTC+00:00)
# Thursday, January 28, 2021

GCast 101:

Azure Resource Groups

What are the advantages of Azure Resource Groups? How do I create and manage a Resource Group?

Azure | GCast | Screencast | Video
Thursday, January 28, 2021 9:13:00 AM (GMT Standard Time, UTC+00:00)
# Monday, January 25, 2021

Episode 644

Dustin Campbell on Support for WinForms to the Visual Studio Designer

Dustin Campbell recently updated the tooling in Visual Studio to support WinForms and other legacy applications. He describes the challenges in doing so and how he and his team attacked them.

Monday, January 25, 2021 9:07:00 AM (GMT Standard Time, UTC+00:00)
# Saturday, January 23, 2021

William Faulkner's The Sound and the Fury tells the story of the Compsons - a family that once held power, money, and influence in Jefferson, Mississippi. The Compsons have fallen on hard times. One son was born mentally handicapped; another suffered from depression and committed suicide; a third son grew up to be a cynical, greedy, dishonest racist and the family has disowned their promiscuous daughter after the birth of her illegitimate child. An alcoholic father and a hypochondriac mother complete the picture of a family in despair. From southern aristocracy, the Compsons have deteriorated in wealth, social position, and morality.

The book tells the story of the family's fall from grace, but it does so in such a roundabout way that the reader is forced to work hard to understand their fate.

I almost did not finish this novel. There are four chapters and I had to read the first two at least twice before it made any sense to me. The narrative jumps rapidly between time periods - often with no warning other than a change in font, and often with no indication of which time is addressed. It is made more difficult by the fact it is narrated by the childlike Benji. Much of the book is written in first person and the stream of consciousness style makes for challenging reading.

Eventually, a story emerges. Faulkner tells the same events from different points of view and we get a vision of characters as they see themselves and as others see them.

If one can get past the obtuse first half of this novel, this is a satisfyingly dark story of people dealing with loss.

Saturday, January 23, 2021 9:22:00 AM (GMT Standard Time, UTC+00:00)
# Friday, January 22, 2021

In a previous article, I showed you how to upload an asset to an Azure Media Services (AMS) account. In this article, you will learn how to use Azure Media Services to analyze a video.

Navigate to the Azure Portal and to your Azure Media Services account, as shown in Fig. 1.

ams01-OverviewBlade
Fig. 1

Then, select "Assets" from the left menu to open the "Assets" blade, as shown in Fig. 2.

ams02-AssetsBlade
Fig. 2

Select the Input Asset you uploaded to display the Asset details page, as shown in Fig. 3.

ams03-AssetDetails
Fig. 3

Click the [Add job] button (Fig. 4) to display the "Create a job" dialog, as shown in Fig. 5.

ams04-AddJobButton
Fig. 4

ams05-CreateJobBlade
Fig. 5

At the "Transform" field, select the "Create new" radio button.

At the "Transform name" textbox, enter a name to help you identify this Transform.

At the "Description" field, you may optionally enter some text to describe what this transform will do.

At the "Transform type" field, select the "Video and audio analyzer" radio button.

At the "Analysis type" field, select the "Video and audio" radio button.

The "Automatic language detection" section allows you to either specify the audio language or allow AMS to figure this out. If you know the language, select the "No" radio button and select the language from the dropdown list. If you are unsure of the language, select the "Yes" radio button to allow AMS to infer it.

The "Configure Output" section allows you to specify where the generated output assets will be stored.

At the "Output asset name" field, enter a descriptive name for the output asset. AMS will suggest a name, but I prefer the name of the Input Asset, followed by "_Analysis" or something more descriptive.

At the "Asset storage account" dropdown, select the Azure Storage Account in which to save a container and the blob files associated with the output asset.

At the job name, enter a descriptive name for this job. A descriptive name is helpful if you have many jobs running and want to identify this one.

At the "Job priority" dropdown, select the priority in which this job should run. The options are "High", "Low", and "Normal". I generally leave this as "Normal" unless I have a reason to change it. A High priority job will run before a Normal priority job, which will run before a Low priority job.

Click the [Create] button to create the job and queue it to be run.

You can check the status of the job by selecting "Transforms + jobs" from the left menu to open the "Transforms + jobs" blade (Fig. 6) and expanding the job you just created (FIg. 7).

ams06-TransformJobs
Fig. 6

ams07-ExpandJob
Fig. 7

The state column tells you whether the job is queued, running, or finished.

Click the name of the job to display details about the job, as shown in Fig. 8.

ams08-JobDetails
Fig. 8

After the job finishes, when you return to the "Assets" blade, you will see the new output Asset listed, as shown in Fig. 9.

ams09-AssetsBlade
Fig. 9

Click on the link in the "Storage link" column to view the files in Blob storage, as shown in Fig. 10.

ams10-Container
Fig. 10

AMS Analytics produces the following text files:

File Name Contents
annotations.json A set of tags identifying objects and actions at various poinst throughout the video
contentmoderation.json Information at time points throughout the video, indicating if the video contains racy and/or adult content and should be reviewed.
emotions.json An analysis of emotions displayed on the faces in the video
faces.json Details of each face detected in the video at various time points
insights.json A file containing information on faces, OCR, and transcriptions at time points throughout the video
lid.json Spoken languages detected at various time points throughout the video
metadata.json Data about the video and audio tracks, such as format and size
ocr.json The text of any words displayed on screen
rollingcredits.json Information about rolling credits displayed, if any
transcript.ttml A transcription of any spoken text in the video, in Timed Text Markup Language (TTML) format
transcript.vtt A transcription of any spoken text in the video, in WebVTT format

In addition, you will find thumbnail images taken from the video as JPG files or as a ZIP file containing multiple JPG files.

In this article, you learned how to use Azure Media Services to analyze an Audio / Video file

Friday, January 22, 2021 9:45:00 AM (GMT Standard Time, UTC+00:00)
# Thursday, January 21, 2021

GCast 100:

Creating a Screencast

In this video, I walk you through how I create screencasts for this show and publish it online.

Thursday, January 21, 2021 10:38:00 AM (GMT Standard Time, UTC+00:00)
# Wednesday, January 20, 2021

In a previous article, I showed you how to use Azure Media Services to generate a Streaming Locator so that others can view and/or download your video.

In this article, I will show you how to create a web page that allows users to select the format and resolution in which they want to view your video. 

Navigate to the Azure Portal and to your Azure Media Services account, as shown in Fig. 1

ams01-OverviewBlade
Fig. 1

Then, select "Assets" from the left menu to open the "Assets" blade, as shown in Fig. 2.

ams02-AssetsBlade
Fig. 2

Select the Output Asset created by encoding your input video Asset to display the Asset details page, as shown in Fig. 3.

ams03-AdaptiveStreamingAsset
Fig. 3

Verify that the Streaming Locator exists and is running. Start it, if necessary.

Click the "View locator" link to display the "Streaming URLs" dialog, as shown in Fig. 4.

ams04-StreamingUrlsBlade
Fig. 4

Scroll down to the "SmoothStreaming" section shown in Fig. 5.

ams05-SmoothStreaming
Fig. 5

The SmoothStreaming URL points to a file named "manifest", which is an XML document with information on available encoded videos in this asset. A sample of such a document is in Listing 1.

Listing 1:

<?xml version="1.0" encoding="UTF-8"?> 
< SmoothStreamingMedia MajorVersion="2" MinorVersion="2" Duration="110720000" TimeScale="10000000"> 
    < StreamIndex Chunks="2" Type="audio" Url="QualityLevels({bitrate})/Fragments(aac_und_2_127999_2_1={start time})" QualityLevels="1" Language="und" Name="aac_und_2_127999_2_1"> 
        < QualityLevel AudioTag="255" Index="0" BitsPerSample="16" Bitrate="127999" FourCC="AACL" CodecPrivateData="1190" Channels="2" PacketSize="4" SamplingRate="48000" /> 
        <c t="0" d="60160000" /> 
        <c d="50560000" /> 
    </StreamIndex> 
    < StreamIndex Chunks="2" Type="video" Url="QualityLevels({bitrate})/Fragments(video={start time})" QualityLevels="4"> 
        < QualityLevel Index="0" Bitrate="2478258" FourCC="H264" MaxWidth="1024" MaxHeight="576" CodecPrivateData="000000016764001FACD94040049B0110000003001000000303C0F18319600000000168EBECB22C" /> 
        < QualityLevel Index="1" Bitrate="1154277" FourCC="H264" MaxWidth="640" MaxHeight="360" CodecPrivateData="000000016764001EACD940A02FF970110000030001000003003C0F162D960000000168EBECB22C" /> 
        < QualityLevel Index="2" Bitrate="731219" FourCC="H264" MaxWidth="480" MaxHeight="270" CodecPrivateData="0000000167640015ACD941E08FEB0110000003001000000303C0F162D9600000000168EBECB22C" /> 
        < QualityLevel Index="3" Bitrate="387314" FourCC="H264" MaxWidth="320" MaxHeight="180" CodecPrivateData="000000016764000DACD941419F9F0110000003001000000303C0F14299600000000168EBECB22C" /> 
        <c t="0" d="60000000" /> 
        <c d="50333333" /> 
    </StreamIndex> 
< /SmoothStreamingMedia>
  

Notice there are two <StreamIndex> tags: One for the audio and one for the video. The StreamIndex audio tag has only one <QualityLevel> child tag, indicating that there is only one audio option. The StreamIndex video tag has four <QualityLevel> child tags, indicating that there are four video options - each wiht a different size and bitrate.

We can add the SmoothStreaming manifest URL to an HTML <video> tag, as shown in Listing 2.

Listing 2:

                    <video 
                           id="vid1" 
                           class="azuremediaplayer amp-default-skin" 
                           autoplay 
                            controls 
                           width="848" 
                            height="480" 
                           data-setup='{"nativeControlsForTouch": false}'> 
                         <source 
                                src="https://dgtestams-usea.streaming.media.azure.net/77ec142c-e655-41a2-8ddb-a3e46168751a/WIN_20201215_14_28_08_Pro.ism/manifest" 
                                 type="application/vnd.ms-sstr+xml" /> 
                     </video>
  

A full web page is shown in Listing 3:

Listing 3:

<html>
    <head>
        <link href="https://amp.azure.net/libs/amp/latest/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet" />
        <script src="https://amp.azure.net/libs/amp/latest/azuremediaplayer.min.js"></script>
    </head>
    <body>
        <video id="vid1" class="azuremediaplayer amp-default-skin" autoplay controls width="848" height="480" data-setup='{"nativeControlsForTouch": false}'>
            <source src="https://dgtestams-usea.streaming.media.azure.net/77ec142c-e655-41a2-8ddb-a3e46168751a/WIN_20201215_14_28_08_Pro.ism/manifest" type="application/vnd.ms-sstr+xml" />
        </video>
    </body>
</html>
  
  

Fig. 6 shows the output of Listing 3 when viewed in a browser.

ams06-VideoTagInBrowser
Fig. 6

As you can see, clicking the "Quality" icon at the bottom right of the player allows the viewer to select the quality of the video. This is helpful if the user is on a lower bandwidth.

Note that you are charged extra when the Streaming Locator is running, so it is important to stop the Locator if you do not need it.

In this article, you learned how to use the SmoothStreaming URL to add your video to a web page.

Wednesday, January 20, 2021 8:03:00 AM (GMT Standard Time, UTC+00:00)
# Tuesday, January 19, 2021

In a previous article, I showed you how to use Azure Media Services to encode a video.

In this article, I will show you how to generate a URL, allowing others to view your encoded video online.

Navigate to the Azure Portal and to your Azure Media Services account, as shown in Fig. 1

ams01-OverviewBlade
Fig. 1

Then, select "Assets" from the left menu to open the "Assets" blade, as shown in Fig. 2.

ams02-AssetsBlade
Fig. 2

Select the Output Asset created by encoding your input video Asset to display the Asset details page, as shown in Fig. 3.

ams03-AdaptiveStreamingAsset
Fig. 3

Click the [New streaming locator] button (Fig. 4) to display the "Add streaming locator" dialog, as shown in Fig. 5.

ams04-NewStreamingLocatorButton
Fig. 4

ams05-AddStreamingLocatorBlade
Fig. 5

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

At the "Streaming policy" dropdown, select a desired Streaming Policy. A Streaming Policy define streaming protocols and encryption options. There are options to allow for streaming online or downloading and for adding encryption and Digital Rights Management. For this demo, I have selected "Predefined_DownloadAndClearStreaming". This allows users to view the video online and to download it; and it adds no encryption or DRM.

The flowchart in Fig. 7 is from the Microsoft Azure Documentation and will help you decide which Streaming policy is right for you.

ams06-StreamingPolicyFlowchart
Fig. 6

The Streaming Endpoint will not last forever. You must include an expiration date and time. By default, this is set to 100 years in the future. Change this if you want your video to be accessible for a shorter period of time.

Click the [Add] button to add the Streaming Locator.

The dialog will close and return you to the output Assets details page with the Streaming URL filled in, as shown in Fig. 7.

ams07-StartStreamingEndpoint
Fig. 7

The URL is still not accessible until you start the streaming endpoint. Click the [Start streaming endpoint] button and the [Start] button in the popup dialog to enable the endpoint URL, as shown in Fig. 8.

ams08-ConfirmStartStreamingEndpoint
Fig. 8

After doing this, the Streaming locator will show as "STREAMING" on the output Asset details page, as shown in Fig. 9. When the Streaming endpoint is started, you can preview the video from within the Asset details page.

ams09-ViewLocator
Fig. 9

Click the "View locator" link to display the "Streaming URLs" dialog. Select the "Streaming endpoint" from the dropdown, as shown in Fig. 10.

ams10-StreamingUrlsBlade
Fig. 10

Many URLs are displayed in this dialog. For the encoding I selected, the "Download" section contains a JPG URL and several MP4 URLs, as shown in Fig. 11.

ams11-Downloads
Fig. 11

You can paste the JPG URL into a browser to view a thumbnail image from the video. You can paste any of the MP4 URLs into a browser to view or download the full video. The MP4 URLs may differ by their resolution and encoding. Clues about which is which can be found in the name of each MP4. The JSON URLs provide metadata about the video and can be used in applications. For example,
https://dgtestams-usea.streaming.media.azure.net/77ec142c-e655-41a2-8ddb-a3e46168751a/WIN_20201215_14_28_08_Pro_1024x576_AACAudio_2478.mp4
contains a video that is 1024 pixels wide by 576 pixels high and was encoded with Advanced Audio Coding (AAC).

Try each of these in your browser to see the differences.

Note that you are charged extra when the Streaming Locator is running, so it is important to stop the Locator if you do not need it.

In this article, you learned how to create and start a Streaming Locator to make your Azure Media Services video available online.

Tuesday, January 19, 2021 9:46:00 AM (GMT Standard Time, UTC+00:00)
# Monday, January 18, 2021

Episode 645

Kevin Griffin on SignalR Real World Projects

Kevin Griffin describes some real-world applications that he has built using SignalR, including one system that saves lives.

http://signalrmastery.com/

Monday, January 18, 2021 9:05:00 AM (GMT Standard Time, UTC+00:00)
# Sunday, January 17, 2021

When the parents of Miles and Flora died, their uncle did not wish to raise them, so he hired a governess. The governess arrives at rural Bly Manor to find two sweet children - one of whom has been recently expelled from boarding school. She also begins to see spectral characters wandering the estate. The specters appear to be the ghosts of Miss Jessel - the previous governess - and Peter Quint - another employee of the uncle. In life, Jessel and Quint had a close relationship with the children and this relationship seems to continue after their deaths.

Henry James's The Turn of the Screw is a gothic ghost story, told in a mostly straightforward narrative. The young woman arrives and experiences the haunting and tries to protect the children under her care, fearing that they were corrupted by the ghostly couple before and after their deaths. The story is told in the first person with the unnamed governess acting as narrator, so we never know for sure if the ghosts exist outside of her own mind.

The American James does a good job in creating an English story and we get a feel for the gothic atmosphere and the British dialogue.

The author's biggest problem is that he frequently uses ten words to express a thought when five would easily do. As a result, his writing comes across as pretentious. It was difficult for me to get past this and enjoy the story.

Sunday, January 17, 2021 7:58:00 AM (GMT Standard Time, UTC+00:00)