▶ React web application showcasing custom subtitles overlaying multiple YouTube videos.
| public | ||
| src | ||
| .gitignore | ||
| demo.gif | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Custom YouTube Subtitles
A website showcasing the ability to overlay custom subtitles for multiple YouTube videos using .vtt files.
How to Use
- Create captions for a YouTube video and save them as a
.vttfile.- One method is using online caption-making software or Adobe Premiere Pro, exporting as a
.srtfile and then converting it to a.vttfile using an online conversion tool.
- One method is using online caption-making software or Adobe Premiere Pro, exporting as a
- Rename the
.vttfile to the video ID of the YouTube video.- For example if the YouTube video you're captioning is at https://www.youtube.com/watch?v=-JTq1BFBwmo then the video ID is after the
=symbol as-JTq1BFBwmo.
- For example if the YouTube video you're captioning is at https://www.youtube.com/watch?v=-JTq1BFBwmo then the video ID is after the
- Add the
.vttfile to/src/captions/and add the video ID to the array incaptions.js. - Build the React application and deploy it.
Conclusions
This was helpful in understanding how to work with the Video.js player and adding my own custom subtitles.
There is a possible issue where adding more caption entries may result in a single row of selectable videos to become too crowded/long, so this could be fixed. Though I don't plan to as this isn't a production application.
