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.
Metadata
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 | Provenance | Actions |
|---|---|---|---|---|
| obsidian_media-2.0.0.tar.gz | 11.3 kB | Without provenance | Details for obsidian_media-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| obsidian_media-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for obsidian_media-2.0.0-py3-none-any.whl |
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
|
Security for obsidian-media 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.