CoCalc Public Filestemp.ipynbOpen with one click!
Author: Hossain Gerami Tehrani
Views : 162
Compute Environment: Ubuntu 18.04 (Deprecated)
In [9]:
from IPython.display import HTML
In [11]:
import io import base64 from IPython.display import HTML video = io.open('MDP.mp4', 'r+b').read()
In [14]:
encoded = base64.b64encode(video) HTML(data='''<video alt="test" controls> <source src="data:video/mp4;base64,{0}" type="video/mp4" /> </video>'''.format(encoded.decode('ascii')))
WARNING: Some output was deleted.
%%HTML <!-- TODO --> <div id="15110421761413674"><script type="text/JavaScript" src="https://www.aparat.com/embed/4psO7?data[rnddiv]=15110421761413674&data[responsive]=yes"></script></div>
In [13]:
%%HTML <video width="320" height="240" controls> <source src="Final2.mp4" type="video/mp4"> </video>
In [ ]: