uBlock Origin author's latest extension CCaptioner is now available
CCaptioner is a new extension by Raymond Hill (gorhill), creator of uBlock Origin, that may be used to add text tracks to HTML5 video elements. The extension is available for Firefox and Chrome officially, and it should work in most other browsers based on Firefox or Chromium code as well.
The main idea behind the extension is to add close captions or subtitles to videos on the Internet; this may be useful to add subtitles to a video that comes without any, use different language subtitles, or closed captions.
The extension supports the two formats .srt and .vtt at the time of writing, and HTML5 video elements on webpages.
The content scripts of CCaptioner are injected in the active webpage if its icon is activated by the user. It displays a "assign text track to" link to select the video on the webpage that you want to add the text track to (it may be detected without a click when you hover over it). A file browser opens automatically once you have done that which you use to select a .srt or .vtt file. It gets loaded, and you should see the captions or subtitles that you selected. The menu of the extension displays options to set a time offset once the text file has been assigned to the video successfully.
The extension replaces all existing text files with the loaded one to ensure that it can be displayed properly. You can reload the page to go back to the original state at any time.
CCaptioner works on sites that use the <video> element to load videos; it does not work on sites that use other means to play videos. A test on YouTube and Vimeo failed for example.
Users of the extension need to have access to subtitle files to use them. Current versions have no "search" functionality to find subtitles to make things easier.
Closing Words
CCaptioner is a specialized extension for Google Chrome and Firefox to add a text track to HTML5 videos on webpages. It can be useful to add subtitles or captions to a video that has none or one that is in a different language than the one that you would like to see supported.
Downside currently is that you need to locate subtitle files manually as you cannot use the extension without such a file.
Now You: do you use subtitles / captions?
you do realize that Youtube is using an HTML5 video object? the only difference is that they use a blob as the source
I wish there was a way to search through videos by dialog. Like when you are searching for a quote from a movie. Youtube and Google have realtime text transcription, if there was a way to search through it, but it’s probably not saved anywhere.
@Anonymous:
There *is* a workaround for locating a quote in a movie, *if* you have a freestanding subtitle file for it. Open the subtitle file in a text editor, search for your quote, and it will be preceded by a time marker (well … at least in SRT and VTT files, the only ones I’m familiar with). For example:
* * *
00:30:00,736 –> 00:30:02,670 [the subtitle’s start and end times in H:M:S,1/1000 S]
Bob’s your uncle! [the subtitle]
* * * *
Jump to the subtitle’s start time in the video and that should put you very close to the segment you were looking for.
Subtitle files are freely available on the Web for lots of movies, but to be honest, it’s probably not worth the time and effort just to locate a quote. If you already have the file on hand, however, it’s a quick and easy workaround.
I don’t know how YouTube handles on-the-fly transcription, but for videos that have pre-made subtitles listed as an option, YouTube-DLG for Windows and youtube-dl-gui for Linux give you the option of downloading freestanding VTT files for those subtitles along with the video.
Caveat: I *think* downloading videos from YouTube, even videos in the public domain, is technically a violation of YouTube’s terms of service. But YouTube-DLG/youtube-dl-gui works on a lot of other sites besides YouTube. It’s a pretty easy program to learn and use, except that it doesn’t offer a GUI command for updating the youtube-dl command-line program it’s a front end for. And since older versions of youtube-dl “get broken” moderately frequently, it’s important to learn the update command and maybe make a batch file or script for running it.
yeah I can’t believe Google hasn’t added this yet.
It’s not a stupid idea, but outside of presentations I see little use for it. If you have a subtitle file, you’ll probably also have the video offline for your personal use.
I use vtt files when I download YouTube videos and burn the captions/subtitles into them with FFMPEG, or just to archive the videos and the subtitles.
idk about this addon but i been using substital addon for quite a few month now…it kinda work with almost online video player & have subtitle search function, i dont know where it grab subtitle file though.
“subtitle search function”
This has been requested as the first filed github issue:
https://github.com/gorhill/ccaptioner/issues/1