LoginSignup
0
1

More than 1 year has passed since last update.

ffmpegで連番画像からGIFを作成 / 解像度変更 / 逆再生

Posted at

連番画像からGIFの作成

手元にあるファイルがfile1.JPG, file2.JPG, file3.JPGのような連番画像の場合

$ ffmpeg -i file%d.JPG -vf palettegen palette.png

のように入力しpalette.pngを作成し,それをもとにGIFを作ります.

$ ffmpeg -f image2 -r 15 -i file%d.JPG -i palette.png -filter_complex paletteuse mixed_15fps.gif

-rの後がFPSになるので上記の場合だと15fpsということになります.

参考

解像度変更

素材のアスペクト比を維持して解像度を変更する場合,widthかheightのどちらかを指定して,もう一方を-1にすることで自動で調整してくれます.

$ ffmpeg -i mixed_15fps.gif -vf scale=720:-1 mixed_15fps_720.gif

※上記ではwidthを720で指定しています.

逆再生

$ ffmpeg -i mixed_15fps.gif -vf reverse -an mixed_15fps_720_reverse.gif

おわり

ffmpegを久しぶりに使うと毎回使い方を忘れているので今回はメモ感が...

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1