How to add a thumbnail to a local video embed?

I am embedding local video files into notes as part of a study course. I download the video files to my local system before doing that.

When embedding a video into a note I would like to either embed it at a particular timestamp or to embed a thumbnail that when clicked runs the video. The timestamp picture or thumbnail would show my most important message of the video.

I don’t mind what approach is used so long as the video shows an image that I think is most important. Other solutions would also be fine, although I would prefer to have the thumbnail and video link up.

Performance issues are also a consideration because each note has many video embeds. I one note per unit, which lasts roughly two weeks.

Does anyone know how to accomplish this?

There are various scenarios, depending on where you store the video (online, or hard drive) and the thumbnails (in or out of the vault).

Based on this, you don’t want to keep stuff in your vault indefinitely.
But…your vault is your vault, your private stuff for ever and you may want to keep it. So you can use the externally linked thumbnail method.

Of course, if you need a new computer (you’ll run the risk of breaking your links), then you’d be better off putting all your stuff on an external hard drive. And for important stuff, keep a copy of your external drive (to another external hard drive).

How you want to go about it depends on your volume.

  • From this, I gather you can do this one by one so you will not need scripting to automate large volumes at once or on demand.
    If you think that the fiddling of the syntax for many items proves too troublesome, throw all your thumbnails and/or videos (if applicable) to a folder where you want to keep these, and ask for Claude.ai for you to write a Python (or bat/sh) script, where you would dump all the the links in a single md file you specify, and then you would just cut and paste the links into dedicated md files.
    You’d prompt the bot with the syntax needed as the outcome (it is possible the bot will miss the embed, so you need to tell it to not miss it) and the base_folders for input and output and the name of the md file.
    Usually the script is working for the first 1-3 tries, depending on proper prompt.

How to handle links

This is the syntax that makes a clickable video in Reading Mode:
[![[yourimage.jpg]]](<file:///pathtoyourvideo/video_filename.mp4>)
The image can be anywhere in your vault.
But…
…it can be on your PC anywhere outside your vault…
…then look at the second part, how it is syntax for a video that is definitely outside your vault.

  • I added < and > to allow spaces in filenames.

If it’s an online video, for example, Youtube video, then the syntax is similar, for example:
[![[yourimage.jpg]]](https://youtu.be/h6IRraMTaMY?si=mqlk3CguK0k5_x95)

You need to pick that yourself then, by taking a screenshot.

  • If you want the the screenshot in your vault, copy the screenshot (or it may be already on your clipboard), paste (CTRL+V) into the Obsidian md file of your choice.

    • Image Converter is a helpful community plugin to convert big png files to jpg’s. It can do other stuff too, like resize, destructively or non-destructively.
  • If you don’t want the screenshot in your vault, save it on your PC as regularly done, and drag the saved pic with CTRL+ALT pressed down whole dragging. Obsidian will link the image (will not copy the image to the attachment folder). Then you’d need to embed the video link with the syntax shown above.

  • To my knowledge, this is a manual job, so there is no utility within Obsidian that merges the image thumbnail and the video reference link.

You bring in the videos the same way. You select the video, and drag it into the open md file with CTRL+ALT pressed.
The link will be like:
[filename.mp4](file:///encoded path plus video filename.mp4)

Then you do the same with the image. The link will be like:
![imagefilename.jpg](encoded path plus image filename.jpg)

This will need to be merged into:
[![Thumbnail](file:///encoded path plus image filename.jpg)](file:///encoded path plus video filename.mp4)
…or you can remove the ‘Thumbnail’ word as well:
[![](file:///encoded path plus image filename.jpg)](file:///encoded path plus video filename.mp4)

Otherwise, if your image is in the vault, the syntax, as I’ve shown above, is:
[![[yourimage.jpg]]](<file:///pathtoyourvideo/video_filename.mp4>)

  • Note: if you drag and drop the items, Obsidian will encode the path and filename, so no need for the < and > characters to flank the path and filename.

There are niche use cases, when one wants to use the same vault on a mobile device and want to make the same thing work. Those cases are a bit more tricky, as you would need to set up and run a server on the PC (with external drives attached) and exchange the links with URL’s such as http://192.168.0.102:8080/encoded path and image filename.jpg) and for the video part it will get even more tricky…

1 Like

Hello,

Everywhere I look, I see the same system of approaching this problem but for some reason, its not working for me.

I usually use WikiLinks but even though the links wont update this way, Id use the “file://” option to open my video-files externally.
(This is more useful if I want to open multiple videos in quick succession in VLC, which adds them together into one playlist)
However for some reason, Obsidian doesnt recognise the whole structure, only the image and video seperately but not combined into one. And if so, it only displays the text and not the image…

Are there any settings that Im missing that I need to change for this to work?

I snapped my windows so you can see everything in one image:
Left = Video Display (Link is working on click (With displayed text) but no thumbnail Display)
Middle = Note Reading View (Working links but no clickable Thumbnail)
Right = Note Editing View

One slash missing.

Can’t.

No settings.

Embed link is like this:
[![[yourimage.jpg]]](<file:///pathtoyourvideo/video_filename.mp4>)

The Image wasnt the highest quality after uploading but with zooming in Im able to read everything. On PC at least.

Alright, I figured it out!
That you for your tip, its not quite what was working but it was my solution at the same time.

This one doesnt work at all, no image displayed:
[![](obsidian://open?vault=CreepyVault&file=F-001536.mkv)](file://A:/Obsidian%20Vaults/CreepyVault/CV-03_Files/F-001536.mkv)

This one works kinda, link works (with both two and three slashes) but text displayed:
[![[F-001537.png]]](file://A:/Obsidian%20Vaults/CreepyVault/CV-03_Files/F-001536.mkv)

In the end, whats working for me is this:
(Just cant rename the file path, which includes moving the Vault or just the file inside the vault, ever, for this to work)
[![](file:///A:/Obsidian%20Vaults/CreepyVault/CV-03_Files/F-001537.png)](file://A:/Obsidian%20Vaults/CreepyVault/CV-03_Files/F-001536.mkv)

For reference, this is my code-block so that I can have both normal tables and a “cards” table inside one page.

I can see that both image and video are supposed to be inside the vault. That’s not going to be pretty in the long run.
But you are using Dataview which may need the files in the vault. (No experience with DataviewJs linking to media files outside the vault, but if there’s a limitation, you can create markdown tables and then link to media outside the vault.)

I admit your issues (or my issues with understanding) came from the added overhead of rendering in Dataview.

I’m not sure where I’ve seen DVJs scripts linking to external media files.

You could possibly trick Obsidian and Dataview into thinking your external media files are internal ones by symlinking a top folder as mentioned in this recent thread:

Then, as mentioned there, there’d be no need to worry about moving files around in folders (with Obsidian closed) and absolute paths.