Posted:
YouTube Sentiment Analysis Demo
Cindy 3 hours ago
I wish my app could manage YouTube comments.

Ibrahim 2 hours ago
Then it's your day today. With the new YouTube Data API (v3) you can now have comments in your app. Just register your application to use the v3 API and then check out the documentation for the  Comments and CommentThreads resources and their methods.

Andy 2 hours ago
+Cindy R u still on v2? U know the v2 API is being deprecated on April 20, and you’ve updated to v3 right?

Andy 1 hour ago
+Ibrahim I can haz client libraries, too?

Ibrahim 30 minutes ago
Yes, there are client libraries for many different programming languages, and there are already Java, PHP, and Python code samples.

Matt 20 minutes ago
My brother had a python and he used to feed it mice. Pretty gross!

Cindy 10 minutes ago
Thanks, +Ibrahim. This is very cool. The APIs Explorer lets you try out sample calls before writing any code, too.

Ibrahim 5 minutes ago
Check out this interactive demo that uses the new comments retrieval feature and Google Prediction APIs. The demo displays audience sentiment against any video by retrieving the video's comments and feeding them to the Cloud Prediction API for the sentiment analysis.

Posted:

As more people watch more high-quality videos across more screens, we need video formats that provide better resolution without increasing bandwidth usage. That’s why we started encoding YouTube videos in VP9, the open-source codec that brings HD and even 4K (2160p) quality at half the bandwidth used by other known codecs.

VP9 is the most efficient video compression codec in widespread use today. In the last year alone, YouTube users have already watched more than 25 billion hours of VP9 video, billions of which would not have been played in HD without VP9's bandwidth benefits. And with more of our device partners adopting VP9, we wanted to give you a primer on the technology.

How VP9 works

Videos hold a lot of information. If video were stored in the same format that a camera sensor uses when shooting a scene, the resulting files would be enormous — raw 4K is up to 18,000 Mbps! Instead, modern video compression looks at a video more like a person might, by encoding a description of the features in a scene, and tracking how those features move and change. This compression is hundreds of times more efficient than a camera sensor's recording and is what makes video streaming possible.

While VP9 uses the same basic blueprint as previous codecs, the WebM team has packed improvements into VP9 to get more quality out of each byte of video. For instance, the encoder prioritizes the sharpest image features, and the codec now uses asymmetric transforms to help keep even the most challenging scenes looking crisp and block-free.

Here's a comparison between the image quality you'd get watching Janelle Monaé with VP9 or legacy H.264 transcodes on a 600Kbps connection:

View: VP9H.264Combined

Bringing quality to the people

This new format bumps everybody one notch closer to our goal of instant, high-quality, buffer-free videos. That means that if your Internet connection used to only play up to 480p without buffering on YouTube, it can now play silky smooth 720p with VP9.

VP9 also has benefits for people with limited bandwidth or expensive data plans. By cutting bitrates in as much as half, it dramatically increases the set of users that can watch 360p quality video without increased rebuffering or cost.

Reduced time spent watching low quality formats thanks to VP9

Opening the door to 4K

And for those who can never get enough pixels (including your humble author!), VP9 unlocks the burgeoning world of 4K videos. At larger video sizes, VP9 actually gets even more efficient than its predecessors, so uninterrupted 4K content can now be streamed by a significant and growing part of the YouTube audience. The amount of 4K video uploaded to YouTube has more than tripled in the past year, and VP9 helps us plan for improved streaming into the future. You can find 4K videos by using the search filter, or see some of our favorites in this playlist.

Where can I use VP9?

Thanks to our device partners, VP9 decoding support is available today in the Chrome web browser, in Android devices like the Samsung Galaxy S6, and in TVs and game consoles from Sony, LG, Sharp, and more. More than 20 device partners across the industry are launching products in 2015 and beyond using VP9.

To learn more about producing your own VP9 content, see our FFMpeg encoding guide or check out the Adobe Premier WebM plugin.

Steven Robertson, Software Engineer, recently watched “St. Lucia - Before The Dive.”

Posted:
[Cross-posted from the Google Cloud Platform Blog

Your new website is growing exponentially. After a few rounds of high fives, you start scaling to meet this unexpected demand. While you can always add more front-end servers, eventually your database becomes a bottleneck, which leads you to . . .

  • Add more replicas for better read throughput and data durability
  • Introduce sharding to scale your write throughput and let your data set grow beyond a single machine
  • Create separate replica pools for batch jobs and backups, to isolate them from live traffic
  • Clone the whole deployment into multiple datacenters worldwide for disaster recovery and lower latency

At YouTube, we went on that journey as we scaled our MySQL deployment, which today handles the metadata for billions of daily video views and 300 hours of new video uploads per minute. To do this, we developed the Vitess platform, which addresses scaling challenges while hiding the associated complexity from the application layer.

Vitess is available as an open-source project and runs best in a containerized environment. With Kubernetes and Google Container Engine as your container cluster manager, it's now a lot easier to get started. We’ve created a single deployment configuration for Vitess that works on any platform that Kubernetes supports.

In addition to being easy to deploy in a container cluster, Vitess also takes full advantage of the benefits offered by a container cluster manager, in particular:

  • Horizontal scaling – add capacity by launching additional nodes rather than making one huge node
  • Dynamic placement – let the cluster manager schedule Vitess containers wherever it wants
  • Declarative specification – describe your desired end state, and let the cluster manager create it
  • Self-healing components – recover automatically from machine failures

In this environment, Vitess provides a MySQL storage layer with improved durability, scalability, and manageability.

We're just getting started with this integration, but you can already run Vitess on Kubernetes yourself. For more on Vitess, check out vitess.io, ask questions on our forum, or join us on GitHub. In particular, take a look at our overview to understand the trade-offs of Vitess versus NoSQL solutions and fully-managed MySQL solutions like Google Cloud SQL.

-Posted by Anthony Yeh, Software Engineer, YouTube

Posted:
Nah man, my mom is on v2.

Your YouTube integration is important; but, do you know if you are still on the soon-to-be-retired v2 API or taking advantage of many new features that the new Data API v3 offers, like “video ratings,” “in-video promotions” and “channel sections?”

Retirement plan
In March 2014, we announced that the v2 API would be retired in April 20, 2015, and would be shut down soon thereafter. To help you with your migration, we launched the migration guide in September. Now, we’d like to provide you with more details on the plan to retire v2.

To make sure that you’ve migrated everything over before fully shutting off the v2 API, we’ll perform the first of what we call “blackout tests” for the v2 API in the coming weeks, where we’ll shut down the v2 API for a limited period of time. The blackout tests, which will take place on different days of the week and at varying times of day, are meant to help you better understand the impact the retirement will have on your applications and users.

Most of the v2 requests during the blackout window will be responded to with a HTTP 410 Gone. If you want to test your application’s reaction to this response, point it at eol.gdata.youtube.com instead of gdata.youtube.com.

How you can migrate
Check out the frequently asked questions and migration guide for the most up-to-date instructions on how to update specific features to use the new API. The guide now lists all of the v2 API functionality that is being deprecated and won't be offered in the v3 API. It also identifies a couple of features that we're migrating but still working on, like “captions” and “comments”. And, finally, it includes updated instructions for a few newly migrated features, like “browser-based uploading” and “language relevant search”.

Migration Guide

Once you’re done with that, join the rest of the folks who’ve migrated, kick back and enjoy this.

Posted:
Four years ago, we wrote about YouTube’s early support for the HTML5 <video> tag and how it performed compared to Flash. At the time, there were limitations that held it back from becoming our preferred platform for video delivery. Most critically, HTML5 lacked support for Adaptive Bitrate (ABR) that lets us show you more videos with less buffering.

Over the last four years, we’ve worked with browser vendors and the broader community to close those gaps, and now, YouTube uses HTML5 <video> by default in Chrome, IE 11, Safari 8 and in beta versions of Firefox.

The benefits of HTML5 extend beyond web browsers, and it's now also used in smart TVs and other streaming devices. Here are a few key technologies that have enabled this critical step forward: 

MediaSource Extensions
Adaptive Bitrate (ABR) streaming is critical for providing a quality video experience for viewers - allowing us to quickly and seamlessly adjust resolution and bitrate in the face of changing network conditions. ABR has reduced buffering by more than 50 percent globally and as much as 80 percent on heavily-congested networks. MediaSource Extensions also enable live streaming in game consoles like Xbox and PS4, on devices like Chromecast and in web browsers.

VP9 video codec
HTML5 lets you take advantage of the open VP9 codec, which gives you higher quality video resolution with an average bandwidth reduction of 35 percent. These smaller files allow more people to access 4K and HD at 60FPS -- and videos start 15-80 percent faster. We've already served hundreds of billions of VP9 videos, and you can look for more about VP9 in a future post.

Encrypted Media Extensions and Common Encryption
In the past, the choice of delivery platform (Flash, Silverlight, etc) and content protection technology (Access, PlayReady) were tightly linked, as content protection was deeply integrated into the delivery platform and even the file format. Encrypted Media Extensions separate the work of content protection from delivery, enabling content providers like YouTube to use a single HTML5 video player across a wide range of platforms. Combined with Common Encryption, we can support multiple content protection technologies on different platforms with a single set of assets, making YouTube play faster and smoother.

WebRTC
YouTube enables everyone to share their videos with the world, whether uploading pre-recorded videos or broadcasting live. WebRTC allows us to build on the same technology that enables plugin-free Google Hangouts to provide broadcasting tools from within the browser.

Fullscreen
Using the new fullscreen APIs in HTML5, YouTube is able to provide an immersive fullscreen viewing experience (perfect for those 4K videos), all with standard HTML UI.

Moving to <iframe> embeds
Given the progress we've made with HTML5 <video>, we’re now defaulting to the HTML5 player on the web. We're also deprecating the "old style" of Flash <object> embeds and our Flash API. We encourage all embedders to use the <iframe> API, which can intelligently use whichever technology the client supports.

These advancements have benefitted not just YouTube’s community, but the entire industry. Other content providers like Netflix and Vimeo, as well as companies like Microsoft and Apple have embraced HTML5 and been key contributors to its success. By providing an open standard platform, HTML5 has also enabled new classes of devices like Chromebooks and Chromecast. You can support HTML5 by using the <iframe> API everywhere you embed YouTube videos on the web. 

Richard Leider, Engineering Manager, recently watched, “Ex Hex - Waterfall.”

Posted:
A billion people watch zillions of hours of YouTube video on devices all over the world. Underneath the hood, the magic that makes YouTube isn’t really magic at all—it’s serious engineering at unparalleled scale.

To bring you closer to the people and projects that make YouTube tick, we’re launching the YouTube Engineering and Developers Blog. About once a month, expect to see behind-the-scenes explanations, tools and tips for developers, and explanations of the most fundamental and interesting technical challenges at YouTube.

We look forward to hearing what you think about these topics, so please let us know in the comments or with a video!

Posted:

With the new YouTube WatchMe for Android project, you can easily integrate YouTube Live Streaming into your Android app. YouTube WatchMe brings your app the same live broadcasting capabilities that you've seen in great apps like Live on YouTube – by Xperia™ and Re – by HTC.



YouTube WatchMe for Android is an open-source project that uses the YouTube Data API v3, YouTube Live Streaming API, Google Play Services and Plus API. You can customize it for your app, and you can also contribute to the project by filing merge requests for new features or submitting bug reports.


How to start using the app
  1. Sync the Github repo
    1. Enable the Youtube Data API v3 and Google+ API.
    2. Create a client ID for Android, using your SHA1 and package name.
  2. Include cross-platform compiled streaming libraries.
Either
  • libffmpeg.so under src/main/jniLibs/armeabi,
or
  • another streaming library with modifying VideoStreamingInterface

Main Activity
Main Activity
YouTube player
Live Streaming Activity
This App is still experimental, so stay tuned here and subscribe to the YouTube for Developers channel to keep up on the latest.


Cheers,

Ibrahim Ulukaya, and the YouTube API Team