Created
August 6, 2020 22:19
-
-
Save Davidnet/e6df65656f62dc5691ace6fcf0bb00f8 to your computer and use it in GitHub Desktop.
Snippets_for_colab
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
# Como reproducir videos en Colab | |
from IPython.display import HTML | |
from base64 import b64encode | |
mp4 = open("/content/examples/videos/roller-coaster.mp4", "rb").read() | |
data_url = "data:video/mp4;base64," + b64encode(mp4).decode() | |
HTML(""" | |
<video controls> | |
<source src="%s" type="video/mp4"> | |
</video> | |
""" % data_url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment