Closed david-zwicker closed 3 months ago
An alternative python package might be ffmpeg-python
, but it's not clear whether it supports the required online update: https://github.com/jonghwanhyeon/python-ffmpeg/issues/47.
A more flexible solution might be to simply implement a MovieStorage
, which uses a movie as a backend. This might obviously only offer limited possibilities (e.g. only tracker with fixed time intervals).
A first version has been implemented by #545
This would allow to write data in a much more compressed format during the simulation. The idea would work best for 2d simulations of a single scalar field (but could probably be extended to more complicated cases, e.g. using colors for three fields). The idea is to have a tracker that converts a scalar field to a numpy array of dtype
uint8
using a given value range and pushes this toffmpeg
, which encodes everything in a video. A useful package with an example is this. We might also need to store meta information about the underlying grid and particular the color scale to be able to revert this later again (using a special readonly storage class).