Skip to content

Commit f4eed6a

Browse files
authored
switch from mp4 to gif for Paraview-generated animations (ffmpeg conv erted) (#1621)
1 parent b5c99d8 commit f4eed6a

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ jobs:
286286
rm /tmp/pytest/test_run_notebooks_*current
287287
ls /tmp/pytest/test_run_notebooks_*/
288288
ls /tmp/pytest/test_run_notebooks_*/output/
289-
ffmpeg -i /tmp/pytest/test_run_notebooks_*/output/docs_intro_animation.ogv $HOME/work/_temp/_github_home/figures/docs_intro_animation_${{ matrix.platform }}.mp4
289+
ffmpeg -i /tmp/pytest/test_run_notebooks_*/output/docs_intro_animation.ogv -loop 0 -vf "fps=10,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" $HOME/work/_temp/_github_home/figures/docs_intro_animation_${{ matrix.platform }}.gif
290290
mv /tmp/pytest/test_run_notebooks_*/output/last_animation_frame.pdf $HOME/work/_temp/_github_home/figures/last_animation_frame_${{ matrix.platform }}.pdf
291291
ls $HOME/work/_temp/_github_home/figures
292292
@@ -296,7 +296,7 @@ jobs:
296296
with:
297297
name: animation-movie-${{ matrix.platform }}
298298
if-no-files-found: error
299-
path: ~/work/_temp/_github_home/figures/*.mp4
299+
path: ~/work/_temp/_github_home/figures/*.gif
300300

301301
- name: animation frame upload
302302
if: ( ! startsWith(matrix.platform, 'windows-') ) && matrix.test-suite == env.anim_test-suite && matrix.python-version == env.anim_python-version
@@ -311,4 +311,4 @@ jobs:
311311
uses: eine/tip@master
312312
with:
313313
token: ${{ secrets.GITHUB_TOKEN }}
314-
files: /github/home/figures/*.mp4
314+
files: /github/home/figures/*.gif

docs/templates/index.html.jinja2

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@
3232
<h2>What is PySDM?</h2>
3333
<p>
3434
<div style="float:right; width:40%">
35-
<video controls style="width:100%">
36-
<source src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.mp4" type="video/mp4">
37-
Your browser does not support the video tag.
38-
</video>
39-
<a href="https://github.com/open-atmos/PySDM/blob/main/examples/PySDM_examples/_HOWTOs/paraview_hello_world.ipynb" style="small">Jupyter notebook setting up and running the above PySDM simulation and generating the visualisation using Paraview</a>
35+
<img style="width:100%" src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.gif" />
36+
<a href="https://github.com/open-atmos/PySDM/blob/main/examples/PySDM_examples/_HOWTOs/paraview_hello_world.ipynb" style="small">Jupyter notebook setting up and running the above PySDM simulation and generating the visualisation using Paraview</a>
4037
</div>
4138
PySDM is a package for simulating the <mark>dynamics of population of particles undergoing diffusional and collisional growth (and breakage)</mark>.
4239
The package features a Pythonic high-performance (multi-threaded CPU &amp; CUDA GPU) implementation of the <mark>Super-Droplet Method (SDM) Monte-Carlo algorithm</mark>

examples/docs/pysdm_examples_landing.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ The 2D prescribed-flow framework used here can be traced back to the work of
4343
(<a href="https://github.com/open-atmos/PySDM/blob/main/examples/PySDM_examples/_HOWTOs/paraview_hello_world.ipynb">see
4444
the Paraview hello-world HOWTO Jupyter notbook for code generating the simulation and visualisation</a>):
4545
<center>
46-
<video controls style="width:80%">
47-
<source src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.mp4" type="video/mp4">
48-
Your browser does not support the video tag.
49-
</video>
46+
<img src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.gif" style="width:80%" />
5047
</center>
5148

5249
Example notebooks:

0 commit comments

Comments
 (0)