Showing posts with label devs. Show all posts
Showing posts with label devs. Show all posts

Tuesday, September 30, 2008

Spotlight on: WatchToLearnChinese.com

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.

YouTube API Support in Drupal

Posted by Jochen Hartmann, YouTube APIs and Tools Team

Before coming to Google, I spent a good amount of time working with Drupal, the popular, open-source content management platform written in PHP. So when I heard that Brad Bowman of aten design group was working on the integration with the YouTube Data API, I was really excited.

Drupal is easily extended via third-party modules that interact both with the core Drupal API and with other third-party modules. Brad's youtube_api module is more of a low-level infrastructure component that allows other modules to interact with the YouTube Data API.

By integrating this module into your site, you can easily perform YouTube uploads in your own code by adding calls like this:
// Build an XML string with the correct video meta-data
$xml_string = youtube_api_create_xml('xml_tester', $xml);

// Use the YouTube API module to perform the video upload
$result = youtube_api_video_upload($xml_string,
$node->files['upload_0']->filepath, $node->files['upload_0']->filename);
The module currently works for Drupal 5 and a live version of it can be seen at
icitizenforum.com. A Drupal 6 release is planned for the near future.

Tuesday, September 9, 2008

Spotlight on: One True Media

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.

Wednesday, June 11, 2008

Spotlight on: TimeTube

Posted by Kuan Yong, Product Manager

Many of us have created fun and exciting websites using the YouTube APIs, but why write an app that looks like everyone else's? The creative minds at Dipity have shown us that video sites can be much more than just a collection of video listings and embedded players. Dipity's TimeTube is a great example of how you can massage the rich video metadata that our APIs provide to transform the way people browse and interact with videos. TechCrunched on May 9, TimeTube has soared in popularity. Derek Dukes, Co-Founder of Dipity, gives us the inside scoop.

Tell us about Dipity. What's your origin story? (And favorite YouTube video).


Dipity was started by 3 friends with the mission of improving the context of information on the web and integrating text, audio, video, images and maps together on interactive timelines. We started the company in April last year after realizing we'd been independently working on similar ideas and there was starting to be the beginnings of a broader meme. Since then we've worked on the core technology, added a few new people to the mix, launched the site and rolled out an API and a couple of mash-ups.

As for my favorite YouTube video, right now it's the Chad Vader version of Chocolate Rain, but I'm sure in the next couple days I'll find something else that takes the top spot.

Tell us about TimeTube. How'd you come up with it? What's next?

We got the idea for TimeTube shortly after completing work on our own set of APIs. As you know the best way to find limitations and bugs in your APIs is to try and build something interesting and see what falls on the floor and where you run in to limitations. It started as one of our hack days which we do every other week (our version of 20% time) and once we saw how compelling the results were, we added some features and decided to release it as a formal mash-up. In terms of how successful it's been we've been pretty blown away. After it moved quickly from 'hot in tech' to the front page of Digg, we got picked up by blogs like TechCrunch, Life Hacker and were even featured on the Net@Night podcast. From there the blog-o-sphere took over and we're still getting picked up by blogs here and there. Going forward, we're looking at different enhancements and responding to user feedback so look for updates in the future.

Tell us about the implementation. How'd you do it?

We had the YouTube interaction and timeline creation done in a few hours. The backend is written in PHP using the Dipity API and the Google Data PHP client library. We perform a search query with the YouTube API, iterating over the results and creating an event on a Dipity timeline for the most relevant videos (currently capped at 50). We keep a mapping of search terms to timelines to avoid duplicates. Searches mapped to an existing timeline are refreshed if the timeline is more than 24 hours old. The Dipity API and embeddable timeline widget provide for most of the heavy lifting, while a few hundred lines of PHP, HTML, JavaScript and CSS glue it all together.

Wednesday, June 4, 2008

Google I/O Wrapup

Posted by Stephanie Liu, YouTube APIs and Tools Team

Last week, the team spent an exciting couple of days at Google I/O. We all had a lot of fun, gave a few sessions, met a ton of people, and had good questions and discussions with developers. The best part was hanging out at the booth, talking to people one-on-one, seeing their projects, and hearing about other cool YouTube sites that are out there. For example,

  • Michael Geary wrote AnnoTube, a jQuery plugin that uses the JavaScript Player API to synchronize related web pages or HTML to the video.
  • In a discussion about mobile, a developer pointed us to a QR code generator for YouTube videos. This site generates an image that, if you have the right software installed on your phone, will link you directly to the video URL if you take a picture of it on your phone.

If you're interested in the YouTube sessions, you can find the the videos and slideshere. Specifically, John's Data API overview, and Geoff's player APIs session are available.

Since the codelab (about using the APIs with App Engine) wasn't filmed, you can find all the materials below.

The code project where all the materials live:
http://code.google.com/p/hello-youtube

The wiki that goes through the exercises during the session:
http://code.google.com/p/hello-youtube/wiki/Codelab

You can check all the code out from SVN, or just download the zip files. We also posted our slides and the standalone extensions to the client library as well:
http://code.google.com/p/hello-youtube/downloads/list

We also took some videos (of course) and photos from the booth. Below is a playlist with some of us at the booth:


The album with pics from the booth and some of the sessions:


We feel like I/O was a great success, so thanks to everyone who came out to the sessions, talked to us at the booth, and shared your enthusiasm about YouTube with us. It's always great to meet you guys in person! If you couldn't make it this year, check out one of the free Google Developer Days that are being held around the world later this year.

Monday, April 14, 2008

Developer Highlights: Tower of Babel Roundup

We wanted to take a minute and highlight some developers like yourselves who have been writing helpful tutorials or wrappers for the YouTube Data APIs.

In case you missed the announcement, we recently added YouTube support into the Google Data Objective-C Library. Not long after, Dan Sinclair, wrote a few helpful tutorials about getting started building a YouTube app in Cocoa. Check 'em out here:

Part 1: MyTube from the ground up
Part 2: MyTube - Installing the image wall
Part 3: MyTube - now with moving images

For the ActionScript 3 developers who want help querying and parsing Google Data feeds from Flash, Martin Legris wrote a small wrapper and also contributed an article to code.google.com on how to use it.

Shane Vitarana's Ruby wrapper has been updated to handle the Google Data feeds. Read the short introduction in his blog.

The Google Data .NET Client Library doesn't have YouTube-specific support yet, but Karsten Januszewski has written a sample and wrapper to help ease the parsing pain in the meantime.

If you've written a cool application, tutorial, or extension using the YouTube APIs, we'd love to see it! Share it with everyone over in the forum.