[Music]
hello hello welcome to solving with AWS
solutions your deep dive and
architectures built by AWS that are
ready to deploy instantly in the cloud
I'm Rob your host joined today with the
man who's been faking his accident for
twenty years Tom how are you doing I'm
good thanks Rob hello everybody excited
to be here I have video on-demand on AWS
a reference architecture that
demonstrates how to ingest process and
publish video content on the AWS cloud
so video on-demand is this for
production companies media outlets what
kind of audience would use this any and
all customers looking to deliver their
video assets in the cloud
it could be a customer looking to build
out supply chain deliver content
globally to multiple end users or a
social media platform that wants to
allow users to upload video and needs a
consistent format to host on their
platform sounds pretty good so any and
all customers is what I'm hearing
correct and knowing that we have a broad
audience this is a reference
architecture that can be tailored to
each specific use case awesome let's get
into it
all right tom video on demand how can I
get videos and my dogs online that's
what really matters let's take a look
this is our landing page for the
solution we're going to dig through the
architecture in a second but I also want
to point out we have access to the
source code a link to CloudFormation
template so you can launch it in your
account and a detailed implementation
guide as well awesome let's look at the
architecture for sure so if we step back
a second as we were talking about
earlier there's all the centers around
you single input video multiple versions
coming out okay so I could upload
something from my phone
dogs running through the woods that sort
of thing it is if your dogs yeah I mean
it on s3 and so the first thing is that
video going into s3 okay once we have
that we've built out a workflow where
we've broken this process down into
three distinct pieces we've got ingest
mm-hmm processing and then publishing /
delivery all right and the idea here is
that this is a kind of micro service
approach to building out workflows
video-on-demand workflows in the cloud
so each of those areas are centered
around step functions okay
and backed by the lambda for our compute
let's so
start with ingesting and getting the
video and what happens as part of those
step phones yeah so we upload a video
into s3 and that's going to kick off our
ingest process all right if we take a
look at the actual state machine so this
is step functions that in the console
this is our ingest process so again
orchestration layer is step functions
and then behind each one of these steps
is a lambda function and this was all
part of the CloudFormation template when
you deployed this all deployed through
cloud formation when you launch this so
what steps are we going through so first
thing we're going to do is validate the
input so we've had an object going to s3
we're going to check that we can get
access to it and it's the and the that
workflow is going to be able to get to
that content all right next we're going
to run meteor info that is open source
software that will extract method data
from video files how long is it what
formats are correct yes a number of
audio tracks number video tracks that
type of thing and what do you do with
that info once we've got all of that
information we're going to store that in
dynamos for persistent storage so the
details on the source video where it is
and all of that media info that we've
collected and that info is important
because it helps to understand what
we're gonna do with it we're gonna use
that later on in the workflow yeah all
right so what happens next so lastly in
this process we're going to send out an
SNS notification to our administrators
say file has been uploaded successfully
and then we're going to kick off the
process step function okay so and just
did it now we're gonna process it yep
ingested we've got some metadata about
that file and now we're ready to do our
encoding okay what's happening for the
encoding pause so same again step
functions within that state machine
we're just doing two simple things the
first thing is a profiler step so that's
going to take that metadata that we've
stored in dynamo and it's going to look
at the resolution of the video and based
on the resolution in the video we're
going to set an encoding profile okay so
if the source was 1080 720 540 P that's
what we're gonna use to define how we're
going to encode it
alright so making decisions on the
actual processing based upon what yes so
we we don't want to if you upload a 540
P video you don't want to try and
upscale that to 1080 that's gonna look
good so that's all done through a media
convert and that is all done through
media convert let me take you to
the console we can just take a quick
look out a couple of jobs so this is a
job they submitted through the workflow
is it my dogs it's not your dogs okay
it's I'm afraid we if you have a video
we'll do it later okay
so single file in multiple formats out
and here that here you can see the
outputs that it's creating what kind of
video outputs does that create an
innocence so in this instance we've got
an mp4 output with it was a high-res
video so we've got our three mp4
versions and okay so got all of our HLS
content liesje and all this again was
set up as part of the CloudFormation
template defaults but you could
customize correct the encoding steps are
driven through job templates so these
are the three that we have that were
built by the solution you can customize
these replace them to whatever you need
awesome so then what happens after this
so last step is our publishing process
when elemental has finished encoding the
content it's going to store that in s3
okay we're going to watch for that cloud
what of a cloud watch event so when we
see a signal to say that media convert
is completed that's going to kick off
our publishing step function and that's
just going to go through and validate
that all the content that we were
expecting is there in s3 all right and
then it's going to generate our links
our cloud front link so that we can send
out links to that content and deliver it
just to check to make sure that
everything went as expected right now
we're gonna deliver this content yes a
delivery by default is file stored in s
3 and that fronted by cloud front ok so
what is happening with media package as
part of this so this was a recent
addition to the solution this is an
alternative way of delivering the
content ok so by default what we're
doing is single file in and we're
creating HLS - mp4 and all the bitrate
versions right the different encoding
that that content with media package
what you can do is just create one set
of content ok so we create a single set
of HLS content and then use the media
package to ingest that and it will do
just in time packaging to then convert
that content into all the different
formats that you might need sounds like
a lot of flexibility in the architecture
to deliver a difference so it's great it
means that you there's cost-saving
implication so rather than storing five
different formats as
video in his 3u store one format and
then you only convert that and deliver
it when you need it
that's awesome thanks for walking me
through the steps of what happens as
part of this you're welcome
awesome thanks thanks Tom for talking to
us about video on-demand architecture
today you're welcome Rob and to find out
more about this solution and all our
other solutions please visit our website
awesome thanks
[Music]