<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks


HOW TO remove time codes from a WebVTT file

MSDN Channel 9 has started providing captions for videos in WebVTT format. This means, you can use that file to read it as a transcript when you are on a low bandwidth Internet connection instead of watching the video.

You can grab the subtitles file by appending /captions?f=webvtt&l=en to the Channel 9 video (if it is available for that video). For example, http://channel9.msdn.com/Shows/Azure-Friday/Scott-Guthries-explains-SQL-Databases-in-Azure/captions?f=webvtt&l=en will get you the captions file for the Azure Friday discussion on SQL Databases.

A typical WebVTT caption file looks this -

When the time codes (representing the time within the video when the words are spoken) are present within the text file it is a little distracting to read the content. You can get rid of the timestamps using an editor that supports finding & replacing text using regular expressions.

Use the expression \d{2}:\d{2}:\d{2}\.\d{3}(\s)+-->(\s)+()\d{2}:\d{2}:\d{2}\.\d{3} to find a match for the time codes and then replace it with a blank string:

Labels:

Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »

»

Post a Comment