At no additional charge, CaptionSync has the ability to show captions on someone else's YouTube videos via the CaptionSync Smart Player when a Transcription/Captioning request is made via our List of URLs feature. Learn how to use this feature in our Smart Player tutorial.
Captioning your own YouTube video is pretty straightforward. But YouTube does not allow you to add a caption file if you are not the video owner. Fortunately, there is a workaround for this. JW Player provides a nice way of adding captioning to any YouTube video. This tutorial shows you exactly how to do this.
To use this method you need just two things: JW Player version 7.0 or higher installed on a webserver, and caption file(s) in either 2014.VTT, DFXP or SRT format, stored on the same webserver. Download and installation instructions for JW Player can be found on the JW Player website.
Embedding Videos with Closed Captions:
- Upload the .2014.vtt caption file that CaptionSync generated for your media to the same webserver where you installed JW Player. You may want to have a separate subdirectory for all of your caption files.
- Create an embed code, that references your instance of JW Player, the YouTube video that you have captioned, and the caption file. Captions are embedded in JW Player by adding a tracks object inside the playlist object.
- Save the embed code on a web page on your website or learning management system.
Here is an example of the embed code using multiple languages - English and French. The English captions will render by default:
The portions highlighted in Bold and Italic should be replaced with URLs specific to your installation and the particular video and caption file:
- jwplayer.js: The URL to the jwplayer.js file, installed as part of your JW Player installation.
- file: The first file parameter should be replaced with the URL to your video file. Subsequent file parameters within the tracks object should be replaced with the URL to the caption file created for the video. Note that the caption file should be on the same webserver as the JW Player files. If they are not, you will need to use a crossdomain.xml file, as explained in this article about Crossdomain File Loading.
- label: A human-readable name of the captions track (e.g., English Captions). This is displayed in the captions selection menu if more than one track is provided.
- kind: The kind of text track - e.g., caption. Since captions are the default, this option isn't required. It's good to add this property for readability though, since JW Player supports VTT files which reference thumbnails.
Once you have JW Player up and running on a webserver and your initial video displaying with captions, captioning other YouTube videos can be accomplished very simply by submitting the video to CaptionSync, uploading the caption file to your web server, and creating a new embed code with references to the YouTube video and the caption file.