Page 1 of 1
unknow bug when dealing with mp4
Posted: 2016-08-14T11:34:38-07:00
by ajax4sec
I try to open a MP4 file with ImageMagick-7.0.2-8-Q16-x86-dll on Win 7 x86. It seems the application is stuck and the memory arise very high. And I look up the task manager, I think something wrong when calling ffmpeg to process the file. So I try the file on VLC which is also based on ffmpeg and it is processed properly without memory explosion. Although the file does not cause further damage, it makes the application DoS.
So I upload the sample and share it with the address:
https://1drv.ms/v/s!Am_gj6YCV6PhfrhSOPBsWzN8UXU
I hope it is helpful to you!
Re: unknow bug when dealing with mp4
Posted: 2016-08-14T13:52:41-07:00
by snibgo
The MP4 appears to be 8191x8191 pixels per frame, 69 seconds long, 15 frames per second, so this is 69 G pixels. I doubt if you have enough memory, so it will eat your memory then spend all it's time caching pixels to disk. A very long time.
I suggest you extract the frames with ffmeg, then use IM on individual frames, or small batches of frames.
Re: unknow bug when dealing with mp4
Posted: 2016-08-14T14:22:26-07:00
by ajax4sec
The memory arise to about 1.2G and will fall to 900M, and up and down. It seems ImageMagick tries to cache it with a limited memory. I try to use ffmpeg with the sample and find that ffmpeg will return some error information. Could ImageMagick use this to avoid DoS? Does the process of return information miss something? As ImageMagick serves as libaries, someone can use this to cause DoS and it will become a big problem
.
Re: unknow bug when dealing with mp4
Posted: 2016-08-14T14:32:34-07:00
by fmw42
Imagemagick sets limits on memory, etc. See policy.xml. Discussion at ImageMagick Policy Configuration
Re: unknow bug when dealing with mp4
Posted: 2016-08-14T14:33:19-07:00
by snibgo
To reduce denial-of-service problems, you can set limits in policy.xml.