Re: MOVIES USING MPEG_PUT [message #13713] |
Fri, 04 December 1998 00:00 |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
Mark C. wrote in message <3665ff6d.0@news.cadvision.com>...
> 2) Is there a better/easier method generating movie files in IDL or non-IDL
> packages.
Another possibility to consider is an animated GIF. You can create one
directly
from IDL using the MULTIPLE keyword to WRITE_GIF, or you can write a series
of single-frame GIF files (or other graphics format) and join them later
with a
GIF animator package, of which there are many. If you create an animated GIF
directly from IDL, you need to make sure that each frame has the same colour
table.
I haven't really explored the pros and cons of animated GIF vs MPEG.
Animated GIF creation may be faster than MPEG creation (which is very slow)
and animated GIFs can be displayed by most Web browsers, whereas
MPEGs need specialised players, none of which are very nice pieces of
software
in my experience.
--
Mark Hadfield, m.hadfield@niwa.cri.nz http://www.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
|
|
|
Re: MOVIES USING MPEG_PUT [message #13729 is a reply to message #13713] |
Thu, 03 December 1998 00:00  |
Richard
Messages: 6 Registered: June 1994
|
Junior Member |
|
|
The mpeg_put with IDL 5.1 has a small bug. If the movie you are creating is
taking the images from a graphics window, then the movie is generated in
black and white, since the mpeg_put routine uses a TVRD command to grab the
graphics window image and does not include the 'true' keyword.
I modified the existing mpeg_put routine (which resides in the IDL library
directory) as shown in the extract below. This will work only
in colour. You could make it more robust if you wish by using keywords in
the call to the function.
I would suggest taking care when modifying library routines, since one could
create a mess. I modified the routine as
shown, added my changes to the comment section, and saved the procedure as
mympeg_put in a different directory.
Modified code extract: (with acknowledgment to mpeg_put author):
;; If the window is a GR1 window
oldWin = !D.WINDOW
WSET, window
myImage = TVRD(/true) ; this is the line that is
modified. (/true) added
WSET, oldWin
endelse
IDL 5.2 seems to have fixed this problem. According to the documentation,
IDL 5.2 should have a far better version of mpeg handling as well.
Richard
Acknowledgements to all authors and people implied here. I accept no
responsibility for modifications you do, which are at your own risk.
Other usual disclaimers apply.
Mark C. wrote in message <3665ff6d.0@news.cadvision.com>...
> I have use the MPEG_PUT and the associated commands to make '.mpg' movie
> files in IDL5.1, Window NT platform. The '.mpg' movie files came out black
&
> white instead of color when viewed with movie viewers (e.g Windows Media
> Player). Questions:
>
> 1) Has any one found a way/fix to the MPEG_PUT problem I described? RSI
said
> there is a bug in the routine and is looking into it. I need a quick fix.
>
> 2) Is there a better/easier method generating movie files in IDL or non-IDL
> packages.
>
> Please email me if you have any suggestion to the above.
>
> Thanks in advance,
> Mark C.
> mychan@petro-canada.ca
>
>
|
|
|