xmovie
xmovie copied to clipboard
gif always small
Don't know if its just me but if I save as .mov things are good but .gif even with gif_resolution_factor=2.0 makes a small gi
f
Thanks for using xmovie! I think this would be something that might be addressed with the right FFMPEG options. Ill try to look into it next week. I remember there were some options available.
Many thanks!
Could you actually provide the code you used here? That way I can make sure we are talking about the same 'baseline'. Thanks
This might have to do with the fact that the input gif_resolution_factor=
is unused in the save
method
def save(
self,
filename,
remove_frames=True,
remove_movie=True,
progress=False,
verbose=False,
overwrite_existing=False,
parallel=False,
parallel_compute_kwargs=dict(),
framerate=15,
ffmpeg_options="-c:v libx264 -preset veryslow -crf 10 -pix_fmt yuv420p",
gif_palette=False,
gif_resolution_factor=0.5, #<-- is not used in the method
gif_framerate=10,
):
Would the fix to this be to multiply the resolution
list that is in the convert_gif
method ?
current code:
convert_gif(
mpath,
gpath=gpath,
resolution=[480, 320],
gif_palette=gif_palette,
verbose=verbose,
remove_movie=remove_movie,
gif_framerate=gif_framerate,
)
suggested fix
convert_gif(
mpath,
gpath=gpath,
resolution=gif_resolution_factor*np.asarray([480, 320]),
gif_palette=gif_palette,
verbose=verbose,
remove_movie=remove_movie,
gif_framerate=gif_framerate,
)
Ah interesting, this seems like a good solution, but I think we need a test to check this behavior. I am pretty busy for this/next week, so will probably not be able to tackle it. But if someone else wants to take a crack, I will give my best to review.