-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embedding local videos works imperfectly #1024
Comments
This might be a symptom of #968 - it probably needs to support some HTTP range requests to enable jumping to specific points in the video. |
I believe that |
@takluyver, thank you for getting back to me. |
Probably copy or symlink it to the directory where the notebook is (this is the working directory, unless you've changed it), and then use a relative URL. |
@takluyver, haha, I just symlinked it (before reading your answer) and it just did the trick. |
If you're loading the HTML page as a |
@takluyver, understood. Thank you. I was not aware of these quirks. |
I'm having the same issue as the original post here, and I'm using a relative path to my video. In Chrome only, "the video plays fine, but the timeline remains in "loading" state and it is not possible to jump to any location except back to the start" is exactly what I'm seeing with the magic cell. When I embed and decode manually with IPython.core.display's HTML, I can scroll through the video, but it's really slow. (This is a 200kb movie with 100 frames.) Edge's HTML player allows me to scroll through without any lag. I don't know anything about HTML so I don't understand the above thread; how can I replicate Edge's performance in Chrome (and get the magic cell to work)? |
@zachjweiner What version of notebook are you using? Try I have tried the following with a # In[1]
from IPython.display import Video
Video('./video.mov')
# In[2]
from IPython.display import HTML
HTML("""
<video width='480' height='480' controls>
<source src='./video.mov'>
Your browser does not support the video tag.
</video>
""")
# In[3]
%%html
<video width='480' height='480' controls>
<source src='./video.mov'>
Your browser does not support the video tag.
</video> |
I'm on 5.0.0 (I just set things up a week ago), and all of those methods replicate the behavior described originally. What does work is @Atcold's solution from 2/10,
does work. |
Try upgrading notebook to 5.2. It looks like this was resolved with #2656 which was introduced in 5.1.
|
Thanks, that did it. (Although, I will say that Chrome's video player is much slower to scroll than Edge's, for example. But that's probably a Chrome issue.) Didn't realize anaconda wouldn't necessarily have the most recent version. |
I have a notebook where I'm generating and then displaying a video file using the following HTML snippet:
This works to some degree but there seems to be something wrong.
The notebook server logs the same thing in all cases:
[I 18:11:02.417 NotebookApp] 302 GET /notebooks/path/to/movie.mp4 (::1) 1.22ms
If I instead use a direct
file:///
URL the video works as expected with the ability to jump around.Embedding images eg.
<img src="local_image.png"/>
works fine.A search through the web yields several pages that advise using Base64 data instead of an URL, but it seems like this almost works. Is it a known issue with the way local files are served?
The text was updated successfully, but these errors were encountered: