I'm trying to convert a jpg image to mp4 and transcode a mp4 file with ffmpeg on AWS lambda.
For the first task I issue the following:
ffmpeg -y -f lavfi -i anullsrc -loop 1 -framerate 30 -i test.jpg -t 2 -pix_fmt yuv420p -vf scale=640:480 -c:v libx264 -profile:v baseline -level 3.0 -c:a aac -map 0:a -map 1:v -strict -2 -preset ultrafast /tmp/jpg_output.mp4
and for the second:
ffmpeg -i /var/task/test.mp4 -c:v libx264 -c:a copy -strict -2 -v 9 -preset ultrafast -y /tmp/output.mp4
The funny thing is that the aforementioned tasks (jpg conversion and video transcoding) complete successfully, both locally and on AWS lambda, but I'm getting the below error messages:
Locally: "err: ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers"
AWS LAMBDA: "err: ffmpeg version N-89977-gddd851f7cb-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers"
Additionally, on AWS Lambda, the function exits with error, which results in re-execution of the function.
I searched for solutions to no avail. Any suggestions?
t 2to-t 2. Remove-strict -2because the FFmpeg AAC encoder has not been experimental for a few years now. - llogan