# Record a video with Freefem++ plot

**URL:** <https://community.freefem.org/t/record-a-video-with-freefem-plot/2838>\
**Category:** General Discussion\
**Created:** [December 18, 2023, 11:10am UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838 "2023-12-18T11:10:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lassounon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lassounon](https://community.freefem.org/u/lassounon)\
**Post date:** [December 18, 2023, 11:10am UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/1 "2023-12-18T11:10:08Z")

</div>

Hello everyone  
I would like to know if there is a way to edit a video from images like freefem++ does when we display the solution of an evolution equation at each moment. For example I solve a heat equation and with plot I display the solution u(x,y) at each time t. I would like to know if there is a way to record the images directly and how I can read them simultaneously one after the other.

Thank you for helping me.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [December 18, 2023, 8:20pm UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/2 "2023-12-18T20:20:00Z")

</div>

You should use ParaView for that.

---

<div class="post-metadata">

**Author:** ![lassounon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lassounon](https://community.freefem.org/u/lassounon)\
**Post date:** [December 18, 2023, 8:41pm UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/3 "2023-12-18T20:41:28Z")

</div>

How to store with savevtk u(t,x,y) in block to be able to read it with paraview. that is to say store u at each time t but in the same .VTU file

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [December 18, 2023, 8:52pm UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/4 "2023-12-18T20:52:30Z")

</div>

See, e.g., [FreeFem-sources/examples/hpddm/laplace-adapt-3d-PETSc.edp at 220957ed86797a6c1ed771f1fe1c27078e94f28a · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/220957ed86797a6c1ed771f1fe1c27078e94f28a/examples/hpddm/laplace-adapt-3d-PETSc.edp#L40).

---

<div class="post-metadata">

**Author:** ![quenot](https://avatars.discourse-cdn.com/v4/letter/q/96bed5/32.png) [@quenot](https://community.freefem.org/u/quenot)\
**Post date:** [December 18, 2023, 9:35pm UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/5 "2023-12-18T21:35:33Z")

</div>

Hello,  
I did not find a solution within FreeFEM, I did something like that by:

- transferring to python with pyfreefem (does not work on windows)
- displaying with matplotlib while storing in an image buffer
- using opencv to generate a video from the images

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [December 19, 2023, 7:10am UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/6 "2023-12-19T07:10:43Z")

</div>

> I did not find a solution within FreeFEM

There is one, and I just gave a link above. It’s also explained here [https://www.youtube.com/watch?v=-Aw2O46V2bo&t=6800s](https://www.youtube.com/watch?v=-Aw2O46V2bo&t=6800s) (it works the same whether you are using things in parallel or not).

---

<div class="post-metadata">

**Author:** ![lassounon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lassounon](https://community.freefem.org/u/lassounon)\
**Post date:** [December 19, 2023, 10:14am UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/7 "2023-12-19T10:14:40Z")

</div>

Thank you very much for your answers.

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [January 1, 2024, 8:18pm UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/8 "2024-01-01T20:18:58Z")

</div>

AFAICT, there are a lot of ways to make movies with a series of slides but if you want to watch  
in real time, the FF plots are ok but limited and specific to FF. I’ve finally gotten around  
to making something I call mjmdatascope which is designed mostly to monitor  
progress from a variety of sources ( interfaces now for FF,R, and c++ code )  
and save images or movies. Right now I just have 1D FF but eventually will  
add more stuff. If you can’t find a solution you could look at this and make suggestions  
for priorities. I’ve got a couple examples up there including a recent movie of 2D  
sim that is jerky but fixing that 🙂  
[mjmdatascope](https://github.com/mmarchywka/mjmdatascope)

---

<div class="post-metadata">

**Author:** ![lassounon](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@lassounon](https://community.freefem.org/u/lassounon)\
**Post date:** [January 4, 2024, 8:13am UTC](https://community.freefem.org/t/record-a-video-with-freefem-plot/2838/9 "2024-01-04T08:13:46Z")

</div>

It’s very interesting. Thank you very much and happy new year.
