Skip to content

Instantly share code, notes, and snippets.

@nico-lab
Last active October 11, 2015 13:21
Show Gist options
  • Save nico-lab/020af20ac7b2f74a91da to your computer and use it in GitHub Desktop.
Save nico-lab/020af20ac7b2f74a91da to your computer and use it in GitHub Desktop.
ffmpeg でフレーム数を指定してアニメGIFを作る
echo off
set FFMPEG="H:\ffmpeg.exe"
set GIFSICLE="H:\gifsicle.exe"
%FFMPEG% -i %1 -filter_complex scale=320:-1,trim=start_frame=%2:end_frame=%3,palettegen -y %1_tmp.png
%FFMPEG% -i %1 -i %1_tmp.png -filter_complex scale=320:-1,unsharp=3:3:0.5,trim=start_frame=%2:end_frame=%3,paletteuse -f gif - | %GIFSICLE% -V -U -O3 - -o %1_opt.gif
del %1_tmp.png
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment