You are here

TED on a Stick?

Submitted by sverma on Mon, 12/24/2012 - 10:56

I find TED talks to be quite interesting and invigorating. They challenge conventional thinking and provide interesting solutions. I've even gone so far as to apply some of the recommendations from some of these talks - my favorite international travel water filter is the LifeSaver bottle. Not only is it an amazing piece of technology, it came out of an approach where water provision is done through a decentralized local model, instead of a centralized global one. The LifeSaver is a filter that one can carry and drink from a local source, instead of relying on a centralized water source of questionable quality.

Anyway, coming back to the topic: To provide TED talks to a local community, so that they may get ideas to solve their own problems. For instance, how would the kids in Bhagmalpur get to TED? They can't, because we get no more than 2.4kbps over a mobile phone. So, if the kids can't get to TED, we take TED to them! TED talks are released under a Creative Commons license. There are over a thousand talks. Downloading these one at a time is a bit of work. Looking around, I found MetaTED.

From their site:

"metaTED is a tool that makes it easy to download all of the TED talks. It does so by creating metalinks of TED talks varying in both the quality levels and possible talk groupings by directory."

The links are to a metalink file. Metalink files are XML files with data on the talks and where to get these. They look something like:

<?xml version="1.0" encoding="UTF-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/"
          origin="http://metated.petarmaric.com/metalinks/TED-talks-in-high-quality.en.metalink" type="dynamic"
          pubdate="Wed, 01 Sep 2010 12:13:26 -0000" refreshdate="Wed, 19 Dec 2012 02:00:10 -0000"
          generator="metaTED 2.0.4">
    <publisher>
        <name>Petar Marić</name>
        <url>http://www.petarmaric.com/</url>
    </publisher>
    <description>Download TED talks with English subtitles encoded in high quality</description>
    <tags>TED, download, video</tags>
    <files>
        <file name="Rives - The  4 a.m. mystery.en.srt">
            <resources>
                <url type="http">http://tedsubtitles.appspot.com/getsubtitles?langcode=en&amp;tedurl=http://www.ted.com/talks/rives_on_4_a_m.html</url>
            </resources>
        </file>

I used aria2 to grab a subset of the files. I am using the low-quality Hindi subtitled files for use on the XO-1. Note: The .srt files responsible for subtitles didn't come through. Maybe they are just not there for Hindi?

 

aria2c http://metated.petarmaric.com/metalinks/TED-talks-in-standard-quality.hi.metalink

 

After downloading these I got 1,368 items, totalling 9.8 GB. The XO plays Ogg Theora files natively in the Browse activity. So, I converted these to Ogg Theora format using ffmpeg2theora.

Note: Before converting, it's a good idea to backup the folder of TED talks so that you have a copy and you don't have to re-download 10GB or so in case you botch the conversion smiley

To convert he MP4 files to Ogg Theora run at the command prompt:


find <path-to-mp4-downloads> -name *.mp4 -exec ffmpeg2theora --videoquality 6 {} \;

 

You will still have the MP4 files in the folders, so to remove those (save space, avoid confusion), you can run:

 

find <path-to-mp4-downloads> -name *.mp4 -exec rm {} \;

 

I did not find a discernible difference in changing the videoquality parameter from 6 to 10, although the file size did grow. So, I left the videoquality at 6. Alternatively, you can install the codec needed to play back H.264 video and AAC audio, which is what the TED Talks are encoded as.

So, I'm walking around with a 16GB USB stick with all the TED talks. They play well on the XO-1. Pretty sweet!