Hailin's Weblog

June 5, 2009

Captions and subtitles for WordPress.tv

Filed under: social — Hailin @ 8:15 am

WordPress.tv is a popular blog hosting collections of WordPress videos, including WordCamp videos, tutorials, etc. It’s the visual resource for all things WordPress.

WordPress.tv has just integrated with dotSUB to provide translation for some popular videos.  To help translate your most favorite videos into your language, you can create a dotSUB account, then visit WordPress tv project to begin translation.

Technical details on how the integration works:

Once a new video is added to the dotSUB WordPress tv project, all the translation is done by volunteers  using dotSUB toolsets.  dotSUB then provides an external public API to access its translation metadata and translation texts.

The API  has the following form:

http://dotsub.com/api/user/{dotsub_username}/media/{dotsub_external_reference}/metadata
where dotsub_username is username one created for your video project at dotSUB, and dotsub_external_reference has to be the guid of the corresponding WordPress.com video.

For example, the public APIs for a WordPress.tv video “Adding categories and tags to your posts” ( guid 1UKXOM9q) are:
http://dotsub.com/api/user/wordpresstv/media/1UKXOM9q/metadata
http://dotsub.com/api/user/wordpresstv/media/1UKXOM9q/captions?language=eng

WordPress.com video player queries the above API URLs and integrates the translation texts. 
Watch this particular video clip below:

Configuring dotSUB external reference

In order for the video player to locate the correct API URL, the external reference has to be configured correctly as the guid  of each video.

It takes the following steps:

Step 1.
Select  your video within dotSUB project space. Click “Video Properties” tab, then Click “Edit Video”.

View the screenshot

Step 2.
Find out the guid of this same video within WordPress.com blog media library. The guid is the portion of the shortcode without brackets. Eg: if the shortcode is [wpvideo 1UKXOM9q], then the guid is 1UKXOM9q
Enter the guid into text field “External reference”, then click Save. All the other fields such as video title, year of publication are for dotSUB internal use, thus not required for the integration to work.

View the screenshot

Step 3.
The change will take effect in about 12 hours because the internal video information is cached for 12 hours.  To force it to take effect immediately, clear the cache, then check the video info again. Eg:

http://v.wordpress.com/wp-content/plugins/video/video-xml.php?guid=1UKXOM9q

 (of course replace the guid with your specific ones).

 If you see <dotsub_metadata> and <dotsub_caption>, that means cache is cleared, your dotSUB configuration has been applied successfully, and the translation will be displayed by WordPress.com video player.

June 2, 2009

garden

Filed under: social — Hailin @ 6:48 pm

It’s a joy watching tiny seeds growing into three feet tall tomato plants or lush vegetables…

Blog at WordPress.com.