Homebrew Ffmpeg



Homebrew’s package index. Also known as: ffmpeg@4 Play, record, convert, and stream audio and video. Convert MP4 file to animated WEBP file in ffmpeg CLI 1. Install ffmpeg CLI through homebrew. In terminal.app, install ffmpeg through homebrew. Brew install ffmpeg Validate the installation: which ffmpeg Expect to see terminal returns the directory path of ffmpeg such as /usr/local/bin/ffmpeg. Set webp properties and convert.

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

Homebrew Ffmpeg

Validate the installation:

Cached

Expect to see terminal returns the directory path of ffmpeg such as /usr/local/bin/ffmpeg

Ffmpeg

2. Set webp properties and convert

Example command which would convert an mp4 file to a lossless loop playing webp file in 20FPS with resolution 800px(width) * h600px(height):

Export an animated lossy WebP with preset mode picture:

primary options:

Results

Brew Install Iterm2

  • set frame per second as 20: -filter:v fps=fps=20
  • set output file lossless: -lossless 1
  • set output webp file loop play: -loop 0. For non-loop, use -loop 1
  • set rendering mode -preset default , can set as picture, photo, text, icon, drawing and none as needed. It would effect output file size. http://ffmpeg.org/ffmpeg-all.html#Options-28
  • set output webp resolution as w800px * h600px -s 800:600

See Full List On Trac.ffmpeg.org

For more option details, please visit the the ffmpeg libwebp documentation

Homebrew Ffmpeg Audacity

This method should applicable for majority video formats including .mov, .avi, .flv, etc. as input files as well as .gif format as output file.