[IPython-dev] display protocol: animation and video

Chris Kees cekees at gmail.com
Fri Dec 16 20:46:41 EST 2011


I'd like to include animations in the notebook and am trying to think
through the options for connecting to the display protocol.  The case I'm
targeting is one with a small number of high-resolution frames (e.g. 50 to
500 frames). Each frame is generated by compositing portions of the frame
rendered on (possibly many) mpi engines.  At the moment I generate a png or
svg of the composite image on the root engine and just bring the last image
in the sequence over to the client, which I can display with something like

c = Client()
view = c[:]
view.activate()
Image(view['imageSequence'][rootEngine][-1])

All I want to do now is make the whole sequence of images available with
"VCR buttons" (rewind, pause, play, fast forward, maybe a slider to look at
specific frames).  Should I 1) generate a single SVG of the entire
animation on the root engine, 2) use ffmpeg via matplotlib or some other
wrapper to ffmpeg to generate a video on the root engine, or 3) continue
bringing over the entire image sequence and do the  conversion to animated
SVG or mpeg on the client.

On 1: I've tried including the SVG for the animation here
http://srufaculty.sru.edu/david.dailey/svg/ovaling.svg using
SVG(data="""..."""), but it doesn't show up in the notebook.    Maybe SVG
animations aren't fully supported in the notebook yet?

On 2: How do I bring the mpeg over? Just read the mpeg file on the root
engine, write it back out on the client, and display using
HTML(file="filename.mp4")?

Thanks for any suggestions.

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20111216/4d26e971/attachment.html>


More information about the IPython-dev mailing list