brainhack-school2020 / ArsIsabelle_BHS_Project

Learning How to Run Matlab EEG-FFR Classifiers
https://inprogress.org/
MIT License
1 stars 4 forks source link

Embeding video in Jupyter notebook #7

Open arsisabelle opened 4 years ago

arsisabelle commented 4 years ago

Let's say that I would like to embed short videos, would you recommend simply uploading the video files in the Github repository or would embedding them in my jupyter notebook such as this (below) be possible: https://gist.github.com/thanasi/ad31f798b747629e717bcebd2cad15cf

Could there be some problems if as a reminder my jupyter notebook uses a Malab virtual environment? Any recommendations? @pbellec @emdupre

Thank you very much for any information related to this :)

Isabelle

emdupre commented 4 years ago

Hi @arsisabelle !

So you only have the video file locally, is that right ? You can upload it to your github repository, but I'd be careful about making sure you're not hitting the individual file size limit of 100MB (depending on how long your video is !).

In terms of embedding them in the Jupyter Notebook, you should be able to designate a specific cell as Python by starting the cell with the python-magic, and then including the code you linked to above:

%%python

from IPython.display import HTML

HTML("""
<div align="middle">
<video width="80%" controls>
      <source src="path/to/my.mp4" type="video/mp4">
</video></div>""")

Or you can try the HTML-magic in that same gist !

arsisabelle commented 4 years ago

Excellent! I will try that! :)

Actually, speaking of size limits, if my data files are of 61 MB for each subject, this means that I don't need to put them on OSF at the end? Or is this something that you would still recommend doing? (I previously thought the limit of individual files was of 25MB for each file, but I realize now that 100MB applies when files are pushed through the command line, which I did).

Is it easier for manipulation to keep my EEG data in the Github or on OSF? ( I aim for my project to be beginner-friendly so I could reuse it with research assistant and students).

Thank you for all your information and assistance :)