This commands works perfectly:
ffmpeg -loop 1 -i flyer.jpg -c:v libx264 -t 15 -pix_fmt yuv420p -vf scale=1080:720 out.mp4
Trying to do the same with Laravel FFMPEG
FFMpeg::fromDisk('images')
->open('flyer.jpg')
->export()
->addFilter('-loop', 1)
->addFilter('-c:v', 'libx264')
->addFilter('-t', '15')
->addFilter('-pix_fmt', 'yuv420p')
->addFilter('-vf', 'scale=1080:720')
->save('timelapse.mp4');
Seems that all filters are correctly applied but "-t 15" is not.
The problem is that in order to work, the -loop parameter should be specified before the -i parameter.
This works:
ffmpeg -loop 1 -i flyer.jpg -c:v libx264 -t 15 -pix_fmt yuv420p -threads 12 -vf [in]scale=1080:720 out.mp4
This doesn't work:
ffmpeg -i flyer.jpg -loop 1 -c:v libx264 -t 15 -pix_fmt yuv420p -threads 12 -vf [in]scale=1080:720 out.mp4
So I should I proceed with FFMPEG Laravel? This topic was brought up in github: https://github.com/protonemedia/laravel-ffmpeg/issues/349
But no answers.
Thanks.