i'm new to AWS-Lambda and trying to create thumbnail with ffmpeg and nodejs.
if i test it in vscode nodejs at my local computer, i get thumbnail in 2 seconds.
but if i test it at AWS lambda executing ffmpeg from layer with spawnSync,
it takes around 7~9 seconds only for executing ffmpeg to create thumbnail.
how can i lower lambda duration time?
may i get some advice?
@@ lambda ffmpeg code
ffmpeg params = (videoPath, imagePath) => [ "-ss", 0, "-i", videoPath, "-frames:v", 1, "-vf", "thumbnail,scale=150:100", imagePath ] spawnSync(ffmpegPath, ffmpegParams(videoPath, imagePath))
lambda max memory used was aroud 740MB