-
-
Save pvrego/c0246e60de707e3c8b73e3c0fd5e4553 to your computer and use it in GitHub Desktop.
Embed a local video file in a Jupyter Notebook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################### | |
# using cell magic | |
######################################### | |
%%HTML | |
<div align="middle"> | |
<video width="80%" controls> | |
<source src="path/to/my.mp4" type="video/mp4"> | |
</video></div> | |
######################################### | |
# explicitly calling the HTML renderer: | |
######################################### | |
from IPython.display import HTML | |
HTML(""" | |
<div align="middle"> | |
<video width="80%" controls> | |
<source src="path/to/my.mp4" type="video/mp4"> | |
</video></div>""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment