Welcome everybody, you're watching Mr. Fugu Data Science.
Today, we're doing: a how to add subtitles for YouTube videos the easy way and for
free. Let's get into this this is my latest video, we're going to go in to
editing. We're gonna go into our where you would edit your file.
So after you've added your punctuation and kind of the feel of how you would
like your video to look. You save this file publish your edits. Alright, so we
publish these edits. Then what we can do is we can go back here refresh and then;
I can download this file. So I save this file if you look down at the bottom left.
You go on to Google and then you just will look for subtitle edit, and then
it's this first one right here. So you go into this and then you need to go into
subtitle edit online. And then just choose a new file, and then you need to
open.
Find your file that you're looking for choose the frame rate for me I'm using
the lowest frame rate. Then I have my file imported in choose the language
that you want to use. Let's just use I don't know we could use anything, let's use Russian.
So we use your a Russian right here. Scroll down to make sure that everything
was converted before you hit okay. Just to double check real quick. Save
everything, download this as an SRT file. I could close this out. Here's where it
gets interesting I'm going to use a terminal as well as
going into my downloads. After, I take the file from my downloads I place it onto
my desktop. Then I'm using a vim editor but you use the editor of your choice.
You're gonna see why I have to do this. So I call on the file, and here's our
here's our stored Russian file format. Now, why did I have to use this editor?
Since, I use punctuation within my data: you can see that this becomes a problem.
You see this these notations these tags they look similar to HTML tags right. The
problem is when you do your subtitle or a closed caption editing within YouTube
and then send it to the online application that we use to do the
translation. You end up having these issues here after you create your
punctuation. So what I figured out is to do some regular expression formatting.
So here what you want to do is hold down the shift and then hit the colon and if
you look at the very bottom here; on the bottom left. You'll see something
interesting. And what happens is the there's commands that you can use and
I'll show you the commands that I've used previously. And you just will need
to copy these, okay. The first one is using the percent small s and then you
have a slash and then you'll see like a lesson operator and then you know
forward and a backslash and a font and then two more slashes and a G. And what
that's doing is is taking care of these right here these ones right here. So then
after you type that in you need to press ENTER. Then you'll see it says 276
substitutions. So you notice that it got rid of that right. But, now you still have
these tags and when you get rid of these tags you're gonna see something. So we'll
push shift and then colon once again and then now we need to get rid of those. So
now the new thing that you need to put in is % small s and then you'll finish
it off with these right here and then press ENTER once again. And you'll see
let it perform the substitutions. But, it got rid of the little on notation here
that you need to get back. Because, this is the timing for our srt file. So we'll
do another command or we'll do shift colon and then you have this last one
here. Where we're going to replace with the original formatting that we had.
If you're unfamiliar with what's going on here: this is called a find and
replace. And this is how you do the formatting in the vim editor, all right.
I'm using a Mac, if anybody's curious. So you do this and then it performs the
substitutions and fills in for the notation that we had above. Now, you need
to save this. Now you do shift colon W for write q for quit. Now you save this
file so it's in the proper formatting. We need to go back in to YouTube ,and we're
going to add a language. And let's find a Russian. We have Russian. We go here you
upload your file, you choose your file. I upload my file. Now make sure everything
looks good in here and we're good to go. We publish this. We see now we have
Russian, we can hit the past page we refresh now we have Russian. Now we need
to do the title and the description here. In order to do this,
need to go to google translate. And what you do is you just copy this paste it in
choose the language you want hit the copy button, go back in here paste it in
and do the same thing with the rest of the information that you want. And then
just publish this and do the same thing for all of the other translations you
would like to do. I would like to say thank you for watching this video. Please,
subscribe and turn on that notification bell. Have a good one and I'll see you in
the next video. Bye