Ted Talks Subtitles Downloader
Fecha: February 5th, 2010 | Categoría: Internet | 12 Comments »As my mother tongue is not english, I’ve been always appreciative of things like Ted Translations, because it allows me to share my findings on the web with people from my country, where not everybody is as fluent in english as to hear and understand every word of a TED Talk. But I’ve found annoying that you could watch the video with subtitles online, but you couldn’t download them in a appropriate format (I generally use the ‘.srt’ format).
I did some research, created a python script that lets you download the subtitles, and parse them from JSON to the ‘.srt’ format; but in these days a black-and-white command-line script is not acceptable. So I made it my first web-app, a TED Talk Subtitle Downloader.
http://tedtalksubtitledownload.appspot.com/
(online implementation of http://estebanordano.com.ar/ted-talks-download-subtitles/)

[...] UPDATE: Online version [...]
Thanks for your great works! Subtitle is important for english video to non-english people.
I copy pasted the text to notepad, but the subtitles do not load into the video with VLC player. Is other software needed to get the subtitles into the video file?
Charles: You shouldn’t copy n paste, try with “Save page as…” and add the .srt extension to the file downloaded.
Esteban:
You are great!
Is it possible to have 2 or 3 languages as subtitles in one video? Copy and pasting each sentence works. Is there a method for copying pasting the entire text from one saved .SRT file into another?
Hi. It’s your lucky day. Since I was very bored studying, I took a break and modified the script to allow multiple languages in the same subtitle.
Here you go:
http://pastebin.com/FHnW1V2h
What a lucky day! A gift from the programming gods to the world!
Let me know if it was helpful!
Thanks for giving me something to do
I have got as far as saving the code as a .py file, downloading a python interpreter then double clicking on the .py file. HAHA after some more hours the code and process will not seem like black magic!
An online version would be great!
http://www.imageupload.org/share.php?id=760A_4C455CB3
For Python27
Line 3: import simplejson
change to
Line 3: import json
Where do you find the ID numbers for the tedtalks?
I’m getting the “could not fetch subtitles!” message
changed simplejson to json in line 58;
now…
entering 2+ languages leaves error lines on 88, 82 and 62
entering 1 language gives the text of the speech
> eng spa
Downloading subtitles for languages: eng spa
Traceback (most recent call last):
File “tedm.py”, line 88, in
main(sys.argv[1])
File “tedm.py”, line 82, in main
downloadSub(idtalk, availables, int(vidpar[‘introDura
File “tedm.py”, line 62, in downloadSub
salida = file(’subs_%s_%s.srt’%(idtalk,reduce(lambda
‘w’)
File “tedm.py”, line 62, in
salida = file(’subs_%s_%s.srt’%(idtalk,reduce(lambda
‘w’)
TypeError: can only concatenate list (not “str”) to list
3 days to get here! haha…. It took 15 hours to figure out that executing scripts is done in the dos command prompt, that scripts must be in the same folder as the python program, and the command is python xxx.py. Hope to see an online version soon hahaha wow, you programmers are crazy.