ffmpeg -y -loop 1 -i '$inputFile' -f lavfi -i anullsrc=r=44100:cl=stereo -vf "scale=1280:720" -c:v libx264 -pix_fmt yuv420p -c:a aac -strict experimental -t $seconds -crf 28 -preset ultrafast '$outputFile'
I am using above command to create a silent audio or music video using FFMPEG, this command is working fine to do so, but taking a long processing time, For 3second video creation it is taking 20+ seconds in android devices i found -loop 1 is indefinite loop that is making to take more time.
I need some helpful suggestion to optimise the results of processing. Moreover, I required silent sound too.
I tried different commands but they are not supporting both the functionality of silent and time frame.
-r 1
before the first-i
for creating 1fps video. (less frames to encode reduces the processing time). 2. Instead of usingscale
filter, create a 1280x720 PNG input image from advanced (save the scaling time - the filter scales every frame).