shunjikonishi / heroku-buildpack-ffmpeg

Install ffmpeg into heroku
108 stars 264 forks source link

Cannot read temporary files in /tmp/ #10

Closed Tvde1 closed 6 years ago

Tvde1 commented 6 years ago

I created a nodejs application hosted on heroku which uses imagemagick. I am doing this operation:

require('child_process').exec(`convert -quiet -delay 1 output.avi ${gif}`);

This should convert output.avi (which is present) to a gif file. In this case, gif is "../gifs/xstrycatdq.gif". This command works perfectly on my local windows machine.

I have installed heroku buildpack:

The error I am receiving is:

Command failed: convert -quiet -delay 1 output.avi ../gifs/xstrycatdq.gif
convert: DelegateFailed 'ffmpeg' -nostdin -v -1 -vframes %S -i '%i' -vcodec pam -an -f rawvideo -y '%u.pam' 2> '%Z'' @ error/delegate.c/InvokeDelegate/1919.
convert: UnableToOpenBlobmagick-58hSkEGyYprU5c.pam': No such file or directory @ error/blob.c/OpenBlob/2705.
convert: NoImagesDefined `../gifs/xstrycatdq.gif' @ error/convert.c/ConvertImageCommand/3257.
It seems that the /tmp/ directory can't be written to or anything. I also tried to mkdir /tmp/ but bash tells me that this dir already exists.

I have also tried changing the imagemagick's temp directory with the environment variable by doing export MAGICK_TMPDIR="temp".

Any help?

Tvde1 commented 6 years ago

Closed because this probably isn't the right place to ask