Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

ffmpeg throwing "errorMessage": "spawn ffmpeg ENOENT"

$
0
0

My ffmpeg function thats running as a shell command isnt working. I think its because 'ffmpeg' isnt really referring to anything. I have the ffmpeg node module in my bundle, but i dont know the execFile command is referring to it here.

Im following aws-lambda-ffmpeg as an example of how to call this particular function. They are referring to 'ffmpeg' as a 64-bit linux build they created from John Vansickle's static FFMPEG builds in their gulp function.

I want to know how to replace 'ffmpeg' with something that will just recognize it like a node_module without having to do the whole gulp static build process. To my understanding the only reason they are doing that is to get the latest build which i really dont need.

If I am wrong and a static build using gulp is needed for another reason please let me know.

function ffmpegProcess(description, cb) {console.log('Starting FFmpeg');child_process.execFile('ffmpeg',    ['-y','-loglevel', 'warning','-i', 'download','-c:a', 'copy','-vf', scaleFilter,'-movflags', '+faststart','-metadata', 'description='+ description,'out.'+ config.format.video.extension,'-vf', 'thumbnail','-vf', scaleFilter,'-vframes', '1','out.'+ config.format.image.extension    ],    {        cwd: tempDir    },    function(err, stdout, stderr) {        console.log('FFmpeg done.');        return cb(err, 'FFmpeg finished:'+ JSON.stringify({ stdout: stdout, stderr: stderr}));    });}

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>