05 November 2023

Prohibition Peepers part 3 —
How to create closed captions


0085 00:03:48.800 --> 00:03:51.200
  Leigh, let’s wrap our slideshow how-to
  discussion talking about closed captions.

  Leigh, let’s wrap our slideshow how-to  
discussion talking about closed captions. 

0086 00:03:52.000 --> 00:03:53.225
  Sure, why not?

 Sure, why not? 


Prohibition Peepers cover

Closed Captioning

We return with the final how-to tutorial of creating a slideshow for Michael Bracken’s Prohibition Peepers. I doubted any of the tens of trailer viewers would rely upon subtitles, but I wished to expand my skills working within a non-critical environment I could share with you. This is largely technical, so feel free to read more interesting essays by my colleagues.

Subtitles include a multiplicity of flavors and formats. They presently have no one standard, nor even a mere two or three.  The most common kind is .srt, which stands for SubRip. I chose to work with its close cousin, Web Video Text Track. The .vtt format is newer, more featured, and natively supported by the HTML5 standard. It also uses the decimal point standard found in most English-speaking countries.

Subtitles can be married to videos in three different ways: physically separate files, embedding, and burning. YouTube and smart television programs can work with multiple files, usually bearing the same name but different suffixes:

ThePrisoner.mp4ThePrisoner.srtThePrisoner.vtt

You might also see files for languages and variants, say, British and American English, French and Canadian français, Cuban and Mexican español. File names may be labeled like this:

ThePrisoner.en-UK.vttThePrisoner.fr-FR.vttThePrisoner.es-CU.vtt
ThePrisoner.en-US.vttThePrisoner.fr-CA.vttThePrisoner.es-MX.vtt

Burning Questions

Once you’ve created a closed caption file, then what? Depending upon your target platform, you may have three choices.

1. Associating Files
If you use a computer to peek closely at a movie DVD or a downloaded smart television movie, you’ll find numerous files. These include the movie itself in one or many segments, perhaps a preview, sound tracks in one or more languages, and closed caption files also in one or more languages. Separate files permit the viewer to adjust synchronization of sight and sound. YouTube also works with multi-file uploads, so I separately uploaded the slide show video and CC files, which YouTube accepted without complaint.
2. Embedding
Still curious, still expanding, I went beyond uploading multiple files to YouTube. I used an embed technique to create standalone videos, i.e, combined video and captions in a single .mp4 file. Videographers can embed subtitles with iMovie, independent apps like Shutter Encoder, or a web site that combines closed caption files with movie files. This results in a nice and convenient single file for viewers.
3. Burning
You may also see mention of ‘burning’, not to be confused with making DVDs. This method permanently overlays video images with text; that is, subtitles become an unalterable part of the picture. Only two advantages come to mind, (a) aiming for older platforms that don’t support closed captions, or (b) control over how subtitles look independent of the player.

Excelling

Throughout the audio/video process, I relied on spreadsheets in several ways. I used Excel for odds and ends like building an authors list, preparing scenes and maintaining the script, but spreadsheets turned out to be a key tool for closed captions.

Although the .srt format is older and therefore more common, the .vtt format has a distinct advantage for North Americans, Britons, Swiss, Asians, and Oceanians. We use a dot ‘.’ as a decimal point and a comma ‘,’ to visually group digits. Most of Europe, Africa, and South America do the opposite.

This quirk arises in subtitle files. A primary difference is .srt uses decimal commas and .vtt uses decimal points. More significantly, the English version of Excel understands the decimal dot, which means it works nicely with .vtt files.

In theory, we could work with a default time format, but a slight modification provides finer time codes. Select Custom from Excel’s number format window and use either of these format codes:

hh:mm:ss.000or          hh:mm:ss.000;@

Thus, a one hour, twenty-three and three quarter minute time code might look like:

01:23:45.678

Nitty-Gritty

Closed caption files are plain text that can be opened in TextEdit, BBedit, WordPad, and so on. For the most part, white space consisting of blanks, tabs, and single lines of code are all treated the same. The following are equivalent:

86
0086 00:03:52.000 --> 00:03:53.225
Sure, why not?

00086 00:03:52.000 --> 00:03:53.225 Sure, why not?

Each of these is called a cue. Each cue is separated by a double-spaced blank line. Leading zeroes can be omitted, including the hour:

86 3:52.0 --> 3:53.23 Sure, why not?

Subtitles can be positioned on the screen, and they can be formatted with common HTML codes and CSS. I didn’t have a need for the latter, but I used HTML <i>italics</I> in a few places.

Down and Dirty

Some high-end programs and web sites offer audio-to-text timelines– usually for a fee– to build closed caption files. I wasn’t impressed and since my project was small, I stepped through the video and made notes the old-fashioned way– by hand.

In addition to the formatting above, the rules are straightforward. Obviously, the ending time of a cue must come later than the beginning. Likewise, each start time has to be greater or equal to the start time of the previous cue.

Although rarely used, the rules allow for cues to overlap or persist on-screen. That could be useful when off-screen action can be heard but not seen.

A number of closed caption apps can be found on-line, most still using the .srt format. If you happen to use one of these and want .vtt, you may be able to selectively scan-replace decimal commas with decimal points.

Try to save your captions as a .vtt file, but you may find it safer to save as a .txt file and rename it.

ThePrisoner.txt➨          ThePrisoner.vtt

Adding closed captions is easier than it sounds. Consider it for your next video. And be sure to pick up a copy or two of Prohibition Peepers for Christmas.

More information follows.


Short History of Talkies
date  video timeline
1927  Fritz Lang’s Metropolis
1927  first talkie, The Jazz Singer
1929  motorized movie cameras
1930  F.W. Murnau’s City Girl
1930  theatres convert to sound
1931  Charlie Chaplin’s Modern Times
1931  sound-on-film standardized
1931  Mervyn LeRoy’s Little Caesar
1931  William Wellman’s Public Enemy
1932  Howard Hawks’ Scarface
1932  first color feature, Flowers and Trees


Closed Captioning Formats
SubRipsrtMost common web format. No styling. Plain text UTF-8.
SubViewersbvNo styling. Plain text UTF-8.
 subSame as .sbv
MPlayer subtitlempsubformat= parameter supported.
LRClrcNo style info (markup) is recognized, but enhanced format is supported.
Videotron LambdacapPrimarily used for Japanese subtitles. Supports CEA-608 features.
Synchronized Accessible Media Interchangesami
smi
Only timecodes, text, and simple markup (<b>, <i>, <u>, and color= attribute within a <font>) are supported. Positioning is not supported.
RealTextrtOnly time codes, text, and simple markup (<b>, <i>, <u>, and color= attribute within a <font>) are supported. Positioning is not supported.
Web Video Text TrackvttPositioning supported. Styling presently limited to <b>, <i>, <u>. Plain text UTF-8.
TTML (Timed-Text Markup Language)ttmlIn partial implementation. SMPTE-TT extensions supported for CEA-608 features. iTunes Timed Text (iTT) file format is supported; iTT is a subset of TTML, Version 1.0. Styling and positioning are supported.
DFXP (Distribution Format Exchange Profile)ttml
dfxp
Interpreted as TTML files.
Scenarist Closed CaptionsccExact representation of CEA-608 input preferred format.
EBU-STL (binary)stlEuropean Broadcasting Union standard.
Caption Center (binary)tdsSupports CEA-608 features.
Captions Inc. (binary)cinSupports CEA-608 features.
Cheetah (ASCII text)ascSupports CEA-608 features.
Cheetah (binary)capSupports CEA-608 features.
NCI (binary)capSupports CEA-608 features.

4 comments:

  1. Floored, as usual, by your knowledge on this, Leigh! Basically, I've told myself 'never even think of getting into this, you engineering school drop out!' (I went on to get a business degree) And I've already order Peepers for Christmas for my hubby - may have to read it first, in the bathroom!!

    ReplyDelete
    Replies
    1. Thanks, Melodie. I know you could do it. I experimented a lot, but the learning curve wasn't as bad as I feared. Embedding was tricky– I wanted better tools for the task.

      Delete
  2. Oops - that was Melodie above

    ReplyDelete
    Replies
    1. I think you and your husband will enjoy the book, Melodie. Judging from contributors I worked with, a lot of historical digging went into the stories. We do love our research!

      Delete

Welcome. Please feel free to comment.

Our corporate secretary is notoriously lax when it comes to comments trapped in the spam folder. It may take Velma a few days to notice, usually after digging in a bottom drawer for a packet of seamed hose, a .38, her flask, or a cigarette.

She’s also sarcastically flip-lipped, but where else can a P.I. find a gal who can wield a candlestick phone, a typewriter, and a gat all at the same time? So bear with us, we value your comment. Once she finishes her Fatima Long Gold.

You can format HTML codes of <b>bold</b>, <i>italics</i>, and links: <a href="https://about.me/SleuthSayers">SleuthSayers</a>