mpeg creation problem [message #52779] |
Wed, 28 February 2007 06:26  |
kostis
Messages: 17 Registered: December 2006
|
Junior Member |
|
|
I have a 3d plot which i want to save as an mpeg video of 2000 frames
(a lot)
x[ i ] , y[ i ] , z[ i ] are arrays (dimension=2000) of numbers
properly defined
I use the following code:
; number of frames
nfr=2000
; spatial size in pixels
xsize=300
ysize=300
; open the mpeg
mpegID=MPEG_OPEN([xsize,ysize])
; loop over the frames
for f=0,nfr-2 do begin
; create a 3d environment
....................................................
; plot the line of a frame using the arrays in the
environment
for i=0,f
plots, [ x[i] , x[i+1] ], [ y[i] , y[i+1] ], [ z[i], z[i
+1] ], /T3D, /DATA
endfor
; put a frame into the mpeg
MPEG_PUT,mpegID,WINDOW=0,FRAME=f
endfor
; save and close
MPEG_SAVE,mpegID,FILENAME='vid.mpg'
MPEG_CLOSE,mpegID
Comments:
I run IDL in a remote pc (through linux ssh).
Each frame is first plotted to my screen and then inserted to the
mpg.
It takes almost 10minutes for each frame so i should wait a very long
time for my 2000 frame..!!
I think that the screen plotting delays the whole process.
There must be a better way since they say IDL is the top graphics
tool...
Questions:
1. Can I do the same job without each frame appearing on my screen??
How should I change the code??
2. Do U have any other suggestions to improve this ??
Thanx for ur patience
|
|
|