Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

/a.rb

Created April 1, 2015 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4a2155e781f1ac484fc4 to your computer and use it in GitHub Desktop.
Save anonymous/4a2155e781f1ac484fc4 to your computer and use it in GitHub Desktop.
from IPython.core.display import HTML
video = open("time.mkv", "rb").read()
video_encoded = video.encode("base64")
video_tag = '<video autoplay loop controls alt="test" src="data:video_encoded/x-m4v;base64,{0}">'.format(video)
HTML(data=video_tag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment