ffmpeg -i $INPUT.mp4 \ -vf "fps=10,scale=720:-1:flags=lanczos" \ -vcodec libwebp -lossless 0 -compression_level 6 \ -q:v 50 -loop 0 -preset picture -an \ -vsync 0 $OUTPUT.webp Adapted from Create animated GIF and WebP from videos using FFmpeg.