Flowplayer is a big GPL'ed project, with open and commercial versions.
Ondrej's project appears to be a way to make movies from screenshots,
or of interactive sessions, or something like that.  Ondrej can chime
in and correct me.
http://flowplayer.org/
http://github.com/certik/record/tree/master

Flowplayer is GPL 3, with a "Section 7" addition that mostly seems to
relate to derived works rather than redistribution, based on a glance.
http://flowplayer.org/download/license_gpl.html

The necessary Javascript is quite straightforward, if you cut/paste
from Ondrej's examples, so I would think tight integration with the
notebook might be easy, but as demonstrated elsewhere my knowledge of
Javascript is rudimentary.

I believe the player requires Flash to be installed, which seems
ubiquitous in the days of YouTube.  On 64-bit Linux, its been a bit
like Java, a little touchy, but support from Adobe has improved
dramatically in the last 6 months.

My efforts yesterday are at the bottom half of
http://linear.ups.edu/sage-fcla.html

I just pointed at Ondrej's server to grab the Flowplayer javascript,
and borrowed the HTML from his examples.  ;-)  The video is being
served from my book's website.

The tricky part is conversion to the right Flash format, which
consumed a good part of my day yesterday.  ffmpeg is the real smarts
behind many of the free and/or open converters, including mencoder.
Some of the codecs aren't free (as in freedom).  I would suspect my
mantra above could be improved, and I wonder about its applicability
to various inputs, and the "universality" of the output.

A nice project might be to have Sage's animate() command do all the
work to create a cell with Flowplayer controlling the output.  I could
use just that, right now, as I work on some graph theory animations
for a talk.

So the short answer is: GPL'ed, I suspect an spkg would be easy, great
possibilities for transparent integration in the notebook (or perhaps
from the command-line also), but Flash is a dependency we can't get
involved in (non-free) and the video format conversions can be a
nightmare (or at least a major time sink), though the tools for that
are (mostly) free.  Not sure we want to be in the business of shipping
codecs with Sage.  The net result would be YouTube-style embedded
video in the notebook.

I think it is a project worth pursuing, even if we leave video
conversion out and just provide instructions.  If we could produce
animations in the right open formats (maybe Ondrej's project answers
this question?) and do the conversion behind the scenes, it might be a
really, really great feature.

Rob


On Jul 2, 6:58 am, William Stein <wst...@gmail.com> wrote:
> Hi,
>
> Just for the record somebody here in Barcelona today (a CS or applied
> math prof?) said he makes movies (e.g., mpg) using some program, and
> would like to very easily have the movies themselves be embedded in
> the sage notebook.  Would it thus make sense to include Ondrej's video
> player in Sage itself to make it easy to embed certain types of video
> in Sage worksheets?
>
> William
>
>
>
> On Thu, Jul 2, 2009 at 4:57 AM, Rob Beezer<goo...@beezer.cotse.net> wrote:
>
> > I spent some time today building on Ondrej's nice examples.  A few
> > lessons learned the hard way for those who come along later.
>
> > 1)  Rather than uploading largish videos to my website, I tried to
> > experiment locally (ie loading web pages off my hard disk into my web
> > browser).  Bad idea - the videos wouldn't play and no amount of
> > debugging ever got results.  Maybe there is a way to make this work,
> > but I'd suggest just experimenting with a real web server and a short
> > clip.
>
> > 2)  I used ffmpeg for the conversion, here's the command I settled on:
>
> > ffmpeg -i infile.mpg -vcodec libx264 -acodec libfaac -b 600k -s
> > 360x240 -f flv outfile.flv
>
> > The size is a quarter of William's original video from Sage Days 15.
> > The 600 kbit/sec bandwidth produced a file about a quarter the size of
> > the MPEG2 original with about the same apparent quality as the
> > original.  About 400MB/hour.
>
> > 3)  Original video at 720x480 (3:2), but in a 16:9 aspect ratio (who
> > knew pixels aren't square?).
> > Dimensions by half:  360x240
> > Stretch to original aspect ratio: (360*32/27)x240 ~ 427x240
> > Add 24 pixels for controls at the bottom: 427x264
>
> > So this is the size I used in the HTML/CSS to contain the player and
> > it looks like the aspect ratio is correct.  Or close.
>
> > 4)  Flowplayer is a pretty nifty tool.
>
> > Probably better ways to do this, but this got results.
>
> > Rob
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to