(music)
>> What's up, everybody.
I'm so glad you're here.
I hope you're having a great week
and it's starting off well.
we're going to be playing with a lot of Azure services.
Today, I think before we're done, we will use let's say
Azure Media Services, Azure Functions, Logic Apps.
We'll use Azure Storage.
We'll use Cosmos DB, Video Indexer.
Is that it? That maybe it.
We're going to use six different services,
but there's dozens of them so we're scratching the surface.
Ladies and gentlemen, are you ready?
Let's go do the do.
Do you want to talk about what we're building?
Okay, here's what I'm thinking
and I'm going to get some of you to help me.
Are you ready for this? Okay.
We're going to build a video chat app.
Spoiler, I've already built it and it's deployed
to Heroku waiting on us.
And then I'm going to let a few of you
join in to that video call,
almost like we're in a Zoom call.
But you know, I am from Alabama.
My English is mediocre at best.
If you're from the South,
you probably don't even know what I'm saying.
I get it, thank you for being here anyway.
But what if we were to send that video meeting out
to Azure Media Services
and then we're going to set up a Logic App on Azure.
We're going to watch that stream
and take 60 second clips constantly.
So we're going to clip it.
Every minute we're going to clip that live stream
and send that clip over to Azure Video Indexer.
What?
We're going to use some ML to identify who's in the video.
What topics are they talking about?
What kind of keywords are going on in this conversation?
We'll save that data that Video Indexer gets into Cosmos DB
and then we'll build maybe a View Frontend
that will use the Azure Media Player,
sync it up to that video
that's coming out of Media Services,
but then also behind the scenes be pinging an Azure Function
that will give us that data from Cosmos
for the current time segment that we're in.
So while you're watching the video as a viewer,
it'll be popping up faces of who's on the stream,
what they're saying and what topics they're talking about.
It's an ambitious project, I know.
My only concern in this whole project
is that we accidentally build Skynet.
Anywho, let's do the do.
I've got Azure open, what a coincidence.
I'm going to start off by creating a brand new
resource group that I can destroy after the stream
so that I don't continue to be billed for it.
Although I'll say that the billing on this
is really pretty doggone cheap,
especially now that Cosmos has that sweet, free tier.
What are we going to call it?
Somebody, somebody pick a name.
Surprise string?
That's a good one.
Groupy-mcgroupy? I like that.
Groupy-mcgroupy, I like.
Yeah, let's do that.
That just happens to be available.
Let's see, okay.
So if you're a streamer and you are using Azure,
you should totally have Clarkio's az-mask extension.
Hides all the stuff if you're streaming, it's fantastic.
We need to add a Cosmos, let's add some Cosmos in here.
Sprinkling some Cosmos.
Cosmos is great in this instance.
Let's see, let's see, is this it?
New Cosmos DB.
We're going to name our Cosmos DB, cosmosmccosmos.
That works, I don't need anything fancy.
While that's deploying, let's also create...
We need Cosmos, we need a Logic App and we need...
We need two logic apps actually
and we need some Azure Functions.
Guess who spent a little time making sure
I had an ARM template ready to go?
Okay, so there's cosmosmccosmos.
It's building storagemcstorage.
So we've got our Storage,
we've got our cosmosmccosmos.
Is there anything else we need?
Oh, we need a Media Service.
Media Services.
Created.
Mediamcmedia.
Creating mediamcmedia.
While that's running, I need to go into Cosmos
and finish setting it up.
'Cause I'm going to need a database Yonder collection.
This one I actually think I have a specific name
I need to name it.
So I want to name it Video Indexer DB.
V-I-D-B.
Okay, so that's set up.
Okay, so we got our Cosmos DB ready.
Did our Media Service hit?
Yeah, there's our Media Service.
It's good to go.
We need our Video Indexer
and Video Indexer I've gotta log in.
Sign into Azure. Okay, do it.
Create. Will that work?
Oh no, that probably won't work.
It just dawned on me.
Yeah, that's not going work.
We can change it in a minute.
We need all these functions and different things
to be using this Media Service
so I need them to be talking via a service principal.
So let's go create new.
Let's call it... Create it.
I'm going to open up one of the greatest code editors
of all time, Notepad.
I'm going to move this off stream,
I'm going to move this off as well.
I'm going to create a secret here and just say no,
I'm just going to hit, create new.
There's my secret and then it was closed down right?
There it is. He's in there.
Okay, good to go.
I am going to need his Client ID later.
Okay, let's go back to resourceMcresourcey.
So we've got our Media account, we've got Cosmos,
we've got Storage, we've got our Video Indexer.
We need to change this Video Indexer account though.
This is what I need to change out.
All right, connect.
Cross your fingers.
I guess it worked.
Alright, one of the things I want to be able to do
is as people join today,
I want to be able to recognize them.
So we need to add some models.
Add person.
It just so happens that I've got a folder here
of willing participants,
disregard the fact that I called that folder Victims.
These willing participants who are going to join us later.
Builder Argus.
Okay, got three images uploaded.
Let's add another person.
Rename. Add another person.
These are all Nick's pictures.
Slot those in.
So now when we run these against the Video Indexer,
hopefully it will be able to use their pictures
to get trained and identify them in the video.
We've got Storage, we've got our Media Service.
We've got our streaming endpoint.
We need to turn on. Go ahead and start that up.
Maybe go live streaming.
Let's create a channel. Call it Channel1.
Create that, good to go.
So that is good there, I need to add a program.
Let's call it Program1,
stored in storagemcstorage.
That's turned on.
That's going.
Let's go to the hub of gits because I have forked repo.
Just show me my forks. Look for Azure.
Deploy to Azure please.
Go do the do.
So that repo actually has
several different folders with projects in it
so I'm specifying the one specifically I want to load up.
These are functions that will do the do that we want.
We'll talk about it in a little bit.
Where's my repo?
Okay, so in this, I need to plug in some stuff.
My tenant domain is actually in that.
Alright, we'll see if it builds it.
It should be deploying our Logic Apps.
We need two Logic Apps.
Perfect. It completed successfully.
What?
Almost like we know what we're doing.
We've got to deploy the Logic Apps.
A Dev that uses Azure and ML, your favorite things.
♪ These are a few of my favorite things. ♪
♪ ML and Azure and Functions and Storage. ♪
So then we need our Video Indexer, API key.
Perfect, so we can review and create.
Let's see if it works.
Let's see. Cross your fingers.
Well, that was quick.
There's our Logic Apps.
So our Logic Apps are going to be broken initially.
They're broken because there are certain things
you can't have preset in your code.
As in, hey, what region are you keeping this?
What's your Account ID to the Video Indexer?
So that's work we've got to go in and fix on all these.
You just serve it in the house what?
All right, save that.
There's Video Indexer right there.
Over immediate in the Indexer,
I'm getting a thing, there's a problem with your connection.
Update the connection.
I feel like I've updated it a hundred times at this point.
Okay, if I refresh this, did I get a connection?
It's running? It's running.
Okay, the end point is running.
Channel's running.
Great, great, great.
Let's go, let's go try it again.
One more again.
Go, go, gadget connect.
Okay, is it going to show up over here?
It doesn't like to be connected to that.
So well, I won't show the URL,
but you can see that I am in a different window
in my Heroku app.
Here I need to put in an RMTP feed.
That's what I want.
Copy that to the clipboard, plug that in.
Start broadcast.
Okay, yeah that's right.
And so no, mute the audio.
And then some folks I had talked to
about joining in on this fun,
I'm going to send them the link
so they can join in on the action.
I am in a session here, my RTMP stream is live.
This should start receiving some video.
What the what?
Just like that.
That's my RTMP stream coming into Azure,
into this channel and program.
>> VoiceOver: So, I am in a session here.
>> What the?
>> VoiceOver: My RTMP stream is live.
>> We mute that.
We have some friends joining us soon and when they come in,
it should start showing up in this window.
There's Mary Jo.
There's Builder Argus.
So this is a little bit delayed.
Oh, there we go.
So somebody else joined.
There's Nick, tell him I'm going to guess that gray box
at the bottom is Rambling Geek.
I'm watching about 30 seconds behind the live feed.
Coming here, I'm going to look at this Logic App
and let's see if the Logic App is firing.
See video's coming in, but the Logic App is failing.
Let's go find out why?
We've somehow gotten logged out of Video Indexer.
That's another feedback item.
Let me get my pen and my paper.
If you have any interest at all at becoming an MVP,
this is the kind of feedback.
Like hey, on the Video Indexer,
it was logging me out apparently
and never changed the screen.
Good feedback.
They can go fix that for other people.
So we are connected to mediamcmedia, Video Indexer, API key.
Ah, that I do know. That's in here.
Let me go get it.
Please hold and the next available streamer
will be with you shortly.
There we go, perfect.
And that is the right...
...that's the right location, that's the right account.
So let's get out of this and I think I minimized it.
But I think we've still got our video session going right?
Oh, video session.
Once it trains on those pictures,
they'll start showing up here.
But it's already trained on Nick,
it's already trained on Rambling Geek.
It's trained on me, trained on Mary Jo
and it's trained on Builder Argus.
Alright, let's see if our Logic App
is succeeding or failing still.
Still failing.
I'm going to get out of this.
I'm going to go into the Media Service,
go look at our channel and make sure our channel
is still doing the do.
Looks like it's doing the do to me.
So there's a little delay as you'd expect.
I mean, it's going through one service
to get a lowered Azure speed service
and then coming here, so there's a delay.
So is our function, our Logic App firing?
Look at that.
It picked up five minutes later, but it failed.
Why did it fail now?
Zero running, zero waiting. Running.
Okay, so it's got one running.
>> Announcer: Oh my!
>> Could we have fixed it?
Let's see if that runs or fails.
While this is running, I'm going to go open up
the live stream for a second.
Let's go look at live streaming.
Let's go look at that program just so you can see
what these people are doing.
Rambling Geek has changed so much
just in the course of this stream.
I've always thought that Rambling Geek was an animal,
little did I know, he's a bear.
The bear.
Let's see and technically, we're not running a live now.
We're running about 40...
...this is running about 40 seconds behind live.
Let's see if this is...
Look it succeeded!
This is such a software developer thing.
Let me ask you in chat, okay.
Are you ready for this?
If something's going wrong in a program,
whether you wrote it or not, what's the answer?
What's the first thing you do?
Comment all the tests?
Not even an app like necessarily that you wrote.
Hey, something's going wrong with my computer.
What do I do?
Something wrong with your computer?
Turn it off and on again, right?
Something's some squirrelly with this app.
Let me close it and restart it.
Turn it on and off again.
You restart the app.
Did you see what change we made to make it go green?
That was way too simple.
We're not trying to be complex.
What happened between those and the succeeded?
This Get Account Access Token.
Those two values were exactly the same
on all those other 12.
All I did was changed this dropdown to another one
that I knew was wrong, hit save,
and then changed it back to the run I knew it was right
and hit save again.
And look at that, since I've done it succeeded, succeeded.
Okay. let's go look at Azure.
Oh, Azure.
What I really want to see is the sample response.
That's kind of what we're going to build right there.
It's going to have a breakdown of insights.
Insight, this is exactly what we're going to be looking at.
And what's really neat about it is it can not only show,
like if we looked in the Indexer
at our picked people we loaded pictures of,
so that it could learn, build models for those people.
It won't always just show
like Rambling Geek's picture like that,
it'll show us a thumbnail of the picture in the video.
What we're doing is sending every one of those
one minute clips that we're doing every minute,
we're sending that clip to Indexer saying,
give us all this data for that minute.
Tell us your secrets, Indexer.
This is one video stream,
but what you don't see off screen is this window.
This is my view.
I'm logged in as the host.
So right now, we've got the video streaming,
we are running the Function,
we should be saving data to a Cosmos,
there's cosmosmccosmos.
Oh yeah, look at all that beautiful data, faces.
Look at this, look at the faces though in the feed.
Nick's Mad Science.
92% certain it saw Nick.
All the times it found me.
Who else did you find?
You found Builder Argus.
It found a television.
Yeah, yeah, yeah.
Look behind Nick back here. Television.
Yeah, so we're capturing all kinds of data.
Okay, let's go create a frontend for it.
Let's go npm init.
And then let's go npm i express.
We may not need anything else.
Minimize this.
npm run start.
Holy re holy. This is the moment of truth.
Are you ready for this?
Well, I'm not broadcasting.
What the heck? Refresh.
I love that Nick's asleep.
That absolutely makes my day that he's sitting there,
like with his shades on, like conked out.
(laughing) That is amazing.
Is there anything going on?
Oh yeah, look at that.
Hello, if you're a software developer today
and you work with Functions or other API calls,
you are familiar with the disease that has persisted
through the Internet for a long time now called CORS.
Not coronavirus, CORS.
It is the bane of all of our existences.
We need to go set up some CORS rules to let us in.
Awesome. Saved. Let's come over here.
I'm going to refresh this page.
Look at that, it's trying to get data.
Is it getting data?
It's failing on that Azure Function.
Well, we're in luck. We're in luck.
We don't have to solve this right now,
we can keep going next time.
Try again next time.
In the mean time, thank you to these jive turkeys.
Thank you all for hanging out with me today.
Holy moly, we have learned a lot of stuff today.
We've played with Media Services.
We've played with Video Indexer.
We've played with Logic Apps.
We've played with Functions.
We've played with Azure Storage.
We've played with Cosmos DB.
Listen, thank you all again for hanging out.
I'll catch you on the flippity-flop.
Peace.