Obsidian media embedder
This is an extension for Python-Markdown which allows you to embed audio or video files as easily as images by simply writing:


Additionally, this plugins allows to specify an image size the Obsidian way, e.g.:
 <!-- width and height -->
 <!-- only width -->
Supported formats are:
- Images:
avif,bmp,gif,jpeg,jpg,png,svg,webp. - Audio:
mp3,wav,m4a,ogg,3gp,flac. - Video:
mp4,webm,ogv,mov,mkv. - Other:
not yet.md,pdf
And even more than that! It embeds youtube videos too!

Usage
Simply enable the extension like this:
import markdown
md = markdown.Markdown(extensions=['obsidian_media'])
print(md.convertFile('page.md'))
MkDocs
It can be used with MkDocs as following:
# mkdocs.yml
markdown_extensions:
- obsidian_media_mkdocs
For the best results, I recommend using it together with my mkdocs-obsidian-bridge. This would allow you to simply write:
![[assets/audio/my favourite song.mp3]]
![[assets/video/birthday party.mov]]
![[images/photo.jpg|400x300]]
![[images/photo.jpg|200]]
Credits
This extension is heavily inspired by orobardet/pymarkdown-video and motivated by @pipe-organ in GooRoo/mkdocs-obsidian-bridge#17.
Release files for obsidian-media 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| obsidian_media-2.0.0.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| obsidian_media-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.4 kB
Release files / obsidian_media-2.0.0.tar.gz
| Download URL | obsidian_media-2.0.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32ba18569f60d2ea747f8fdb72f979bbd265b2ef1305c95ef82d5efe21c7fca5
|
|
BLAKE2b-256 checksum How to use checksums |
2afa99965ada8a2c84195dcd26ca72efc2f4bf515059a075625bcc8269d2abb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.14
|
Release files / obsidian_media-2.0.0-py3-none-any.whl
| Download URL | obsidian_media-2.0.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c1370cf2f6c488ab18fdfd1be1b07ae475d30983c8481dc6ba7836e85f75970
|
|
BLAKE2b-256 checksum How to use checksums |
1811f83635e9bb098cbda2ad035bd1f27f48f6cce27aa954a0e11fb735184b4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.14
|