Re: MP4/Animated GIF/JPEG woes....(Windows, IDL 8.1) [message #76952 is a reply to message #76869] |
Tue, 12 July 2011 13:51  |
AndrewM
Messages: 5 Registered: July 2011
|
Junior Member |
|
|
On Jul 11, 11:30 am, Daft Pict <brianjmcl...@gmail.com> wrote:
> I am using IDLffVideoWrite in 8.1 and I tweaked the example code from
> the help file.
> I'm sure it's something silly I'm doing due to lack of sleep - it's a
> FUN project!!!!
>
> here's a code snippet...
>
> <complicated display construction in a loop through all images
> omitted>
> ;----------------------------------------------------------- -------------
> ; Read back display
>
> rgbFrame=tvrd(/true)
> frame=tvrd()
> ;----------------------------------------------------------- -------------
> ; First image initialises everything
>
> if (i eq 0) then begin
> t=size(rgbFrame)
> width = t[2]
> height = t[3]
> frames = nFiles
> fps = 2
>
> ; Create object and initialize video/audio streams (make sure earlier
> file deleted)
> file_delete,movFile,/allow_nonexistent
> oVid = IDLffVideoWrite(movFile)
> vidStream = oVid.AddVideoStream(width, height, fps)
> endif
> ;----------------------------------------------------------- -------------
> ; Add display frame to output streams
>
> time = oVid.Put(vidStream, rgbFrame)
> write_gif,gifFile,frame,R_curr, G_curr, B_curr,/
> multiple,delay_time=100
> write_jpeg,jpgFile,rgbFrame,/true
> endfor
> ;----------------------------------------------------------- -------------
> ; Close the files
>
> oVid.Cleanup
> write_gif,gifFile,/close
I did the development of IDLffVideoWrite. I just did some
experimentation to try and reproduce your problem, and I think I've
got it figured it out. If I modify the IDLffVideoWrite help sample
code to output at any framerate less than 5 fps, Windows Media Player
still works fine but Quicktime just displays solid green. Increase
the framerate to 5 fps or higher, and it works fine again.
If that doesn't do it for you, I'll be happy to do some more
investigation.
|
|
|