#11650: Make 'convert' the standard way to produce animated gifs (again)
--------------------------+-------------------------------------------------
Reporter: jhpalmieri | Owner: jason, was
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.7.2
Component: graphics | Keywords: animate convert ffmpeg
Work_issues: | Upstream: N/A
Reviewer: | Author: John Palmieri
Merged: | Dependencies: #11170
--------------------------+-------------------------------------------------
Changes (by ddrake):
* status: needs_review => needs_work
Comment:
This looks good. Two notes:
* You can't pass `use_ffmpeg=True` when using `.save()`. If it's easy to
do, can `.save()` pass that onto `.gif()`? Or at least change the
docstring in `.save()` to tell users to go directly to `.gif()` if they
want to use ffmpeg.
* Somehow, the `delay` parameter is now a string:
{{{
sage: a.gif('bar2.gif', use_ffmpeg=True)
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/drake/s/sage-4.7.2.alpha2/<ipython console> in <module>()
/home/drake/s/sage-4.7.2.alpha2/local/lib/python2.6/site-
packages/sage/plot/animate.pyc in gif(self, delay, savefile, iterations,
show_path, use_ffmpeg)
361 self.ffmpeg(savefile=savefile,
show_path=show_path,
362 output_format='gif', delay=delay,
--> 363 iterations=iterations)
364 else:
365 if not have_convert:
/home/drake/s/sage-4.7.2.alpha2/local/lib/python2.6/site-
packages/sage/plot/animate.pyc in ffmpeg(self, savefile, show_path,
output_format, ffmpeg_options, delay, iterations, verbose)
566 ffmpeg_options += ' -pix_fmt rgb24 -loop_output %s
' % iterations
567 if delay is not None and output_format != 'mpeg' and
output_format != 'mpg':
--> 568 early_options += ' -r %s -g 3 ' % int(100/delay)
569 savefile = os.path.abspath(savefile)
570 pngdir = self.png()
TypeError: unsupported operand type(s) for /: 'int' and 'str'
}}}
Calling `.ffmpeg()` without the patch here works fine.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11650#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.