473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

tkinter to mpeg

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
3 2155
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Average_Joe | last post by:
Hello Java people, Been awhile since I've used Java, and when I did, it was pretty much XML stuff. Anyhow, I've got a client who needs to provide web viewers with both streaming (live) video...
2
by: Lane LiaBraaten | last post by:
Does anyone know a way to insert a pygame surface into a tkinter gui? I am writing a program similar to a mpeg player, i.e. i need the mpeg playing capabilities of pygame and the gui stuff from...
3
by: Mickel Grönroos | last post by:
Hi everybody, I'm using QuickTimeTcl (3.1) to be able to play movie files in my Tkinter application (Python 2.3.2) on Windows 2000. I was planning to write a simple wrapper class,...
3
by: Vroem | last post by:
I wanted to show an MPEG-4 video file on a web page. I'm talking about a real iso-compliant file (with the .mp4 extension.) I've been searching on how to use mime-types but it turns out that you...
0
by: Joe | last post by:
I am wondering if dot net has anything to convert MPEG file to avi file? Any suggestions in c#. I used directx 9 managed to read a MPEG... is there a way to save to avi file format?
3
by: Dean Arpajian | last post by:
Looking to find info/ libs on creating (small) video files. Basically what I'm looking for is a tutorial for constructing a short video... (nothing nasty: output from a transmission line...
0
by: SiteTamer | last post by:
I have a script that redirects to a file for downloading. Everything works fine EXCEPT: if the target of the redirect is type video/mpeg (extension .mpeg or .mpg), instead of prompting for...
7
by: Kilian A. Foth | last post by:
I just found this amazing video puzzle game written with the pygame library, which promises to be infinite fun - but I can't get it to decode any video file I own, except the game's own example...
0
by: seb | last post by:
Hi, I need to convert each frame from a movie (mpeg for example) to an array (in order to do some computation) and then back to a video format mpeg for example. Do you know of any tools ? The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.