In this week's Creator's Tip, we are going to show you how to force closed captions to appear on YouTube videos, both for videos that play on YouTube and for those that are embedded on your website or other people's blogs. Why would you want to do this? Well, let's say that you made a video and uploaded it to YouTube but the audio is a little quiet or not of the quality you want. Or perhaps the audio is OK but the person in front of the camera speaks very quickly, or with a strong accent. Maybe it's a music video and you want the viewers to see the lyrics as it's playing. If you upload a captions file to YouTube then you can 'force' viewers to have those captions displayed as they watch:
How To Force Closed Captions On Your Videos
#1) To force the video to show the closed caption file you uploaded then add yt:cc=on as a tag to that particular video.
#2) If you are going to embed this video on your website,
and you want to force the closed captions to be on then you need to add the following to the end of the URL that sits inside the iframe – cc_load_policy=1
<iframe width="640" height="360" src="//www.youtube.com/embed/nsTrcipKBcg?cc_load_policy=1" frameborder="0" allowfullscreen></iframe>
How to Force Closed Captions in Other Languages
If you want to keep your English closed captions file as the default for the video but force your Spanish or German subtitles on your website embeds then you'll need to add something extra to the URL. For instance, to force Spanish closed captions on a video (if you have uploaded that particular language file of course), just add “&hl=es&cc_lang_pref=es” before the “&cc_load_policy=1” to the video’s embed code:
- “hl” sets the language for all features within the YouTube video.
- “cc_lang_pref” sets the language for the captions shown in the video.
So, if we had Spanish closed captions for the video below, and we wanted to force them because we were embedding them on a relevant page, we would extend the URL like so:
<iframe width="640" height="360" src="//www.youtube.com/embed/nsTrcipKBcg&hl=es&cc_lang_pref=escc_load_policy=1" frameborder="0" allowfullscreen></iframe>
This is really handy for international websites where you can show the same video content across different versions of your site, but use the correct language for each region. You can see a list of language codes here.
More Info on YouTube Player Parameters
- How To Customize YouTube Player Embeds – Tips and Tricks
- How-to Embed The Newer YouTube Video Player Skin and Why
- Want to Remove YouTube’s Logo on Embedded Videos? Here’s How
- Search YouTube Like A Master With These YouTube Search Tips And Tricks
- The Advanced YouTube Search Guide
Let us know in the comments below how you might use this feature.
Don't Miss Any Stories!
Get daily online video news, tips and trends via email!