Controlling movie quality parameters #202
-
First of all, thanks for sharing this package, it's awesome! I am trying to produce movies that include stochastic noise. Fluctuations in the field do produce a lot of changes that due to video compression result in very poor quality videos. Therefore I would like to increase the dpi and bitrate of the video in order to make the images more clear. In the docs I can see that the base Documentation is not very clear about how to do this. Some things I have tried:
I guess there is an easy way to control movie parameters, but at least for me, it is not clear how to do this. I would appreciate some extra indications on how to increase bitrate and framerate. Thank you very much in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I agree that setting the details is a bit more complicated and might not be very well exposed in the current API. Your two approaches are very sensible and are close to working, as I will discuss in detail below.
storage = MemoryStorage()
sol = eq.solve(state, t_range=10.0, dt=1e-2, tracker=["progress", storage.tracker(1)])
mymovie = movies.movie(storage, "pelicula.mp4", plot_args={"vmin": 0, "vmax": 0.5},
movie_args={"dpi": 300, "bitrate": 2000})
with movies.Movie("pelicula.mp4", dpi=300, bitrate=100) as mymovie:
tracker = PlotTracker(interval=1.0, movie=mymovie, plot_args={"vmin": 0, "vmax": 0.5, "figsize": (10, 5)})
sol = eq.solve(state, t_range=10.0, dt=1e-2, tracker=tracker) P.S: I converted the issue to a discussion, so it is better accessible in the future |
Beta Was this translation helpful? Give feedback.
I agree that setting the details is a bit more complicated and might not be very well exposed in the current API. Your two approaches are very sensible and are close to working, as I will discuss in detail below.
movies.movie
does not allow you to set the bitrate (andplot_args
). PR #203 fixes this, so in the future you should be able to use