Youtube – Force subtitles in video on YouTube, if it’s not embedded

subtitlesyoutube

I have uploaded the video on YouTubeand added the subtitles but the users don't realize that they can turn them on. I know there is particular URL parameter for embedded player, but it doesn't work for youtube.com itself. I have tried:

http://www.youtube.com/watch?v=wWMMgHobF6g&hl=de&cc_lang_pref=de&cc_load_policy=1

and it returns the page in German, but does not turn the subtitles on.

How can I force YouTube to use subtitles on youtube.com itself?

Best Answer

The only way I found is changing the URI from

https://www.youtube.com/watch?v=2s3aJfRr9gE

to this pattern

"https://www.youtube-nocookie.com/embed/" + VIDEO_ID + "?hl=" LANG_CODE

If hl= doesn't work (on some cases doesn't seems to work) try cc_load_policy=1&cc_lang_pref=.

On bash/Linux you can just copy the URI with that structure and then run this command (Spanish code hardcoded) to transform clipboard content (you can make an alias):

xclip -selection c -o | echo "$(cat -)?&hl=es-419" | sed "s|youtube.com/watch?v=|youtube-nocookie.com/embed/|1" | xclip -selection c

You can list the available subtitles ISO 639-1 language codes with youtube-dl:

youtube-dl --list-subs "{video_id or url}"

Drawbacks:

  • the video will cover the complete screen... which might be good thing to stop procrastinating with related videos :)
  • It seems that doesn't work with automatic generated captions.