Transcribe Youtube Video – and Remove Timestamps With Linux

Share on FacebookShare on Google+Pin on PinterestTweet about this on Twitter

I wanted to remove timestamps from Youtube video transcripts. For whatever reason Youtube transcripts have a timestamp in the video for each line of text. I found a solution using Linux vi editor.

All major distrobutions of Linux come with vi editor. First you want to create a Youtube transcript. Open up a video that you want a transcript for.

You will notice three dots under the video title to right of "Share". Click on those three dots. Choose "Open transcript". You will now see your transcript.

You will notice a timestamp on each line on the left. Copy and paste this transcript into a text file. You can create this text file on MAC, Linux, and Microsoft Windows computers.

You can then transfer this text file to a Linux environment. At a Linux command line you just type in:

vi xxx.txt

You replace xxx with whatever you named your text file. This file will open up in a Linux vi editor. Then once you have this file opened you want to press your shift key and colon key to create a :. At this colon : prompt type in this command:

%s/^....//

Your vi editor window will look like this:

:%s/^....//

Hit your enter key and as long as you copy and pasted or typed that command in correctly all of the time stamps from your Youtube transcript will get removed. Now you want to save that text file with those changes. Hold down your shift and colon key again to form a :.

At this : prompt type in a lower case w, lower case q, and ! exclamation point to form this:

:wq!

The lower case w stands for write and lower case q stands for quit. This will save your changes to your text file you just made and then quit vi editor. You have now successfully removed all of those time stamps from your Youtube video transcript.

Leave a Comment
Share on FacebookShare on Google+Pin on PinterestTweet about this on Twitter

Leave a Reply