Transclude \ Embed external files (audio, videos, pdfs) present on the computer outside the vault

To answer the question from yesterday-me, yes it is. I just had the syntax wrong (and issues with white spaces). These two examples embed the same image file (which lives on a virtual drive mounted with the letter “P:/”)

![](<P:/My Pictures/friends.jpg>)
![](P:/My%20Pictures/friends.jpg)
2 Likes

I have a similar problem to the thread starter: I want to use Obsidian to work on a huge file repository (about 135k files from 25 years of digital life…). Integration into the vault doesn’t work (tried & failed already). Thus repository and vault must live side by side, and I need external links to refer from vault to repository.
Absolute links are fragile (change of computer. NAS, etc.). The need for relative links has been mentioned often here, and I want to add my request on that.

3 Likes

I also want to write notes on audio files from a large set of external files.

Did you find a way of creating an embedded audio player for an external audio file?

Don’t know about Windows, but if you’re on a Mac or Linux machine, you could simply symlink your music folder into the vault.

Nevertheless, I’d advise against this method, since it can put a heavy burden on poor Obsidian—in my case, it’d suddenly have to handle ~200,000 files more … Which increases the vault loading time here by ~8 minutes (!) and makes Obsidian almost unresponsive.

If you still want to try it, here’s an example (Linux):

ln -s ~/Music/Tagged ~/Documents/Vault/Music

Assuming the vault was in ~/Documents/Vault, this would create a folder Music within the vault, containing whatever was in the (external) folder ~/Music/Tagged.

I would like to request that transclusion applies to files outside of a vault.

For my work and personal writing, I have a few folders external to my zettelkasten vault:

…/zettelkasten
…/08 Reference
…/08 Reference/definitions
…/08 Reference/wordstudies

When I write in nvUltra and MultiMarkdown Composer, using their transclusion syntax (double curly braces), I can transclude any file (image or .md…and I think .pdf, though I haven’t tried that yet) into my current article or note.

For example, I can write in my file…

It’s important to remember that audience means {{../08 Reference/definitions/audience.md}}, which is important for this project.

…but in preview and when I export or print, what you see is:

It’s important to remember that audience means audience noun au·​di·​ence | ˈȯ-dē-ən(t)s , ˈä- Definition of audience. 1a : a group of listeners or spectators The concert attracted a large audience. b : a reading, viewing, or listening public The film is intended for a young audience. 2 : a group of ardent admirers or devotees has developed an enthusiastic audience for his ideas 3a : a formal hearing or interview an audience with the pope b : an opportunity of being heard 4 : the act or state of hearing Give me audience and heed what I say., which is important for this project.

(I probably should have picked a better definition :stuck_out_tongue_winking_eye:)

I do not want want /definitions or /wordstudies in my zettelkasten, but I do want to pull in important information I have created and saved elsewhere.

I hope this is clear!

Thank you for considering my request. :bowing_man:‍♂

4 Likes

The 1st thing I thought when reading the title was: “great idea, I can transclude markdown notes, incl. to #headers in the notes, that are not in my vault but elsewhere on my computer”.

That is not what the OP has in mind, but that is what I would like to add to this feature request.

4 Likes

This should be a straightforward extension of my original post: include support for the file:// url scheme in the remote note address.

1 Like

Yep, I agree, that’s why I jumped on the opportunity immediately. I do hope they will implement your feature request because it would solve a big issue for me.

2 Likes

It would be a really great workflow to for example use the new iOS app Highlighted, which allows to easily drag and drop highlights/quotes from for example Apple Books (and other readers) or even camera scanning of a physical book’s page with OCR transcription to capture and organize by book. It has an option to export those quotes as Markdown files.

If Highlighted would live reflect all new highlights and newly made changes to a Highlighted folder in iCloud, which contains live exported copies of all highlights of a books as flat .md files, it would be the perfect source for those “remote” (= not in the main vault folder) notes that contain quotes/highlights.
This approach would be very similar to how Noteplan stores its data or how GoodNotes and Notability offer live backup as a flattened PDF for reference.

Your expansive literature notes, conclusions and self-written summaries would be composed in Obsidian and put into context with other notes. The verbatim quotes from a book could then be transcluded from the book’s quotes/highlights source from the Highlighted folder. Due to Obsidian transcluding by headlines. It would even be possible to update the files maintained by Highlighted by even adding new quotes in between existing ones without breaking the Obsidian transclusions.

Wow, that would be the almost perfect workflow without redundancy, bouble-bookkeeping or copious amounts of copy/paste sessions.

4 Likes

Question 1: is embedding local markdown files outside of the vault part of this request or should I open a new one? @WhiteNoise

Question 2: are the features mentioned here still missing from Obsidian?

2 Likes

No, this is not implemented yet, and yes, this FR includes markdown files.

I would like to know whether there’s plan for Obsidian to support relative path “…/”. I’m using Obsidian as part of a project. Please refer to the picture below, its a project folder hosted inside Google Drive File Stream.
Screenshot 2022-05-20 105211

For example in R, I can use R in my home computer, and in my lab. Because of the ability to use relative path, R can pull in data from another folder, and output in a different folder. And this is a consistent behaviour across computers.

Currently for Obsidian, if I put in a relative path, it will be converted into absolute path, and this can no longer be used in a different computer.

So, as a workaround. I decided to shift the vault into the project folder itself. Look at the screenshot below. Change a few settings, so that all new note, attachment or insert will go into the Obsidian folder.
Screenshot 2022-05-25 172739

The aftermath. Opening this vault took a hit in loading time. 20 seconds loading time compared to near instantaneous previously. I could not tell whether this is because there’s a lot of files, or because the project folder is in cloud.

I had thought of using the same structure but was concerned about performance. I posted a feature request to have a way to exclude folders from indexing other than the filenames or some variation. If we had that we’d also have portable vaults that can be mirrored to other systems and links would work.

The problem with relative links is that file:// URIs don’t support relative links.

Number of files will certainly impact load times. Cloud storage-located files shouldn’t, unless Obsidian needs to force your device to redownload cloud files all the time.

That project is around 40,874 files right now. A quarter of them are pre-processed individual CSV files. A quarter of them are intermediary files used by an old plotting program. Half of them are png images that’s needed to be turn into animated GIF using an old program. They could be automated with R, but I have not needed to do it again right now to bother about it. I should probably do something about it soon.

The important scripts and documents are probably less than 500 files. Which is nice if I can tell Obsidian to not index some of the folders.

This is off topic of this thread, but, have you tried the recent ignored-folders feature?

Implemented in 14.6:

https://forum.obsidian.md/t/obsidian-release-v0-14-6/35640

1 Like

I know it’s off topic, which is why I didn’t ask more question about it.

I did try the “Excluded Files” option. Which excludes around 90% (roughly) of the files. There is no noticeable difference in the loading time. I did time (manually) before and after, around 20 seconds for both.

Does this also include the transclusion of obsidian: URLs?

That’s what I was trying to do, embed a note from another vault, and some searching landed me here. Or shall I open a new FR for that?

1 Like

I think that’s a new request… in my interpretation, this is for transclusion of files in the same vault.