Removing black frames with constant framerate
Retime the remaining frames.
ffmpeg -framerate 30 -i /home/pictures/%*.jpg -vf &quot;blackframe=0,metadata=select:key=lavfi.blackframe.pblack:value=50:function=less,setpts=N/FR/TB,scale=640:-2,format=yuv420p&quot; -c:v libx264 -crf 28 /home/out.mp4