[Paraview] How do I save an animation from a python script?

2010-11-04 Thread John Haiducek
I want to save an animation from a python script using pvbatch or pvpython.
Is there a python command for saving an image sequence, or do I need to
repeatedly change frames and call WriteImage() each time?

John Haiducek
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] How do I save an animation from a python script?

2010-11-04 Thread Milos Ilak
Hi John,

I don't know how one could save an entire animation from Python, but I use
WriteImage() for each frame to output a .png, and I end up with a bunch of
numbered images (I manually write the file names in a loop). That gives you
more flexibility in encoding, as you can change the frame rate, bitrate, use
more codecs, etc...Of course, if you do this, you need to use some encoding
software such as ffmpeg, mencoder, QuickTime Pro, etc in order to encode the
movie. I hope this helps,

Milos




On Thu, Nov 4, 2010 at 7:09 PM, John Haiducek jhaid...@gmail.com wrote:

 I want to save an animation from a python script using pvbatch or pvpython.
 Is there a python command for saving an image sequence, or do I need to
 repeatedly change frames and call WriteImage() each time?

 John Haiducek

 ___
 Powered by www.kitware.com

 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the ParaView Wiki at:
 http://paraview.org/Wiki/ParaView

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview




-- 
Miloš Ilak
Linné FLOW Centre
KTH Mechanics, Stockholm
+46(0) 8 790-7152
www2.mech.kth.se/~ilak http://www2.mech.kth.se/%7Eilak/
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] How do I save an animation from a python script?

2010-11-04 Thread Eric E. Monson
Hey John,

Have you seen this section of the Python scripting documentation?

http://www.paraview.org/Wiki/ParaView/Python_Scripting#Animating

-Eric

--
Eric E Monson
Duke Visualization Technology Group


On Nov 4, 2010, at 2:23 PM, Milos Ilak wrote:

 Hi John,
 
 I don't know how one could save an entire animation from Python, but I use 
 WriteImage() for each frame to output a .png, and I end up with a bunch of 
 numbered images (I manually write the file names in a loop). That gives you 
 more flexibility in encoding, as you can change the frame rate, bitrate, use 
 more codecs, etc...Of course, if you do this, you need to use some encoding 
 software such as ffmpeg, mencoder, QuickTime Pro, etc in order to encode the 
 movie. I hope this helps,
 
 Milos
 
 
 
 
 On Thu, Nov 4, 2010 at 7:09 PM, John Haiducek jhaid...@gmail.com wrote:
 I want to save an animation from a python script using pvbatch or pvpython. 
 Is there a python command for saving an image sequence, or do I need to 
 repeatedly change frames and call WriteImage() each time?
 
 John Haiducek
 
 ___
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the ParaView Wiki at: 
 http://paraview.org/Wiki/ParaView
 
 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview
 
 
 
 
 -- 
 Miloš Ilak
 Linné FLOW Centre
 KTH Mechanics, Stockholm 
 +46(0) 8 790-7152
 www2.mech.kth.se/~ilak
 
 
 ___
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the ParaView Wiki at: 
 http://paraview.org/Wiki/ParaView
 
 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview