Skip to content

Instantly share code, notes, and snippets.

@Davidnet
Created August 6, 2020 22:19
Show Gist options
  • Save Davidnet/e6df65656f62dc5691ace6fcf0bb00f8 to your computer and use it in GitHub Desktop.
Save Davidnet/e6df65656f62dc5691ace6fcf0bb00f8 to your computer and use it in GitHub Desktop.
Snippets_for_colab
# 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