vvo / gifify

😻 Convert any video file to an optimized animated GIF.
ISC License
6.18k stars 313 forks source link

convert-im6.q16: cache resources exhausted #99

Closed arthurlutz closed 3 years ago

arthurlutz commented 6 years ago

On some video files (not all) I get the follow error and the produced file is empty :

$ gifify --colors 255 -o x.gif --resize '800:-1' VID_20170820_124826.mp4
convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `/tmp/magick-22271zppvVjFkR5gk' @ error/cache.c/OpenPixelCache/3945.
$ file x.gif 
x.gif: empty
$ file VID_20170820_124826.mp4
VID_20170820_124826.mp4: ISO Media, MPEG v4 system, 3GPP
$ dpkg -l ffmpeg
ii  ffmpeg                 7:3.2.4-1build2  amd64            Tools for transcoding, streaming and playing of m
$ dpkg -l imagemagick
ii  imagemagick            8:6.9.7.4+dfsg-3 amd64            image manipulation programs -- binaries
arthurlutz commented 6 years ago

The video was 30 seconds long, I ended up doing three runs of 10 seconds and that works...

fatso83 commented 6 years ago

Same problem. Tried making a gif out of a 45 second gif. Both this and the following script ends with the same error:

$ ffmpeg -i demo.mp4 -r 10 -f image2pipe -vcodec ppm - |   convert -delay 5 -loop 0 - output.gif

convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `/tmp/magick-11492-FwYUnivxewm' @ error/cache.c/OpenPixelCache/3982.
convert-im6.q16: no images defined `gif:-' @ error/convert.c/ConvertImageCommand/3258.
ianzitow commented 6 years ago

Try this: https://github.com/ImageMagick/ImageMagick/issues/396

AlexandreBonneau commented 3 years ago

It seems that issue could be closed, since the workaround described in #396 works great (ie. increasing the available memory in the /etc/ImageMagick-6/policy.xml file).

vvo commented 3 years ago

Hey @AlexandreBonneau, can you give a link to the workaround? thanks!

AlexandreBonneau commented 3 years ago

@vvo I was referring to the issue #396 mentioned just above. I edited my comment to add the link.

vvo commented 3 years ago

Thanks, for anyone following this, here's the workaround: https://github.com/ImageMagick/ImageMagick/issues/396#issuecomment-319569255