FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。

1、安装ffmpeg

sudo apt install ffmpeg

2、mp4等视频文件转为gif

ffmpeg  -i 视频文件 1.gif
  • -i :指定文件