How To Force Subtitles In An Embedded YouTube Video

Ads by Google

youtube captions   How To Force Subtitles In An Embedded YouTube VideoIt’s been about three years since YouTube introduced improved automatic captions for some of the videos; in a year they became more common and last year they were enabled for all English-language videos.

YouTube captioning is the way to help hearing impaired people to understand the videos and, coupled with automatic translation, it can also help non-English people around the world to access the video content. The feature uses Google speech recognition technology to transcript any uploaded video.

The captions are mostly decent-quality (especially in cases when the speaker in a video talks slowly and clearly). Even in cases when the machine fails to fully understand what is being spoken, you will still be able to understand the content of the video.

By default, captions are disabled in an embedded video, however you may want to force the subtitles for one (or both) of the following reasons:

  • You want to make your video more accessible (especially to hearing-impaired people who are unaware of the option).
  • You are sharing an English video with non-English-speaking community.
  • Even if anyone can enable automatic subtitles manually, few people are actually aware of the option, so showing the captions by default would help a lot.

1. Add Subtitles in an Embedded Video (by Default)

Normally, if a user turned on captions once, YouTube will remember it and play subtitles by default until the user turns them off.

Ads by Google

youtube captions 02   How To Force Subtitles In An Embedded YouTube Video

What you can do is to change the default settings (show subtitles to users who don’t have the subtitles disabled or are logged out of Google / Youtube).

To enable subtitles by default, you will need to use &cc_load_policy=1 parameter as shown below:

Old-style code:

<object width=”550″ height=”343″><param name=”movie” value=”http://www.youtube.com/v/kTvHIDKLFqc?version=3&amp;hl=en_US&amp;&cc_load_policy=1“></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/kTvHIDKLFqc?version=3&amp;hl=en_US&amp;rel=0&cc_load_policy=1” type=”application/x-shockwave-flash” width=”550″ height=”343″ allowscriptaccess=”always” allowfullscreen=”true”></embed></object>

Iframe (mobile-friendly) code:

<iframe width=”550″ height=”343″ src=”http://www.youtube.com/embed/kTvHIDKLFqc?rel=0&cc_load_policy=1” frameborder=”0″ allowfullscreen></iframe>

2. Translate Subtitles in an Embedded Code

Despite the fact that this parameter is not “officially” described, YouTube has supported it for ages: “hl=” parameter in an embed code pre-selects the subtitle language. Most of these language code should work when used after the &hl= parameter: Language Codes

This means that the following code should work to play the video automatically with translated subtitles:

<object width=”550″ height=”343″>
<param name=”movie” value=”http://www.youtube.com/v/kTvHIDKLFqc?version=3&amp;fs=1&amp;hl=ru&amp;cc_load_policy=1&amp;rel=0&amp;hd=1″>
<param name=”allowFullScreen” value=”true”>
<param name=”allowscriptaccess” value=”always”>
<embed src=”http://www.youtube.com/v/kTvHIDKLFqc?version=3&amp;fs=1&amp;hl=ru&amp;cc_load_policy=1&amp;rel=0&amp;hd=1″ type=”application/x-shockwave-flash” width=”550″ height=”343″ allowscriptaccess=”always” allowfullscreen=”true”></embed>

However, due to reported  bugs, this code won’t work in many cases (maybe because of the numerous tweaks to the YouTube player). If you start experimenting with automatically translated captions, check out this particular post offering a few workarounds to the bug (one possible workaround is to use version=3 parameter in an embedded code).

Also, there is no way to translate captions in an iframe-based (newer) version of the embed player (sadly).

3. Linking to Videos with Captions

If you want to share a link to the video for viewers to see captions by default, you need to add this code at the end of the URL string:

youtube captions 01   How To Force Subtitles In An Embedded YouTube Video

&yt:cc=on

Here’s an example.

More tricks to know about YouTube video URLs and embed player:

What are your experience with YouTube subtitles? Have you ever found them useful? Please share your thoughts!

Ads by Google

3 Comments - Write a Comment

Reply

Sreedinesh

Is there any means to embed a facebook chat widget to my blog: http://sreedinesh.blogspot.com ?

Reply

CCAC

YouTube/Google Automatic captions are NOT understandable; the quality is rarely offering equal access to all who rely on captions, or want proper English in captions. The transcript can be updated/edited/corrected by someone who has the transcript, or has good hearing (though unclear who has permission to do this still).
As you say, inclusion of quality captioning is vital for online media – it’s not only for millions with different hearing needs, it’s important for literacy, language, business, and more. We invite all who support our mission to Join the CCAC, a relatively new and all volunteer network of captioning advocates – see http://www.ccacaptioning.org for more information, or get in touch: ccacaptioning@gmail:disqus .com
ls/ccac

Your comment