Building Professional Video Sites with YouTube APIs

January 1, 2012 · Leave a Comment
Filed under: Featured, YouTube 

Using video on your website can add greater depth and richness for your audience. However, to do encoding, hosting and streaming right it takes some time and skill. If you’re lacking in either, here are some suggestions for sites that make it easy to help you setup video-based websites.

VidCaster is a video content management system, whose goal is to make building a website with video as easy as possible.

VidCaster makes use of custom URLs, video sitemaps, metadata, and thumbnails to integrate well with search engines. They provide lots of features to customize your video site, like uploading a logo, picking a theme and choosing custom colors, and you can even upload custom CSS. Using their video management interface, you can publish, unpublish and delete videos. VidCaster can even distribute the videos from your video site to third-party sites such as YouTube and Twitter, and they can also integrate analytics from third-party sources.

VidCaster uses OAuth2 with the YouTube API to manage the user’s YouTube account, using both SUP (Simple Update Protocol) and polling to make sure a user’s video site is always in sync with their YouTube channel. Companies that use VidCaster include AirBnB, Hackers and Founders, and Dirtcast.

By integrating closely with YouTube’s data API, VidCaster makes it easy for users to take advantage of YouTube’s video service from within their own custom video site.

Moviecom.tv tries to make it easy for businesses to build video sites about their company.




Like VidCaster, Moviecom.tv provides users with a variety of features to customize their video site. They too show videos hosted on YouTube, but their integration with YouTube doesn’t yet include all the features that VidCaster does — for instance, Moviecom.tv can show YouTube videos using the iframe player, but they haven’t yet integrated with YouTube’s data API. This is something they plan on doing early in 2012. Moviecom.tv also touts their mobile application which takes the friction out of recording and uploading video to the right place.

And they’re doing well at it — they were recently named a Red Herring Global 100 Winner. Internet World, City Index, and Staples are all example sites created using their platform:

Companies like VidCaster and Moviecom.tv are a welcome part of the online video ecosystem. As Moviecom.tv CEO Gillian O’Neil once noted, Moviecom.tv isn’t competing with YouTube. By enabling third-party video sites to embed YouTube videos, YouTube isn’t trying to get a bigger piece of the pie. They’re making the pie bigger.

Cheers,
—Shannon -jj Behrens, YouTube API Team

YouTube’s HTML5 Player Gets Better

November 21, 2011 · 1 Comment
Filed under: Featured, YouTube 

YouTube’s HTML5 player has improved a lot lately and it’s almost ready to replace the Flash player. You can enable annotations and captions, the contextual menu lets you copy the embedding code and the video’s URL, YouTube now offers 480p and 1080p options for WebM videos and there’s native full-screen support if you use a Firefox nightly build or Chrome’s dev channel.

I’ve also noticed that sometimes embedded videos use the HTML5 player even if you’ve already installed Flash and you haven’t enabled the HTML5 trial.

YouTube’s Google+ Player

November 6, 2011 · Leave a Comment
Filed under: Featured, Google, YouTube 

Google+ added a small YouTube icon that’s always displayed next to the scrollbar. When you mouse over the icon, you’ll see a search box that asks you “what would you like to play?”. Type your query and Google+ opens a pop-up window with 20 search results. It’s actually a playlist and videos start playing automatically.


You can +1 a video you like or share it with your circles. When you share a video, Google also adds a link to a playlist with related videos.

The nice thing is that you can minimize the pop-up window and still be able to pause a video or go to the next video directly from Google+. This is especially useful for music.

“It’s no secret that YouTube is filled with tons of great content (from inspiring speeches to music videos to honey badgers). We wanted to bring YouTube directly into Google+ — as well as make it easier to watch and share your favorites — so we’re launching a YouTube ‘slider’ in the stream,” mentions Google’s Vic Gundotra.

What about a Google Music player?

{ Thanks, Thomas, Benjamin and Herin. }

YouTube: Support for the Watch Later List

October 10, 2011 · Leave a Comment
Filed under: Featured, YouTube 

YouTube’s Watch Later list is the perfect way to keep track of interesting videos you come across but don’t have time to watch at the moment. Since rolling out that feature on the YouTube website and the embedded players, developers have been asking for ways to interact with the Watch Later list via the YouTube Data API. We’re happy to announce that this is now possible.

As explained in our documentation, the YouTube Data API treats the Watch Later list like a playlist, and the normal playlist operations (additions, retrievals, modifications) can all be performed on the Watch Later list. While every YouTube user has their own Watch Later list, it’s important to keep in mind that by default it’s a private playlist, so it will not normally be accessible unless you’re making an authenticated request as the list’s owner.

If you have any questions about using the Data API to work with the Watch Later list, please let us know in our developer forum.

Cheers,
—Jeff Posnick, YouTube API Team

Introducing Google Account support and YouTube API v2.1

October 10, 2011 · Leave a Comment
Filed under: Featured, YouTube 

Authenticated access to YouTube APIs lets your app offer many features that are unavailable to logged-out users. By authenticating user actions, your app can allow users to manage subscriptions, create playlists, and upload videos. Until recently, users could only perform any of these operations if they had YouTube accounts. (A YouTube account provides a user with a YouTube channel.)

We are pleased to announce that we have also started to give Google Account holders who don’t already have YouTube channels access to certain YouTube features on YouTube.com and in the YouTube API. We call these unlinked Google Accounts since they haven’t already been linked to a YouTube channel. For example, a user with a Gmail account or an Android device is certain to have a Google Account but may not have already linked that account to a YouTube channel.

What this means for your application is that with a few relatively simple changes, you should be able to allow authenticated access for users who have unlinked Google Accounts. Thus, those users will be able to log in to YouTube without having to create a YouTube username.

In a moment, we’ll dive into the details of how to use the API with unlinked Google Accounts and also offer a few user experience recommendations for your YouTube API application. First, though, a quick note about the new minor YouTube API revision that we’re introducing.

Say “Hello!” to YouTube API v2.1

When designing this feature, we decided to take a conservative approach toward backward compatibility. The set of write operations supported for Google Accounts is currently a subset of API operations available to YouTube account holders. Rather than expose existing applications to accounts with potentially restricted functionality, we’re explicitly requiring that an application prepared to handle unlinked Google Accounts tells us so by using the API version 2.1, a new, minor version of the API. Our documentation explains that you can specify an API version by appending v=2.1 to the API request URI or by using the GData-Version: 2.1 request header.

HTTP response codes for authenticated operations

API v2.0 supports all authenticated operations for users with YouTube accounts, which could also be called linked Google Accounts, but doesn’t support any authenticated operations for unlinked Google Accounts. If the authentication token for a v2.0 API request identifies an unlinked Google Account, the API will return a 401 NoLinkedYouTubeAccount error.

In API v2.1, however, a number of operations that require authentication are supported for users with unlinked Google Accounts, and the API will return a 200 response code for those operations. For operations that aren’t supported for unlinked Google Accounts in v2.1, the API will return an HTTP 403 Forbidden error with a youtube_signup_required error code.

The table below shows how API v2.1 changes response codes when different types of users try to execute operations that require authentication:

API v2 API v2.1
YouTube Account 200 OK 200 OK
Unlinked Google Account 401 NoLinkedYouTubeAccount 200 OK or 403 Forbidden youtube_signup_required

Handling the youtube_signup_required error

We do not recommend that you try to modify your application to provide a different experience for users with YouTube accounts than for unlinked Google Accounts. That approach would require you to constantly update your application as YouTube expands the list of features that we support for unlinked Google Accounts.

Instead, we recommend that you prepare your application to gracefully handle the youtube_signup_required error, preferably by presenting an option for the user to link to https://www.youtube.com/create_channel. If you are building a mobile application, you can bypass a redirect by using https://m.youtube.com/create_channel instead. The API documentation lists the operations that are and are not currently supported for unlinked Google Account holders.

The XML below shows a sample youtube_signup_required error:


<errors>
  <error>
    <domain>yt:service</domain>
    <code>youtube_signup_required</code>
  </error>
</errors>

User profiles for unlinked Google Account holders

A user profile entry for a user with an unlinked Google Account differs from a user profile entry for a user with a YouTube account in two ways:

  • § An entry for an unlinked Google Account holder contains a <yt:incomplete> tag. (This tag is not present if the user already has a YouTube channel.) It is useful if you chose to disregard our advice about the youtube_signup_required error and modify your application to provide a different user experience for users with unlinked Google Accounts.
  • § An entry for an unlinked Google Account holder contains only a few tags as those users can not customize their profile data without first creating a YouTube channel. The <entry> tag definition lists the different tags that may appear in a profile entry depending on whether the user has a YouTube account or an unlinked Google Account.

Displaying an email address for unlinked Google Account holders

In addition to handling the youtube_signup_required error, your application should also be prepared to display an email address for users with unlinked Google Accounts.

In Closing

If you have reached this point in the blog post, thanks for being a dedicated reader. We recognize that unlinked Google Accounts do introduce a certain level of complexity, but, at the same time, they can also open your application to a much larger audience of users who use Google services but haven’t created YouTube channels yet.

We also want to note that v2.1 does not deprecate v2.0 since it is a minor revision. Going forward, new features unrelated to unlinked Google Accounts will be added to both v2.0 and v2.1 but not to the (deprecated) v1.0 of the API.

Version 2.1 of the API is now available for testing on stage.gdata.youtube.com, and will be released to production in mid-October.

Cheers,

—Jarek Wilkiewicz, YouTube API Team

Tutorial : How to Get 3D Content on YouTube

September 11, 2011 · Leave a Comment
Filed under: Featured, YouTube 
Over the last few months, we’ve been steadily rolling out features for YouTube 3D. Early this year, we announced support for the LG Optimus 3D and NVIDIA 3D Vision, and this month we announced support for Samsung 3D TVs. And we’ll keep rolling out to more platforms to make it easier for everyone to get access to user-generated 3D content.
Many readers have been asking how to upload content. 3D uploads to YouTube will work across all supported devices, from red/blue glasses to the latest 3D televisions.
There are two ways to upload content to YouTube in 3D. If you’re just uploading one or two videos, upload content in any supported format and then edit the video settings to tell us that it’s 3D. From a video’s watch page, select “edit info”, then “3D Video”. This will only work on videos you’ve uploaded yourself.
If you’re using the API to upload 3D videos, you’ll want to format your video in a certain way. YouTube supports automatic detection of 3D content with certain file formats. If you upload with a format that supports automatic detection, we’ll automatically set the correct settings so that your video shows up automatically in 3D and shows up properly on phones, TVs, and PCs.
In both cases, YouTube requires that content be uploaded in Side by Side L/R with each frame squashed 50% and preferably with a 16:9 aspect ratio. The following formats are automatically detected when uploaded:
  • WebM with the StereoMode setting set to STEREOMODE_TYPE_LEFT_RIGHT. Note that other modes, including alternate track, are not supported.
  • H264 AVC with Supplementary Enhancement Information, Frame Packing Arrangement set. If you are usingx264, the argument --frame-packing=3 will set this correctly. In Handbrake you can set this in “x264 Advanced Option String”.

Be sure to get the squashing and positioning exactly correct. 3D content won’t look right if video formatting is off by even a pixel or two.

YouTube: Coming Soon: The Dark Player for Embeds

August 7, 2011 · Leave a Comment
Filed under: Featured, YouTube 

You may have noticed that we’ve changed the look of the player on YouTube. You may even have noticed that we’ve been experimenting with changing the look of embedded players too. Coming up on August 10, all embeds will automatically be updated to the new “dark player”:

Although we’re very excited about this change, which comes after months of design, research, and experimentation, we realize that some embedders would prefer a lighter color to match a lighter webpage, so we’re also announcing a few other themes that we’ll be making available. We also realize that some embedders would prefer something more mild than our use of red, so we’re happy to introduce a “desaturated” color option without any bright colors at all. (Note: Using the desaturated color disables the modestbranding option.)

To pick an alternate theme, pass in values for the “theme” and “color” player parameters. For instance, if you’d like to keep the traditional colors, you can pass parameters such as:

Here are all the new themes, including the new default:

If you have any questions about this change, you can ask them on our forum.

Cheers,
—Shannon -jj Behrens, YouTube API Team

YouTube Cosmic Panda

July 9, 2011 · Leave a Comment
Filed under: Featured, YouTube 

YouTube tests a new interface code-named Cosmic Panda. There are many cosmetic changes: videos are centered, player’s controls are now black, video thumbnails are a lot bigger, suggestions are displayed below the video, profile photos are displayed next to the comments, channels and playlists have a completely new layout.




Probably the most interesting thing about the new interface is a Chrome-only feature that lets you play a video in the background while you visit a channel. YouTube is more fluid and I expect to see a similar feature when you perform a search and when you click “view all comments”.

The new interface can be enabled and disabled at youtube.com/cosmicpanda.

{ Thanks, Jason and Greg. }

Introducing YouTube.com/create Platform

July 3, 2011 · Leave a Comment
Filed under: Featured, YouTube 

YouTube.com/create is a platform for third-party applications that enable users to create videos. The idea is simple. The third-party application runs in an HTML iframe on YouTube. The user creates a video with the application, and then the application uploads the video to YouTube for the user to watch and share.

Many different types of applications are already listed at YouTube.com/create. One True Media is a simple video editor. GoAnimate lets you create custom animations. Stupeflix lets you mix pictures, videos, maps, text, and music into a story. Xtranormal lets you turn anything you type into a fully-animated CG movie. Who knows what other developers have in store for YouTube.com/create?

Here’s one example of a company that decided to integrate with YouTube.com/create and experienced a signficant growth in traffic:

To list your application on YouTube.com/create, you’ll need the following:

  • The name of your application (max 60 characters).
  • A description of your application (max 50 words).
  • A 120×120 icon. The icon will display with rounded corners.
  • A tutorial video (hosted on YouTube).

The application itself must meet the following requirements:

  • It must support Google federated login using OpenID.
  • It must post the resulting video to YouTube. The application should upload the video on behalf of the user using OAuth2 or AuthSub.
  • It must provide branding within the user interface if the user is required to upload assets (to make it clear that the upload is going to the third-party application, not to YouTube).
  • It must not show ads within the iframe. However, the freemium model is acceptable, providing the base level of functionality is useful.

The application must run within the context of a 960px-wide iframe that will display on YouTube. The iframe does not limit the vertical space that your application occupies. For best appearance, your application should have a white background.

When you are ready to submit your application for inclusion on YouTube.com/create, submit it to the YouTube Project Gallery using the hashtag #create, and YouTube will contact you via email.

For more information about integrating with YouTube’s API, check out our developer documentation and join us on our mailing list!

Cheers,
—Shannon -jj Behrens, YouTube API Team

YouTube Tests a Black Player

June 26, 2011 · Leave a Comment
Filed under: Featured, YouTube 

A few readers spotted a new YouTube player with a redesigned control bar that uses a black background. The current control bar doesn’t stand out so that you can focus on the video you are watching.


A YouTube user says that he “would really appreciate a way to go back to the normal player, with its more obvious progress bar and less ugly/hyperactive popup controls”. I really like the bigger pause button, but YouTube should also change the action buttons below the player to better integrate in the new design.

{ Thanks, Josh and Jon. }

« Previous PageNext Page »