• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Download youtube subtitle


Well-Known Member
Hello everyone

I am following manual steps to download subtitles from youtube
1- Copy the YouTube video link to google chrome
2- Press Ctrl + Shift + I (Developers Tools)
3- Click 'Network'
4- Play the video and click on "CC" to display the closed captions (subtitle of the video)
5- from 'Network' Tab >> Right-Click on the header 'timedtext?.." and open in new tab
6- in the new tab >> Right-Click and 'Save As' and save the xml file

* Here's an example of a video
How can I achieve those steps using VBA ..?

Thanks advanced for help


Well-Known Member
Thank you very very much for the links .. I have made use of the stackoverflow link and could get the url of the xml file of the video and I used the following code to download it
Sub Test()
    Dim http        As Object
    Dim oStream    As Object

    Set http = CreateObject("MSXML2.XMLHTTP")
    http.Open "GET", "http://video.google.com/timedtext?lang=en&v=qANA6POtuFo", False
    Set oStream = CreateObject("ADODB.Stream")
    oStream.Type = 1
    oStream.Write http.responseBody

    oStream.SaveToFile ThisWorkbook.Path & "\Sample.xml", 2
End Sub
Best Regards


Well-Known Member
I have encountered run-time error when trying this link

Marc L

Excel Ninja

Of course but not on my side even if I can see text rolling on video …

I should test on a more recent version when I could borrow a laptop,
maybe next week or the other week …


Excel Ninja
FYI - Some CC are done without list file and can't be down loaded.
Video from post #6 is one such example. You can test by...

Basically these captions are done via automatic speech recognition (asr) and there is no file to download via video.google.com.

For these, I believe you'd need to pilot browser or use some other method (I'd recommend using tool other than VBA).

Edit: Alternately you could use Julius or other speech recognition engine to transcribe. But then this is fun project, but not easy ;)


New Member
Anyone knows how to download video with the subtitle embedded??? I've tried many online downloaders and they all failed to do so, only getting a pure video with no subtitle at all. So I have to use my RecMaster recorder to keep a copy of the video with cc displaying on the image. The only advantage of this method is that I can directly cut some unwanted segments off during recording...


Excel Ninja
You should reread Forum Rules
There has written: Start a new post every time you ask a question, even if the theme is similar.