brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc
brew install gifify
sudo apt-get install ffmpeg libavcodec-extra
ffmpeg -ss 30 -t 3 -i input.mp4 -vf "fps=25,scale=320:-1:flags=lanczos" -loop 0 output.gif
-ss 30
skip 30 seconds-t 3
take 3 seconds-i
input file-vf
- "fps=25" set fps to 25
- "scale=w='min(500, iw*3/2):h=-1':flags=lanczos" scale to min 500px but keep aspect ratio, use lanczos algorithm
-loop 0
loop indefinitely, 1 = do not loop
ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_time 120 -reset_timestamps 1 out%02d.mp4
ffmpeg -i webbluetooth_cut_120.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis webbluetooth_cut_120.webm
gifify webbluetooth_cut_120.mp4 -o webbluetooth_cut_120.gif --fps 25