ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 22 Aug 2013 13:15:42 +0200Update animate.py for gif creation using ffmpeghttps://ask.sagemath.org/question/10463/update-animatepy-for-gif-creation-using-ffmpeg/As I tried to run
Animated plots -- Sage Reference Manual v5.11: 2D Graphics
and there the example
a = animate([sin(x + float(k)) for k in srange(0,2*pi,0.7)],
xmin=0, xmax=2*pi, figsize=[2,1])
dir = tmp_dir()
#a.ffmpeg(savefile=dir + 'new.mpg') # optional -- ffmpeg
#a.ffmpeg(savefile=dir + 'new.avi') # optional -- ffmpeg
a.ffmpeg(savefile=dir + 'new.gif') # optional -- ffmpeg
#a.ffmpeg(savefile=dir + 'new.mpg', show_path=True) # optional -- ffmpeg
there appeared an error on the gif creation. Thus using the option verbose = true. There the error was explained to appear in
/Applications/Sage-5.11-OSX-64bit-10.6.app/Contents/Resources/sage/devel/sage-main/build/sage/plot/animate.py
in line 570.
There the line is
ffmpeg_options += ' -pix_fmt rgb24 -loop_output %s ' % iterations
where the option -loop_output should be changed to -loop as I did since ffmpeg states "This option is deprecated, use -loop".
Then the creation of a gif file worked with my version of ffmpeg: 1.2.1, using the ffmpeg command but the file is still of minor quality compared to e.g. mp4.
So perhaps somebody of the staff team can change the animate.py file for future versions. I know that it should be done by a ticket but as a newbee I'm not familiar in making up a ticket. Thanks
jazzThu, 22 Aug 2013 13:15:42 +0200https://ask.sagemath.org/question/10463/load animationhttps://ask.sagemath.org/question/10034/load-animation/Hi,
I have the following problem:
I'd like to present some calculations in a sage notebook. At one point I'd like to show an animation, but unfortunately it takes some time until the .show() command plots it.
I also do not like to have the animation wiggling araound while I'm presenting the other things before. Hiding the output also doesn't help because I want that it really starts from the beginning on my click and not soemwhere in between.
Is there a possibility to load a saved gif animation? Otherwise is is still possible to open the animation in new window, but it would be neat to have the animation inside the notebook.twchWed, 17 Apr 2013 09:22:06 +0200https://ask.sagemath.org/question/10034/Is there a way to save to to animations in the same avi filehttps://ask.sagemath.org/question/8538/is-there-a-way-to-save-to-to-animations-in-the-same-avi-file/I have two animations, I created using the animate command, which I want to save in the same avi or gif file one below another. Is there a way to do it. I tried (a+b).savefig(), but it saves the two animations on top of one another. I want something like the graphics_array but for animations.
Thanks in advance.ShashankThu, 08 Dec 2011 13:17:02 +0100https://ask.sagemath.org/question/8538/