|
Re: How do I improve the quality of movie output? [message #83844 is a reply to message #83843] |
Fri, 05 April 2013 10:44  |
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  |
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  |
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
|
|
|