|
|
- @echo off
- setlocal enabledelayedexpansion
- set ffmpegPath=D:\ffmpeg-master-latest-win64-gpl-shared\bin\ffmpeg.exe[quote]软件路径[/quote]
- set inputFolder=%~dp0
- set outputFolder=%inputFolder%GIFs
- if not exist %outputFolder% mkdir %outputFolder%
- for %%i in (%inputFolder%.mp4) do (
- echo Converting %%i...
- %ffmpegPath% -i %%i -ss 000000 -t 000500 -vf scale=320-1flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse %outputFolder%%%~ni.gif
- echo Converted %%i to %outputFolder%%%~ni.gif
- )
- echo All MP4 files have been processed.
复制代码 |
|