Force YouTube closed captions via URL
Asked Answered
T

2

15

I want to play a YouTube video on my website, with closed captions and even translation turned on. The URL of my video (forgive the commercial nature) is:

I know the video is Closed Caption and Automatic Translation enabled, because I can turn both on manually when playing it.

I have read up and tried all the URL arguments, but none seems to do the trick:

  • &hl=fr
  • &cc_lang_pref=fr
  • &cc_load_policy=1
  • &cc=1

Any ideas?

Tonedeaf answered 27/4, 2016 at 18:17 Comment(4)
Have you tried adding the following "tag" to the video? yt:cc=on Also, if you're testing on iOS, maybe you're having the same problem that I'm trying to solve at https://mcmap.net/q/826130/-how-to-force-youtube-subtitles-closed-captions-to-appear-by-default-even-on-ios/470749Rundlet
Basically I think they have phased out those options over the years. Currently trying to solve the same thing... can't get anything to work, unfortunately.Spear
These solutions are not working for either.Spill
Almost 4 years and still no answer?Laryngology
M
7

As per YouTube's documentation the parameters can only be forced for embedded videos. So you'd have to use this:

https://www.youtube.com/embed/ir1RSoPF_h4?cc_load_policy=1&cc_lang_pref=en

... instead of:

https://www.youtube.com/watch?v=ir1RSoPF_h4?cc_load_policy=1&cc_lang_pref=en

I also faced an issue that videos would not show captions even using the parameters above and I solved this with the solution proposed on this video, which states you have to enter YouTube studio, edit the video, go to the "Subtitles" section and click the "Duplicate and Edit" option i.e. the video must have a manually defined subtitle for these parameters to work as expected. This means there's no way you can force auto-translated our auto-generated subtitles to show.

Bonus: when using the /embed/ form, videos do not start playing automatically. You can do this by adding autoplay=1 to the url. So, in the end, it would be something like this:

https://www.youtube.com/embed/ir1RSoPF_h4?cc_load_policy=1&cc_lang_pref=en&autoplay=1

Needless to say, you should replace ir1RSoPF_h4 by your video id, unless you want to watch the video from my own channel. :) I used this id because the OP's video is not online anymore as of today (2022-11-05).

Another interesting feature is that, once you have subtitles manually defined for a video (in Studio, as mentioned above), CC will be turned on by default for that video (be it using the /embed/ format or the general https://www.youtube.com/watch?v=ir1RSoPF_h4 or even the shortened url version, such as https://youtu.be/ir1RSoPF_h4). Also the subtitles will be displayed in the user's system language. This will stay turned on until you manually turn off subtitles (clicking the CC button under the video). You can test this feature by opening your video within an anonymous tab.

Mcnelly answered 5/11, 2022 at 14:54 Comment(1)
Good points about embed and autoplay.Burgh
L
-1

To force the CC to off, you need to add &cc_load_policy=3 to your URL.

Laryngology answered 7/2, 2020 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.