Link to timestamp of embedded audio

I’d like to create links to an instant of time , or interval of time, of the embedded audio.

For example, if I want to write thoughts about a part of a conference audio, let’s say from 12:30 to 12:47, I coud write a link to that part simply doing this:

[[audio.mp3(12:30-12:47)]]

Another example: if I want to write thoughts about the specific moment, I coud write a link to that part simply doing this:

[[audio.mp3(12:30)]]

Clicking on link, Obsidian will reproduce audio in that interval or from that istant of time, respectively.

14 Likes

+1 Both audio (this request) and video please.

1 Like

Mechanically, it might be useful to put the syntax for this sort of thing in with that for resizing images (coming soon) as the payload side of an embed link.

So, more like [[audio.mp3|12:30-12:47]]. That’d keep it more in line with current syntax.

That said, I’m not sure if that kind of extension is something they’re looking to do. It could be done via plug-in API bits once that goes live, obviously.

2 Likes

this feature of specifying playback range is specified in Media Fragments URI (also described in here) and already been implemented in chromium. I’ve test it by manually appending #t=[starttime][,endtime] to the end of src of the <video> element in preview mode and it works perfectly.

+1
After PDF, this would be great for study.

So, how exactly would it work when taking notes from an audio source on my local machine?
I tried with the following, but to no avail:
![[Kastrup on Jaimungal.m4a#t=00:29:14]] What does it mean to “explain” without reductionism?
The link itself works, but the timestamp is being ignored.

The tag for timestamp has not been implemented in the obsidian yet, so attaching it directly into internal links won’t work. For now, the only way that works is to use raw HTML code, which can be done as the following video:

1 Like

Hello, ppl generally talks about embedding a video with timestamps.
But is it possible to add a video and then control it by timestamps like we do in youtube?

An example photo to show my idea.

Good News! I’ve written a plugin that allow timestamps and media fragments to work in Obsidian, go to Github for more details: alx-plugins/media-extended

7 Likes

Awesome! Thank you so much!

Awesome news. Thanks @aidenlx but it says “failed to load”. Do you know the reason?

Could you press cmd + option + i, open the console section, and take a screenshot of the console output when you try to load plugin?

Thanks @aidenlx. I restarted program when I try to activate your plugin I receive that error.

sounds great but I can’t find this plugin.

For now you have to install it manually. It will be added to community plugins.

It seems that the main.js is missing. Have you add both manifest.json and main.js from GitHub release to the media-extended-main folder?


These two files should be included. If you did and still got the same error, may try to open the file with a text editor to see if the file is garbled or empty.

When I download your files from here there is no main.js file. Should I suppose to download it from somewhere else?

Here are main.js and manifest.json, It seems that you’ve downloaded the source code.

Thank you @aidenlx for this very useful plugin ! It works great for me with .mp4 files but fails with .webm files.

Here is what the html source looks like for the audio element. It seems that the media-fragment syntax has not been added at the end of the file path inside the audio tag.

<span alt="Recording 20210327113219.webm > t=6" src="Recording 20210327113219.webm#t=6" class="internal-embed media-embed is-loaded">
    <audio controls="" src="app://local/C%3A%5CTemp%5CRecording%2020210327113219.webm?1618008194520">
    </audio>
</span>

And for the video element, the media fragment is effectively here.

<span alt="20180625_013222.mp4 > t=5,15" src="20180625_013222.mp4#t=5,15" class="internal-embed media-embed is-loaded">
    <video controls="" src="app://local/C%3A%5CTemp%5C20180625_013222.mp4?1618006957050#t=5,15">
    </video>
</span>

Fixed in Release 1.0.1 · alx-plugins/media-extended (github.com)

2 Likes