Cross-platform solution to record, convert and stream audio and video.
brew install ffmpeg # check installation which ffmpeg
mp4
to animated webp
mp4
file to a lossless
loop playing webp
file in 20FPS with resolution 800px(width) * h600px(height):
ffmpeg -i input_filename.mp4 -vcodec libwebp -filter:v fps=fps=20 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 800:600 output_filename.webp
Convert PNG sequence to WEBP sequence
-c:v libwebp
= output individual image files
ffmpeg -i in/%8d.png -c:v libwebp out/%8d.webp