#11170: add an ffmpeg option to the animate command
-----------------------------+----------------------------------------------
Reporter: jhpalmieri | Owner: jason, was
Type: enhancement | Status: new
Priority: minor | Milestone: sage-4.7.1
Component: graphics | Keywords:
Author: John Palmieri | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
The attached patch allows you to do this:
{{{
sage: a = animate(a = animate([sin(x + float(k)) for k in
srange(0,2*pi,0.7)])
sage: a.ffmpeg('output.mpg')
}}}
or
{{{
sage: a.ffmpeg('output.avi')
}}}
Also, calling
{{{
sage: a.save('output.mpg') # or a.save('output.avi')
}}}
for example will work, calling the ffmpeg method. If ffmpeg is installed,
it is also used to construct animated gifs, since it's faster than
convert.
There was some discussion of this here: [https://groups.google.com/d/topic
/sage-support/TdQ29S32K9k/discussion].
This also clean up some doctest flags, using {{{# optional --
ImageMagick}}} and {{{# optional -- ffmpeg}}} to mark the appropriate
tests. For me, tests pass with each of the following combinations, and
there are no stray graphics files created:
{{{
sage -t -long -optional animate.py (with convert and ffmpeg installed)
sage -t -long -only-optional=imagemagick (with only convert installed)
sage -t -long -only-optional=ffmpeg (with only ffmpeg installed)
sage -t -long
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11170>
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.