Engineering and Developers Blog
What's happening with engineering and developers at YouTube
Spotlight on: WatchToLearnChinese.com
Tuesday, September 30, 2008
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
.
Labels
.net
360
acceleration
access control
accessibility
actionscript
activities
activity
android
announcements
apis
app engine
appengine
apps script
as2
as3
atom
authentication
authorization
authsub
best practices
blackops
blur faces
bootcamp
captions
categories
channels
charts
chrome
chromeless
client library
clientlibraries
clientlogin
code
color
comments
compositing
create
curation
custom player
decommission
default
deprecation
devs
direct
discovery
docs
Documentation RSS
dotnet
education
embed
embedding
events
extension
feeds
flash
format
friendactivity
friends
fun
gears
google developers live
google group
googlegamedev
googleio
html5
https
iframe
insight
io12
io2011
ios
iphone
irc
issue tracker
java
javascript
json
json-c
jsonc
knight
legacy
Live Streaming API
LiveBroadcasts API
logo
machine learning
mashups
media:keywords keywords tags metadata
metadata
mobile
mozilla
NAB 2016
news
oauth
oauth2
office hours
open source
partial
partial response
partial update
partners
patch
php
player
playlists
policy
previews
pubsubhubbub
push
python
quota
rails
releases
rendering
reports
responses
resumable
ruby
samples
sandbox
shortform
ssl https certificate staging stage
stack overflow
stage video
staging
standard feeds
storify
storyful
subscription
sup
Super Chat API
survey
tdd
theme
tos
tutorials
updates
uploads
v2
v3
video
video files
video transcoding
virtual reality
voting
VR
watch history
watchlater
webvtt
youtube
youtube api
YouTube Data API
youtube developers live
youtube direct
YouTube Engineering & Developers Blog
YouTube IFrame Player API
YouTube live
YouTube Reporting API
ytd
Archive
2020
Nov
2019
Aug
Apr
2018
Dec
Aug
Apr
2017
Nov
Sep
Aug
Mar
Jan
2016
Nov
Oct
Aug
May
Apr
2015
Dec
Nov
Oct
May
Apr
Mar
Jan
2014
Oct
Sep
Aug
May
Mar
2013
Dec
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
2012
Dec
Nov
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2011
Dec
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2010
Dec
Nov
Oct
Sep
Jul
Jun
May
Apr
Mar
Feb
Jan
2009
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2008
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
2007
Dec
Nov
Aug
Jun
May
Feed
Follow @youtubedev