By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

tkinter to mpeg

P: n/a
dug
Hi,

I have a small program that moves some shapes around a tkinter canvas.
Is there any way to save the output in a movie file, maybe mpeg?

Thank you,

Douglas

Oct 2 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Mon, 02 Oct 2006 09:18:13 -0700, "dug" <mm***@yahoo.co.uklet this
slip:
Hi,

I have a small program that moves some shapes around a tkinter canvas.
Is there any way to save the output in a movie file, maybe mpeg?
you can record any app with special programs designed for the job, such as
vnc2swf (which produces macromedia flash), vncrec (which produces a
special format readable by transcode) or istanbul (which produces
ogg/theora). I doubt Tk would have a special mechanism to do this.

--
Thomas Jollans alias free-zombie
Oct 2 '06 #2

P: n/a
In article <ef*************@news.t-online.com>,
Thomas Jollans <no****@jollans.comwrote:
>On Mon, 02 Oct 2006 09:18:13 -0700, "dug" <mm***@yahoo.co.uklet this
slip:
>Hi,

I have a small program that moves some shapes around a tkinter canvas.
Is there any way to save the output in a movie file, maybe mpeg?

you can record any app with special programs designed for the job, such as
vnc2swf (which produces macromedia flash), vncrec (which produces a
special format readable by transcode) or istanbul (which produces
ogg/theora). I doubt Tk would have a special mechanism to do this.
Oct 2 '06 #3

P: n/a
cl****@lairds.us (Cameron Laird) writes:

In article <ef*************@news.t-online.com>,
Thomas Jollans <no****@jollans.comwrote:
>>On Mon, 02 Oct 2006 09:18:13 -0700, "dug" <mm***@yahoo.co.uklet this
slip:
>>I have a small program that moves some shapes around a tkinter canvas.
Is there any way to save the output in a movie file, maybe mpeg?

you can record any app with special programs designed for the job, such as
vnc2swf (which produces macromedia flash), vncrec (which produces a
special format readable by transcode) or istanbul (which produces
ogg/theora). I doubt Tk would have a special mechanism to do this.
.
I've actually been thinking about implementing just such a special
mechanism. Let me know if there's sufficient interest.
I think it would be most helpful to have a general way to dump the contents
of a Tkinter canvas including animated elements to some sort of file.
However, I would think that mpeg will look pretty bad compared to SVG.
In fact, as SVG renders much prettier (anti-aliasing etc.) than Tkinter,
the exported file would look much better.

I actually started coding SVG output for Gato (http://gato.sf.net). Some
of the things I realized:
- SVG support is somewhat limited on *nix.
- The SMIL type animations are even less supported. One would have to
resort to javascript. There is SmilScript which implements a SMIL
subset for Firefox 2.0?
- Due to a bug in the SVG 1.1 specification multi-colored lines with
same color arrow-heads are difficult to draw. Supposedly, this will
be fixed in 1.2.
- The geometry works differently in SVG compared to Tk. Arrow heads
are stuck onto the end of a line for example.

It would be trivial to wrap the Tkinter canvas in an object which
records what function is called when. For the basic canvas
items mapping this to SVG is quite straightforward.

Alexander

PS: There is some python code to output SVG, which I didn't use since
I wanted to work on my applications abstraction level.
http://www2.sfk.nl/svg
http://aspn.activestate.com/ASPN/Coo.../Recipe/325823

--
Alexander Schliep sc*****@molgen.mpg.de
http://algorithmics.molgen.mpg.de
Oct 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.