Posted by Stephanie Liu, YouTube APIs and Tools Team

A common way to use the YouTube API is to make a niche site -- YouTube isn't necessarily built to be a destination site for iguana lovers, or antique car racers, or people looking to learn Mandarin. Developers can use the API to create a rich supporting feature set for these communities. It's great to come across sites like this that are done well, so when I saw WatchToLearnChinese.com, I asked one of the creators, Philipp Lenssen, editor of Google Blogoscoped, to tell us more about the site. (I was also excited because it was a good way for me to brush up on my rusty Mandarin in time for a trip to Beijing!)
Posted by Stephanie Liu, YouTube APIs and Tools Team

A common way to use the YouTube API is to make a niche site -- YouTube isn't necessarily built to be a destination site for iguana lovers, or antique car racers, or people looking to learn Mandarin. Developers can use the API to create a rich supporting feature set for these communities. It's great to come across sites like this that are done well, so when I saw WatchToLearnChinese.com, I asked one of the creators, Philipp Lenssen, editor of Google Blogoscoped, to tell us more about the site. (I was also excited because it was a good way for me to brush up on my rusty Mandarin in time for a trip to Beijing!)

Tell us about WatchToLearnChinese.com.
We recently launched Watch to Learn Chinese, a site presenting over 500 Mandarin learning videos (as well as some Mandarin videos in general for advanced learners). We noticed so many great material already existing on YouTube that we wanted to utilize the YouTube API to bring it all on a site with special notes in Pinyin, that transliteration of Chinese using the Latin alphabet. After scouring hundreds of videos and sorting them into three difficulty levels, and assigning ratings specifically looking out for usefulness to learners, we opened the doors to present this as a free learning tool. While we don't want to and can't replace a Chinese teacher or learning books, we're hoping this can serve as additional material accompanying learning courses.

Beyond the videos, we've also added a game that mixes images (drawn ones, and Creative Commons-licensed photos), sounds, and text. My Chinese partner on this project had spoken a great deal of sentences into the microphone and I edited the sound into many little pieces to be used for the game (using the free Audacity editor). For the translations of the many words and sentences, we hired a translation company -- you provide them with a Word file or similar document, select your source and target language, and after some days, you can download the translated document (we've used Click2Translate.com, but you may also find another service you prefer). It might have been the first time that translation company was ever faced with the task of not only translating into Chinese, but also into accentuated Pinyin!

On that note, we've also added a YouTube channel with learning videos of our own.

Why did you decide to use the Chromeless Player instead of just embedding YouTube content the regular way?
There were several reasons for this. For one thing, we wanted to completely customize the player -- including every last button, video buffer indicator, color and so on. (Inspiration for this approach came from TotLol.com, a YouTube API-based site for parents and their toddlers which I had reviewed as part of Blogoscoped.com, a news blog on Google topics.) Another feature of the YouTube API that came in very useful was that we were able to assign a start and end time for the core lesson of a video. Imagine you want to watch a series of 10 videos by the same presenter -- wouldn't it be nice to not always watch the 20 seconds intro, but skip right to the lesson material? (And if you do want to learn more about the presenter after the lesson, we grouped their other videos on our site and also link to their homepage, if we found one.)

Tell us a little more about the backend. Do you have any lessons learned for everyone at home?
To let you find videos on the site, we set up a little PHP/MySQL engine which searches through video title and description. To optimize this process, we do some behind-the-scenes routines to check for "fuzzy" Pinyin matches. This is one example where you can build on existing videos but then add value by offering features specialized to that content. For instance, take the Chinese Pinyin word "wǒ mén", which means "we"; it was important that searchers should be able to enter this as "wǒ mén", "wǒmén", "women" and so on, and still find a match.

To manage video additions, we created a little private form where you input the YouTube URL, a title, a description, rating, type of learning course and so on. Once the form is submitted, the program will check for existing videos on the site to avoid duplicates, and then pulls the video thumbnail to store on our server. Now, a routine server-scheduled job (the Apache Cronjob) will check if the video still exists on YouTube, in case someone made it private, or disallowed embedding, or something else happened with it. When a problem is found we can see this in the management console and decide how to handle this problem, like by removing the video or looking for a replacement. Lesson learned: be conservative when you do the checking of availability and don't immediately hide display of videos on your site were you may suspect a problem. Thanks to an overzealous early version of our availability checker, which may have stumbled upon a changed HTML tag or similar on YouTube, WatchToLearnChinese.com was completely empty one morning... because all videos had been incorrectly flagged as unavailable by us!

And now, we're hoping for happy visitors to the site, and ponder ways of growing it in the future. It was certainly a lot of fun so far.

Thanks, Philipp! Check out the docs for more info about the Chromeless Player, the the JavaScript Player API, and the Data API.

Posted by Jochen Hartmann, YouTube APIs and Tools Team

If you are just getting started with our PHP Client Library and would like to verify that your installation is correct, you can now use a new tool to do so. I have just checked in the first version into the ...
Posted by Jochen Hartmann, YouTube APIs and Tools Team

If you are just getting started with our PHP Client Library and would like to verify that your installation is correct, you can now use a new tool to do so. I have just checked in the first version into the repository at the Zend Framework site.

The tool can run either from the command line or on your server. It verifies that:
  • PHP has been compiled with the correct extensions
  • the Zend Framework is installed and accessible
  • SSL is enabled and that you can access the YouTube Data API
The sample output below shows the results of a successful installation:

jhartmann@mybox:~$ php VerificationChecker.php
== Ran PHP Verification using CLI ==
PHP Extension Errors -- No errors found
Zend Framework Installation Errors -- No errors found
SSL Capabilities Errors -- No errors found
YouTube API Connectivity Errors -- No errors found

Posted by Stephanie Liu, YouTube APIs and Tools Team

As you guys know, many members of the team hang out in our discussion forum, where we field all kinds of questions, usually resulting in small snippets of code that aren't easy for other people to find. To house these snippets, a ...
Posted by Stephanie Liu, YouTube APIs and Tools Team

As you guys know, many members of the team hang out in our discussion forum, where we field all kinds of questions, usually resulting in small snippets of code that aren't easy for other people to find. To house these snippets, a Tips Blog was created! For example, Jochen has a few tips on how to get the next and prev links using SimpleXML, how to use the PHP Client Library through a proxy, and adding multiple video responses.

The blog is actually for all the Google Data APIs, but many tips are general and relate to YouTube. You can also subscribe only to tags that you're interested in. Blogger (since it's a Google Data API, naturally) allows you to use the category filter and throw it into your feed reader of choice. For example, to get all tips for YouTube, use:
http://gdatatips.blogspot.com/feeds/posts/default/-/youtube

If you only want PHP tips for YouTube, you can further filter the labels:
http://gdatatips.blogspot.com/feeds/posts/default/-/youtube/php

Or, of course, you can subscribe to the whole thing by just using the base feed:
http://gdatatips.blogspot.com/feeds/posts/default/

Happy coding!

Posted by Jeff Fisher, YouTube APIs and Tools Team

The latest .NET Client Library release includes support for asynchronous API operations. This means you can now do things like upload videos in the background while the user continues to use your application. Read the full announcement on the ...
Posted by Jeff Fisher, YouTube APIs and Tools Team

The latest .NET Client Library release includes support for asynchronous API operations. This means you can now do things like upload videos in the background while the user continues to use your application. Read the full announcement on the Google Data APIs blog.

Posted by Satyajeet Salgar, YouTube APIs and Tools Team

In YouTube API-land, we always love hearing about new API implementations that make sharing videos on YouTube more accessible to a large number of users. One such site that we recently learned about is ...
Posted by Satyajeet Salgar, YouTube APIs and Tools Team

In YouTube API-land, we always love hearing about new API implementations that make sharing videos on YouTube more accessible to a large number of users. One such site that we recently learned about is One True Media.

One True Media lets you create great videos from scratch using your photographs and videos. By allowing you to add a range of transitions, music, video styles and effects, it makes it extremely easy to create compelling videos. Adding the "Upload to YouTube" functionality to their site has allowed One True Media to offer their users another way to share the videos that they create with friends, family and the world.

Below are extracts of a chat with some of the engineers from the One True Media team: Ian Lovejoy, Kevin Wong and Chris Hut. Hopefully there are technical and design lessons that you can glean from their experience.

Q: Why did you add the Upload to YouTube functionality to the One True Media site?

Our site is about re-inventing video-creation; making it as easy as possible for users to create videos. But its just as important to our users to be able to share the videos that they create and YouTube has proven to be a favorite way for our users to share what they create.

Q. What are the benefits to One True Media of adding the functionality?

Our users are that much happier! They love sharing their videos on YouTube. It's a great way for them to show off what they create. It drives them to create more content. For us, it's also a great way to showcase our tools and put our brand in front of the largest possible audience. Our users have actually started putting videos on YouTube on how to upload to YouTube from One True Media!

Q. What was your experience with the APIs like?

Overall, great! The API was pretty straightforward and we were able to implement the functionality pretty quickly. We encountered one bug, but Jeff in the API forum helped us with a workaround and the bug has since been fixed. The most annoying part was getting the AuthSub keys set up and that code working. It would help to have that better documented! (We're on it!)

Q. A personal confession: when I first tried to upload a personal video to YouTube from One True Media, it took me a while to figure out how to do it....

It was definitely hard to find the "Upload to YouTube" functionality to begin with. We've made it easier to find, moving it higher on the page of share options, and even surfacing it at different points in the user flow including the registration process and on other key pages. That's increased the number of uploads quite a bit, and correspondingly the views our users' videos got on YouTube!

Q. What are the some of the other things you learned about using the APIs?

Well, we've learned the value of making the feature easy to find. We also realized that by implementing AuthSub and keeping the user logged in, we could make the process that much smoother for users, and we believe this influenced the number of uploads significantly as well. We're now brainstorming ways to utilize other YouTube API features to improve what we can offer our users.

Thanks guys!

Play with One True Media's implementation at http://www.onetruemedia.com, and think about how using the YouTube APIs can enhance your product.

Posted by Stephanie Liu, YouTube APIs and Tools Team

Here are some of the recent features that you may have missed.


Player updates
Posted by Stephanie Liu, YouTube APIs and Tools Team

Here are some of the recent features that you may have missed.


Player updates


Specify starting point in an embed
Want to skip to the good part? You can now specify when your video embed starts with the start parameter.

Full screen mode

Show the full screen button on the embedded player with the fs parameter.

Only the YouTube logo has clickthrough for Chromeless Player

The Chromeless Player's click area is now only the YouTube logo. The rest of the video canvas does not go back to YouTube.com. This should make the fuller integrations with the Chromeless Player more seamless. Jeff talks about it in his groups post.

Data API updates


Batch operations
You can now submit multiple operations per query. Closing out issue 79. See the docs for more details.

Feed for new videos from your subscriptions

You can now get a feed of videos from a user's subscriptions. Closing out issue 366. To see what lonelygirl15 is watching, use:
http://gdata.youtube.com/feeds/api/users/lonelygirl15/newsubscriptionvideos

New standard feeds for categories

You can now get standard feeds for the different categories -- these should more or less correspond with the browse pages. For example, for top rated videos in Comedy:
http://gdata.youtube.com/feeds/api/standardfeeds/top_rated_Comedy?time=today and http://www.youtube.com/browse?s=tr&c=23&l=&b=0

You can also get localized feeds. For example, the top rated Comedy videos today in Germany:

http://gdata.youtube.com/feeds/api/standardfeeds/de/top_rated_Comedy?time=today

See the
docs for more info.

X-GData-Authorization header for user login
The X-GData-Authorization header can now be used as an alternative to using the Authorization header for user login -- especially important for Flash developers.

A few other tidbits:

Let us know if you have any questions over in the discussion forum.