-
Notifications
You must be signed in to change notification settings - Fork 44
Add mp4 and png fallback to webm videos #298
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
Conversation
Huh, why did CircleCI action not run? |
This fixes https://napari.org/stable/tutorials/annotation/annotate_points.html on my phone! (Safari) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked everything on my mac and phone. Two videos don't work--I think it's a path thing.
I'm not sure how to check the static image?
401d0a5
to
bd6aeef
Compare
How expensive will be built them during build steep instead of storing a few versions in a repository? |
The pngs are manually generated for now. The mp4s come from a ffmpeg conversion step so potentially could be automated. This could also only be done on deployment instead of every commit. |
we may also run this when someone add/modify video content |
Gah, this has conflicts with the big layer PR, which also had videos. |
It's expected, I can fix those, I've already created the alternate versions when updating the layer videos. |
I believe I am going to take @Czaki's suggestion here and make this a deployment step. Marking as draft in the meantime |
58b4253
to
5b9853b
Compare
5b9853b
to
531d32d
Compare
This should be good to go now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! @Czaki just want to make sure you're ok with this now before merging. But ❤️!
@melissawm I guess we can make a follow-up issue for notebooks. It's kinda weird that it doesn't work, do you have an ideas about why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description is confusing.
It mentions adding mp4 files, but not mp4 files are added.
The second part suggests that it is intentionally because mp4 files will be generatd during deployment. But there is no rule in .gitignore
to ignore *.mp4
files so we are fragile on accidental upload.
I think that PR description need to be updated. *.mp4
should be added to .gitignore
.
We also need to think how teduce size of commits to napari/napari.github.io
as each commit will be huge now. But we could do this later.
Well, I think commits reuse blobs when binary files match, so I don't think the size of the snapshot will be multiplied by the number of commits. We also overwrite dev each time, so the only thing we need to do is reuse large files between releases. We could indeed come up with a solution for that. However I think our priority should rather be to move to autogenerated videos... |
Yes. But part of the binary of video are metadata which contains the creation date. And dates will be different, so binary blobs will be different.
No. We are adding a new version of binary files each time. This is why this repository is so huge. |
Do we need to? Or is rebasing to keep the history lighter an option? I'm not sure how to solve this issue of the fallbacks otherwise... |
I am not convinced that we need to solve this in this PR, as it will require significant changes in deploy workflows. I only highlight potential problems. I think that we should start squashing gh-pages branch until we find a proper solution. |
Ok -this should be what we needed. Let me know if there's any improvements I can do. Thanks! |
Awesome! I get what's going on here, but probably we need either some comments or better yet a note in the docs? |
Also closes napari/napari-sphinx-theme#140 |
Let me know if this note is enough, cheers! EDIT: Direct link to preview https://output.circle-artifacts.com/output/job/1cb56e41-b3f1-4ff2-94e8-0958fda80b08/artifacts/0/docs/docs/_build/developers/contributing/documentation/docs_template.html#include-pictures |
Also moves them to the appropriate folder for html builds. Fallback videos are generated at the deploy docs step.
dfbc00a
to
d95f0f1
Compare
accompanied by complete and descriptive alt-text. If you're using arrows/circles to highlight portions of the image, make sure | ||
they contrast well against the background of the image. | ||
|
||
`````{note} Adding videos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, nice catch!
Tiny nitpick otherwise good to go! |
References and relevant issues
Closes #60 and napari/napari-sphinx-theme#140
Description
Adds mp4 and png fallback to all webm videos. Also moves them to the appropriate folder for html builds. The downside here is that, in addition to size (because we have more files now), the notebook view of the guides can't seem to be able to play the videos (or use the fallback png). I don't think this is something we use often (open the .md files as notebooks) but ideally I'd like to keep it working.
EDIT:
Some of these videos are outdated. For the moment, I only converted them but will follow up with updates before 0.5Videos have been updated as part of #125