I'm standing in Victoria station in London, and as you can see,
there is massive competition for Wi-Fi connectivity.
Just standing in the same place, signal strength
is all over the place.
Now, any kind of connectivity is problematic
in these circumstances.
Delivering a really good video experience,
that could be a headache.
What can we do about it?
Let's head back to the studio and find out.
For video and audio streaming, the web
provides access to over three billion devices.
Well, as you know, connectivity can be flaky and changeable,
and bandwidth is often limited.
To cope with real world connectivity,
we have an open standard for video streaming and download
called DASH.
With DASH, you deliver video in segments over a normal HTTP
connection.
Each segment is made available at a variety of bit rates,
resolutions, and formats.
Depending on the bandwidth and device capabilities,
the client chooses the best possible version.
DASH does what it says.
Dynamic, Adaptive, Streaming, and Download.
And HTTP enables content delivery
with all the advantages of HTTP, without the disadvantages
of a traditional streaming server.
No proprietary protocols or hardware required.
So, what's the best way to do DASH on the web?
Let's find out.
Rolling your own adaptive video solution can be complex.
Shaka Player is a simple-to-use JavaScript library from Google
that enables you to deliver the best possible video
and audio to a cheap, low-res phone on 3G
or a high-spec laptop on gigabit fiber and everything
in between.
Shaka is plug-in free and built on web standards,
so it works on billions of devices.
Let's dive straight in and build a video player with Shaka.
First up, install polyfills for legacy browsers.
Then create a Shaka Player for the video element on the page,
and add an error handler in case something goes wrong.
Provide the address of the DASH manifest.
Now, this is the XML file that describes the alternatives
for each segment of video.
One thing you'll notice from the manifest
is that DASH enables alternative formats for the same content
and bit rate, in this example, WebM, as well as MP4.
Now, that's great for media delivery to a range of devices.
Next, we create a bandwidth estimator,
using the Shaka utilities.
And this is crucial for dynamically
adapting to network conditions.
And finally, load all that in the Shaka Player.
And that's it, adaptive streaming
in just a few lines of code.
Now, on the back end, you'll need
to encode and package your content ready for streaming.
There are several open source tools available,
which can be used to convert content to a valid segmented
file and generate a manifest.
To find out more about DASH packaging and encoding,
take a look at the links at the end of the video.
Shaka Player also enables delivery of protected content,
using the EME APIs to get licenses and do decryption.
And Shaka supports multi-lingual content
for audio tracks and subtitles.
The best way to learn more about Shaka's capabilities
is to download the Shaka Project.
Run the build tools, which create example apps
and optimize the JavaScript code.
On Linux and Mac systems, run all .sh.
The documentation has more information
about building on Windows.
I'd recommend you look through the HTML and JavaScript
for the Shaka test app.
The Shaka GitHub repo has other resources
to help you get started.
There are several excellent tutorials
and a test app that exercises all the capabilities of Shaka
Player.
If you find bugs or have feature requests,
please file issues on the repo.
Thanks for watching.
See you there.
[MUSIC PLAYING]