Newbie getting an exception straight away

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
MartinH

Newbie getting an exception straight away

Post by MartinH »

I'm using (or trying t use) RMagick for the first time.
I need to play back video files - (there's a vast library of .avi files) and I get the following:

vid = ImageList.new("video_data/... long_file_name... .avi")
Magick::ImageMagickError Exception: Not enough pixel data `video_data/... long_file_name... .avi'.

The files all play happily enough through a browser when called directly but I need to do it programmatically.

I've tried googling to no avail. Can anybody point me in the right direction?
thanks
Martin
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Newbie getting an exception straight away

Post by rmagick »

I've seen that exception before in an out-of-memory condition. Is the AVI file very long? That method call will read the entire file into memory and convert it to ImageMagick's internal format. Do you plan on modifying the individual frames? If not, and you're just trying to play the AVI's, there's probably programs that are better-suited.
MartinH

Re: Newbie getting an exception straight away

Post by MartinH »

Thanks for the reply.
The files are a couple of MB. No, I'm not going to do any modification. The only thing I wanted to do is show a thumbnail and play the file, so I'll look at other solutions.
Post Reply