Skip to content

chbarts/youtubeannotations-to-srt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

youtubeannotations-to-srt

This small tool (C# console application) lets to convert youtube annotations (XML) to SRT file.
Source code: C#

Usage

  1. Download youtube annotations as XML with this opensource tool: youtube-copy-annotations (you only need to use Step 1: Get annotation data)

or you can directly get the annotations with this URL: https://www.youtube.com/annotations_invideo?video_id=YOUR_VIDEO_ID, just replace YOUR_VIDEO_ID with your real youtube video id (which is available in the URL of your video)

  1. Convert the downloaded XML using this project:

    2.1. Compile project (with a C# compiler or using Visual Studio). You will get a ConvertYoutubeAnnotationsToSRT.exe (or you can simply download it, if you trust me)

2.2. Using cmd, run the .exe passing the XML file path as an argument (just type the path after the .exe, separated by one or more spaces).

If you want to see the output in the console, just type:

   ConvertYoutubeAnnotationsToSRT.exe C:\annotations.xml

If you want the output written to a file, type:

   ConvertYoutubeAnnotationsToSRT.exe C:\annotations.xml >> C:\output.srt

TO-DOs:

  1. Accept an argument that enables writing to a file instead of writing to Console's output.
  2. Maybe create a GUI, or a web application
  3. Do more tests and check exceptions

About

Convert youtube XML annotations to SRT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%