X Tutup
Skip to content

Making it possible to use writer.setup kwargs from animation.save#11863

Closed
fredrik-1 wants to merge 1 commit intomatplotlib:masterfrom
fredrik-1:anim_save_kwargs
Closed

Making it possible to use writer.setup kwargs from animation.save#11863
fredrik-1 wants to merge 1 commit intomatplotlib:masterfrom
fredrik-1:anim_save_kwargs

Conversation

@fredrik-1
Copy link
Copy Markdown
Contributor

This pr makes it possible to reach the additional kwargs in a writers setup method from Animation.save.

With this pr is it for example possible to write:

anim.save('anim.mp4', writer='ffmpeg_file', frame_prefix='_temporary_file', clear_temp=False)

Copy link
Copy Markdown
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 on the principle, just some doc wording changes.

save the individual frames.

**kwargs :
Additional kwargs sendt to the writer's setup method.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sendt" -> "to pass" ?

"writer's setup" -> writer.setup()?

@fredrik-1
Copy link
Copy Markdown
Contributor Author

Made the changes and also made it possible to not explicitly use dpi when using writer.saving.

@joh
Copy link
Copy Markdown
Contributor

joh commented Jan 2, 2020

Any progress on this? The inability to change frame_prefix from save is causing problems when running multiple processes each calling save. A process will then overwrite another process' temporary frame :(

Maybe I should submit a separate bug report about this particular issue..?

@anntzer
Copy link
Copy Markdown
Contributor

anntzer commented Jan 3, 2020

Really animation should write its tmpfiles to a tmpdir, see e.g. #3536 #11860, if you want to push either through...

@jklymak
Copy link
Copy Markdown
Member

jklymak commented Apr 15, 2021

I think this was closed by #16082, but feel free to request a re-open.

@jklymak jklymak closed this Apr 15, 2021
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Sep 14, 2024

I don't think this was actually closed by #16082. As noted in that PR, "the user can simply pass a non-None frame_prefix to write temporary frames wherever they want and keep them there." but there is no way to pass frame_prefix without this PR, as frame_prefix is an argument to Writer.setup, which is called by Animation.save, and not the user.

Unfortunately, I can't reopen this PR, and it probably needs a rebase, so I'll just open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

X Tutup