Clickable YouTube timestamps (Timecodes plugin)

Hello, community :wave:t2:

🤦🏻‍♂️

It looks like I did poor research before deciding to create my own plugin. It turned out there are already at least 2 plugins allowing you to work with video timestamps:

I have failed to find them because, in my native language, people use the word “timecode”, not “timestamp”. Maybe I need to change the plugin name now, let me know :sweat_smile:

At the same time, I would prefer to keep my plugin simple, without introducing additional syntax for videos or for timestamps themselves to make them clickable.


Do you sometimes make notes while watching videos on YouTube? I do. For me, it can be an interesting idea from a podcast or interview that I want to capture, or an important piece of knowledge from a video lecture or a conference talk.

I also try to capture the timestamp of a video because in future I might want to get back to the original source of the idea or share it with friends.

My regular flow to capture a moment in a video was to right-click the YouTube video and select “Copy video URL at the current time”. This action leads to copying the video URL of the following form to your clipboard: https://youtu.be/video_id?t=1234.
image

Having many links of such shape in a note did not look good. Moreover, if I wanted to share my timestamps with others through YouTube comments and make them clickable, I had to convert links into text timecodes of the following form: MM:SS (e.g. 11:44). YouTube automatically makes such raw text clickable.

What if I could write human-readable timestamps right away and Obsidian transformed them into clickable links like YouTube does? That’s how the initial version of the plugin was born.

If a note contains a link to a YouTube video, somewhere above, any further pieces of text that look like a timestamp will become clickable in reading mode, see the demo:

Image

While my PR for adding this new plugin to the list of Obsidian community plugins is on a long queue for review, if you would want to try the plugin right now, the other easy option to install the plugin is via Beta Reviewers Auto-update Tool (BRAT). Here is the plugin’s GitHub repository: GitHub - gavvvr/obsidian-timecodes-plugin: Makes timecodes clickable, if there was a video URL mentioned earlier in Obsidian note

For now, that’s the only feature of the plugin and the plugin’s name is too generic (assuming it can do many things with “timecodes”). I would like to hear your thoughts about what other features of working with timecodes/timestamps you would want to see.

Here are my possible directions of thought:

  • adding an action to convert https://youtu.be/video_id?t=1234 into a human-readable timestamp and vice versa
  • support for embedded audio content (I’ve seen this was mentioned in Discord)
  • support for other video hosting services supporting timestamps (like Vimeo)
  • if video content is embedded to note with <iframe>, clicking on the timestamp link might bring you to the exact moment in the video right in Obsidian without opening the link in the browser

I’d also been considering making timestamps clickable in note’s “editing” mode, but I don’t think it’s a good idea from a performance point of view. If there is a demand for such feature, I would rather make it optional (turned off by default)

2 Likes