#11170: add an ffmpeg option to the animate command
-----------------------------+----------------------------------------------
   Reporter:  jhpalmieri     |       Owner:  jason, was  
       Type:  enhancement    |      Status:  needs_review
   Priority:  minor          |   Milestone:  sage-4.7.1  
  Component:  graphics       |    Keywords:              
     Author:  John Palmieri  |    Upstream:  N/A         
   Reviewer:                 |      Merged:              
Work_issues:                 |  
-----------------------------+----------------------------------------------

Comment(by drkirkby):

 Replying to [comment:5 jhpalmieri]:
 > Niles: thanks, I think I've fixed those now.
 >
 > Dave: since I would guess that the size of the animation may change from
 one version of !ImageMagick to another, and the same for ffmpeg, I don't
 see how to use checksums effectively.

 My point was that even if the exact details of the animation changed from
 version to version, I would not expect the size to vary much. So perhaps
 checking the number of KB (or even MB of the file) would give a reasonable
 confidence the program is producing an mpeg file of about the right
 length.

 > Also, we actually don't check for the presence of convert, we just run
 it.  If it doesn't exit with zero status (as should happen if it's not
 there, or if it gets called with bad arguments -- I hope this is what
 would happen if there were another program called "convert" lying around
 and we call "convert -delay ... -loop ... *.png output.gif"), we raise an
 error.

 Yes agreed, any sensible program would exit with an error in this case.
 Just in general I think making use of a more obscure file would have been
 preferable. But I don't want to drag the ticket on by making changes
 outside of what you are intending. (You know that really winds me up some
 times!)

 > We could also check for the presence of a directory
 {{{/usr/lib/ImageMagick-.../}}} or {{{/usr/local/lib/ImageMagick-.../}}}
 or something like that.

 That would be quite platform dependent. It would not work on some systems
 like AIX, where such files are likely to be under /pware. Neither would it
 work if someone wanted to install !ImageMagick, but did not have root
 access, so had to build it under their home directory.

 > On my machine, I don't actually see any libraries in that directory,
 just some xml files for configuration.  On sage.math, there are actual
 libraries in some of the subdirectories of
 {{{/usr/lib/ImageMagick-6.3.7/}}}.

 I feel anything like this is a bit risky.

 > I'm not sure the best way to deal with this.  Since I haven't heard
 complaints about our current method for using "convert", and since this
 patch doesn't change that, I would be inclined to leave it as is.

 Fair enough. Perhaps for another ticket, we could consider making use of
 one of the more obscure program names in !ImageMagick for a test.

 >
 > Meanwhile, recommending the installation of ffmpeg or !ImageMagick seems
 like a good idea, and so I've added it to the patch.

 Good. I think we really need a list of such programs (outside the scope of
 this ticket). I'll raise that on sage-devel. If we can get a list, these
 can be added to the installation guide.

 As you are aware, I'm not a Python guru, so don't feel able to give this a
 proper review, but there was something else that I found a bit odd. I
 don't know if there is any standard for specifying if optional tests get
 run. Take a look at for one example for Mathematica

 {{{
     sage: mobj = mathematica(x^2-1)             # optional - mathematica
 }}}

 in the file

 {{{
 ./devel/sage-main/sage/interfaces/mathematica.py
 }}}

 and now compare that to yours on this ticket.

 {{{
 sage: a.show() # optional -- ImageMagick
 }}}

 Two obvious things are different can be seen.

  * The Mathematica example uses two hypens, your example uses one.
  * The Mathematica example uses all lower case, despite Wolfram Research
 use an upper case M at the start. Your example uses the proper case for
 !ImageMagick

 '''IF''' this means that one needs to specify how to run the Mathematica
 and !ImageMagick tests differently, then I think that's a bad idea. But
 I've got no idea what is considered "right" in sage, but I think we should
 at least be consistent.

 I suspect the most robust solution is for the code to accept either case -
 i.e. convert all to lower case, then accept that. Then it would not matter
 what the user typed. Again outside this ticket, but if it has been agreed
 to use all lower case, then perhaps you should use that).

 <gripe>It does rather annoy me Sage refers to Matlab, despite MATLAB (with
 all capital letters) is a registered trademark, I actually wish we would
 stick to how the upstream developers use the term.</gripe>

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11170#comment:6>
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.

Reply via email to