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

Home » Public Forums » archive » Re: Need help working with large video file
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: Need help working with large video file [message #30546] Thu, 02 May 2002 16:47 Go to next message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <a3589d11.0205021259.69f111b6@posting.google.com>,
plmcelwee@yahoo.com (Phil) wrote:

> I need to process 5000 frames of video through an IDL program. The
> video is in a NetCDF file, and the total size of the file is 650MB.
> Does anyone have any tips on how to effectively work with files this
> large? Essentially right now I read in the entire file, store the
> frame data in a variable, then start my computations. This was
> working nicely with the 130MB video file I was using previously, but
> now I get out-of-memory errors with the larger file.

NetCDF provides random access to any contiguous rectangular chunk of the
data file. Assuming that you can work on a frame at a time, simply read
a frame, process it, and write it back out.

Look at the OFFSET, COUNT, and STRIDE keywords to NCDF_VARGET. To read
frame s which is size nx x ny:

NCDF_VARGET, id, 'Movie', frame, OFFSET = [0,0,s], COUNT = [nx,ny,1]

This assumes that time is the last dimension (IDL convention). Ncdump
uses the C convention, listing the dimensions in the reverse order.

Regards, Ken
Re: Need help working with large video file [message #30709 is a reply to message #30546] Wed, 08 May 2002 15:32 Go to previous message
plmcelwee is currently offline  plmcelwee
Messages: 6
Registered: April 2002
Junior Member
"Kenneth P. Bowman" <kpb@null.com> wrote in message news:<kpb-D80AFB.18472102052002@corp.supernews.com>...
> In article <a3589d11.0205021259.69f111b6@posting.google.com>,
> plmcelwee@yahoo.com (Phil) wrote:
>
>> I need to process 5000 frames of video through an IDL program. The
>> video is in a NetCDF file, and the total size of the file is 650MB.
>> Does anyone have any tips on how to effectively work with files this
>> large? Essentially right now I read in the entire file, store the
>> frame data in a variable, then start my computations. This was
>> working nicely with the 130MB video file I was using previously, but
>> now I get out-of-memory errors with the larger file.
>
> NetCDF provides random access to any contiguous rectangular chunk of the
> data file. Assuming that you can work on a frame at a time, simply read
> a frame, process it, and write it back out.
>
> Look at the OFFSET, COUNT, and STRIDE keywords to NCDF_VARGET. To read
> frame s which is size nx x ny:
>
> NCDF_VARGET, id, 'Movie', frame, OFFSET = [0,0,s], COUNT = [nx,ny,1]
>
> This assumes that time is the last dimension (IDL convention). Ncdump
> uses the C convention, listing the dimensions in the reverse order.
>
> Regards, Ken


Sorry for the delay in responding, but I got pulled away on another
task before getting a chance to try your suggestion. I tried it
earlier today, and just so you'll know, it worked perfectly. Thanks
for the help!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: default window size
Next Topic: about 3-Dimensional animation

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

Current Time: Thu Oct 09 22:51:13 PDT 2025

Total time taken to generate the page: 0.08194 seconds