A few days ago, for the first time, I wanted to save the YouTube subtitles/closed captions for a video. (It was a Russian newscast about the trolololo guy which wasn’t hard-subbed) Unfortunately, I only had tools in hand for downloading the video stream.
So, now, I present to you the fruits of my labors. Tools in several different forms for downloading YouTube (and apparently sometimes Google Video) subtitles in SRT format, ready to use or convert to another form:
- YouTube closed-captions ripper (Web-based tool. Good for one-off use. Also gives links to the video files.)
- Download YouTube Captions (Greasemonkey script. Good for long-term use in concert with YousableTubeFix or Video DownloadHelper.)
- Google2SRT (Standalone open-source downloader/converter written in Java.)
Update: I’ve run across at least one video that stored its subtitles as annotations instead. I’ve found instructions and a ready-to-use tool for retrieving Google’s raw annotation XML but I only found shell scripts (which won’t work on Windows) for converting them to SRT files.
Update: youtube-dl can also rip subtitles while it’s saving a copy of the video to disk. Just use the
--write-auto-sub flags (depending on whether you want manually-added subtitles or YouTube’s often hilariously wrong automatic subtitles) and use something like
--sub-langs en,fr to select which languages you want to download.
Even better, if you’re downloading the video as a
.mp4 file and you’ve got ffmpeg set up on your machine (and it’s newer than the copy which comes with Ubuntu 12.04 LTS), you can pass the
--embed-subs flag to save the subtitles right into the video file so you don’t have to worry about losing them.
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.