comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How do I improve the quality of movie output?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How do I improve the quality of movie output? [message #83843] Fri, 05 April 2013 11:48
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
In the "for what's its worth" column, here's a video I've uploaded that uses the "export plot as EPS, convert to PNG, make a movie out of the images" method:

http://youtu.be/a4hMKqXZi8k

(BTW, this is data from a 8 stroke cloud-to-ground lightning flash. The yellow/red->gray pixels that show up are the optical emission we detect from space.)
Re: How do I improve the quality of movie output? [message #83844 is a reply to message #83843] Fri, 05 April 2013 10:44 Go to previous message
Rob.Dimeo is currently offline  Rob.Dimeo
Messages: 21
Registered: September 2007
Junior Member
On Friday, April 5, 2013 11:01:50 AM UTC-4, David Fanning wrote:
> Rob Dimeo writes: > Example output of this can be seen here: > http://www.youtube.com/watch?v=TsGqmhskXIo > > The output is ok but not even close to what I get when I do an animation in a direct graphics window with pixmaps and the device,copy trick. Before I decide that my expectations are too high (that the video output be comparable to the IDL display), I wanted to find out from others who have had some experience with this sort of thing. > > Any help would be greatly appreciated! I have both an AVI and and MPEG-4 movie in the Coyote Gallery. The colors look file, although I made these from PostScript and PNG intermediate files: http://www.idlcoyote.com/gallery/index.html#AVI_MOVIE Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thos speakest truth.")

Slick trick with the high res PNG file, David. I will give it a try. Thanks!

Rob
Re: How do I improve the quality of movie output? [message #83846 is a reply to message #83844] Fri, 05 April 2013 08:01 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rob Dimeo writes:

> Example output of this can be seen here:
> http://www.youtube.com/watch?v=TsGqmhskXIo
>
> The output is ok but not even close to what I get when I do an animation in a direct graphics window with pixmaps and the device,copy trick. Before I decide that my expectations are too high (that the video output be comparable to the IDL display), I wanted to find out from others who have had some experience with this sort of thing.
>
> Any help would be greatly appreciated!

I have both an AVI and and MPEG-4 movie in the Coyote Gallery. The
colors look file, although I made these from PostScript and PNG
intermediate files:

http://www.idlcoyote.com/gallery/index.html#AVI_MOVIE

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: How do I improve the quality of movie output? [message #83847 is a reply to message #83846] Fri, 05 April 2013 07:22 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Friday, April 5, 2013 1:03:09 PM UTC+2, Rob Dimeo wrote:
> Hi all,
>
>
>
> I have been creating some movies from some animations I created in IDL but I know very little about how to get nice video output from IDL animations. I'm using direct graphics so I'm snatching frames using TVRD() and I'm creating MP4 videos (but I'm not necessarily wedded to that format). Unfortunately I'm not really that happy with the quality of the result. The colors are faded and the resolution is not great, even with the video player on its highest resolution).
>
>
>
> A brief code snippet is listed below that shows you how I'm doing it.
>
>
>
> xsize = (ysize = 600)
>
> fps = 60
>
> oVid = IDLffVideoWrite(filename+'.mp4')
>
> vidStream = oVid.AddVideoStream(xsize,ysize,fps,bit_rate = 5e7)
>
>
>
> for j = 0,nframes-1 do begin
>
> ; Animated IDL graphics go here
>
> ; Plot something...
>
> frame = tvrd(/true) ; capture the screen
>
> !NULL = oVid.Put(vidStream, frame)
>
> endfor
>
> oVid.Cleanup
>
>
>
> Example output of this can be seen here:
>
> http://www.youtube.com/watch?v=TsGqmhskXIo
>
>
>
> The output is ok but not even close to what I get when I do an animation in a direct graphics window with pixmaps and the device,copy trick. Before I decide that my expectations are too high (that the video output be comparable to the IDL display), I wanted to find out from others who have had some experience with this sort of thing.
>
>
>
> Any help would be greatly appreciated!
>
>
>
> Rob

Hi Rob,
well, I thought I had an answer, I tried it and got something I don't like. My idea was to try it in function graphics. The plots may look nicer. Well, I got the thing to work in a few minutes, but I get some strange color effects... Meaning that what is red in the plot is violet in the movie. Not really what I expected to see.
Here is the code, just in case:

PRO TestMovie
xsize = 600
ysize = 600
fps = 20
oVid = IDLffVideoWrite('TestVideo.avi')
vidStream = oVid.AddVideoStream(xsize,ysize,fps,bit_rate = 5e7)
x = 6.0*!PI*findgen(501)/500.0
w = 1.0
win = window(DIMENSIONS=[xsize,ysize],location=[2000,10])
p = plot(x,sin(x*w),'r3',/CURRENT)
for i=0,100 do begin
w += 0.02
p.setdata, x, sin(x*w)
p.title = 'Progress = '+STRTRIM(I,2)+'%'
frame = p.CopyWindow(HEIGHT=ysize, WIDTH=xsize)
Void = oVid.Put(vidStream, frame)
endfor
oVid.Cleanup
END

The execution is 7.5 sec on my machine:
{ x86_64 Win32 Windows Microsoft Windows 8.2.2 Jan 23 2013 64 64}

Since I was planning to make such movies, it would be nice to find out how to get the colors right...

Cheers,
Helder
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Insert variable values into legend
Next Topic: Re: Insert variable values into legend

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:42:43 PDT 2025

Total time taken to generate the page: 0.00537 seconds