Playing with YouTube Captions

I've been playing this week with closed captions on YouTube. YouTube announced support for closed captions in August 2008, and followed that announcement with this demonstration video. This inspired us at DO-IT to create our own YouTube Channel and to start uploading captioned videos.

YouTube supports captions in either of two formats, SubViewer (.sub) or SubRip (.srt). The formats are described, with examples, on the YouTube Help page Getting Started: Adding / Editing captions. Until recently I hadn't fully explored YouTube's caption support in any great detail, but here's what I discovered this week:

According to the closest thing I could find to a SubViewer Specification, the SubViewer format includes an optional heading section, which allows authors to control the font family, size, and color of the caption text. These stylistic properties are supported by some media players, but not the YouTube player. I'm actually ok with that, as I think the appearance of captions should be controlled by the user, and commendably YouTube has taken some positive steps in that direction:

  • To increase text size: press "+" key
  • TO decrease text size: press "-" key
  • To change background: press "B" or "b" key

Note that the YouTube player must first have focus before any of these keys work. Therefore, it requires a mouse click (or, in Internet Explorer, the user can tab into the player).

I had similarly little success finding a formal specification for SubRip (the other format supported by YouTube), but according to McPoodle, this format has no head section where universal font styles can be specified, but does support presentational markup within each caption, specifically... um... <font>, <i>, and <b>. YouTube doesn't support this though, and again: I'm ok with that.

Since YouTube gives users control over font size, I find myself questioning whether we should force line breaks in our captions. For example, if a caption includes two short sentences, with a line break at the end of the first, that may be very readable in the default font size, but in a larger font the line break may force the captions to expand onto three lines, with one lonely word on line 2. For the DO-IT videos, we've decided to use line breaks for videos where the user has no control over caption size (e.g., Windows Media and Quicktime), but we remove those line breaks in caption files that will be delivered in players where users do have control, such as the YouTube player.

Keep Your Captions Short

The maximum number of lines that the YouTube caption player will display seems to be three. There also seems to be a limit to the number of characters, as seen in the following example. The example shows a caption in which the word "caption" should appear at the end of line 3, and would easily fit within the width of the video player, but it has been omitted, presumably due to a character limit.

YouTube video with truncated caption text

The extra word doesn't show up in a subsequent caption either. In fact, if we added an entire fourth line (I tried this), that line would never show up. However, there seems to be a threshold after which YouTube decides a caption is not just long, but really really long. That's when the player kicks in to a special mode that I call really really long mode. It splits the caption into multiple captions, then displays each caption for intervals of equal length until the next time code from the original caption file rolls around. This is a pretty smart feature, but the fact that it doesn't just do this automatically is a bug. Below is a screen shot of the test video in which I tried to figure out what the threshold was. In the caption on the screen, the word "really" appears six times. There is additional caption text that overflows and is never displayed. I had to add "really" a total of eighteen times before YouTube finally kicked into really really long mode and intelligently displayed the overflow.

a video with a really really long caption, in which portions of the caption are never displayed

Don't Try This at Home

YouTube's really really long mode might have some of you thinking you could just upload a transcript and let YouTube automatically divide it into captions. This, in fact, is true! The only time code that's required is the start time (yes, I tried it). As described in the preceding section, YouTube breaks the transcript into captions and distributes them evenly over the length of the video. This is the same idea that's behind UW-Madison's World Caption with one big difference: after divvying up the captions, World Caption provides an interface that allows users to adjust the captions when they get out of sync. Without making adjustments, the captions and video won't stay synchronized for long and the user who depends on captions is left trying to understand a confusing mess. So, until YouTube can convert your transcript to captions on the fly (using speech processing technology), you'll need to create the captions yourself. There's no reason not to, especially if you already have a transcript since getting the transcript is the hard part. There are plenty of tools and services for converting transcripts to captions, several of which are listed on YouTube's Help With Captions page.

5 comments on “Playing with YouTube Captions

  1. Useful info here. I wish I'd read this a week ago before I started work on captioning my YouTube content. It would have saved time and headaches.

    I've been using Subtitle Workshop for creating caption files. It's buggy and a little akward to use, but gets the job done much better than any of the web-based tools.

    I'm dissapointed that Vimeo hasn't implemented this feature yet. Surely it's easy enough for the developers to put in place.

  2. I have been creating foreign language subtitles for YouTube videos for over 6 months now, using Subtitle Workshop. And because of a lack of detailed information on the topic from YouTube, I too have had to learn almost everything via trial and error. The videos for which I make subtitles are not my own, however, so it has been difficult for me to do some of the experimenting you outline here. Thus your information has been quite helpful to me. Thank you for posting it! One question I still have: have you discovered what the maximum character limit is (the exact number, I mean)?

  3. I'm not aware of a limit to the number of caption files. I do know that for each video, you can only upload one caption file per language. So, for example, if you wanted to provide both an English version and a simplified, paraphrased English version for viewers with cognitive disabilities, that's not possible. Otherwise, Google prompts for captions in 138 distinct languages, so presumably you can upload a caption file for each of those languages if you have one.

  4. I'm not sure what the character limits are and such but it probably has to do with your text size that you have set using the + - keys. That may not be so important, though, as it's said you shouldn't have more than like 2 lines of 50 characters anyway for best readability. Some even say 35 per line. At Penn State we have a site license for MovieCaptioner, which makes it really fast and easy to create YouTube captions (as well as many other formats if you need them I guess). It's Mac only at this point, but the developer is working on a Windows version too.