juliang22 / ObsidianTimestampNotes

This plugin allows side-by-side notetaking with videos. Annotate your notes with timestamps to directly control the video and remember where each note comes from.
184 stars 30 forks source link

Automatically import the video transcript #18

Open beniza opened 2 years ago

beniza commented 2 years ago

First of all, a big thanks from another Obsidian fanboy.

Disclaimer! I'm not sure if what I'm asking for is legally permissible according to the terms of services by various video streaming platforms like YT! and Vimeo. But I'll ask anyway.

Your plugin is a real timesaver. It also makes my side notes alive and interactive. I wonder if it's possible to automatically pull the transcript of a video (I do this manually) and then converting the timestamps in to clickable buttons using a regex.

Here are the steps I follow. image

  1. Open the video in Youtube
  2. Click on the [CC] button at the bottom of the video (It will only appear if there's a transcript available for the video.)
  3. Click on the [...] button next to the [Save] button on the toolbar.
  4. Choose the option [Show transcript]. This will open the transcript of the video next to the video itself.
  5. Copy the content of the transcript window after selecting (click and drag) the text in it.
  6. Now Paste the content into a new Obsidian file.

But if I can somehow get this done automatically, it will save a lot of time.

TIA,

profucius commented 1 year ago

Would like this to be automated too. If you are inclined to use python, this can be done manually via CLI, or added to a macro to automate. There is one trouble, the timestamps are in decimal format, so you would need to write into your macro to convert to real-time numbers.

https://pypi.org/project/youtube-transcript-api/#cli

TunaFFish commented 8 months ago

You can try it in tandem with the Obsidian YT Transcript plugin