diff --git a/public/.gitattributes b/public/.gitattributes new file mode 100644 index 0000000..d41a940 --- /dev/null +++ b/public/.gitattributes @@ -0,0 +1 @@ +*.gif filter=lfs diff=lfs merge=lfs -text diff --git a/public/ExpVideoPreload.png b/public/ExpVideoPreload.png new file mode 100644 index 0000000..6101d17 Binary files /dev/null and b/public/ExpVideoPreload.png differ diff --git a/public/trans.bat b/public/trans.bat new file mode 100644 index 0000000..8f56a6f --- /dev/null +++ b/public/trans.bat @@ -0,0 +1,46 @@ +@echo off +setlocal enabledelayedexpansion + +REM -------------------------------------------------- +REM 批量将当前目录(不含子目录)下所有 .mp4 转为高质量 GIF +REM GIF 文件名前缀 "Gif_" +REM 若目标文件存在则自动覆盖 +REM -------------------------------------------------- + +REM 用户可按需调整: +set "WIDTH=992" +set "FPS=10" +REM -------------------------------------------------- + +for %%F in (*.mp4) do ( + set "INPUT=%%F" + set "BASENAME=%%~nF" + set "PALETTE=palette_!BASENAME!.png" + set "OUTPUT=Gif_!BASENAME!.gif" + + echo. + echo [PROCESS] %%F -> !OUTPUT! + + REM 1) 生成调色板 + ffmpeg -hide_banner -y -i "%%F" -vf "fps=%FPS%,scale=%WIDTH%:-1:flags=lanczos,palettegen" "!PALETTE!" + if errorlevel 1 ( + echo [ERROR] 调色板生成失败: %%F + ) else ( + REM 2) 按调色板生成 GIF + ffmpeg -hide_banner -y -i "%%F" -i "!PALETTE!" ^ + -filter_complex "fps=%FPS%,scale=%WIDTH%:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=none" ^ + "!OUTPUT!" + if errorlevel 1 ( + echo [ERROR] GIF 生成失败: %%F + ) else ( + echo [OK] 已生成: !OUTPUT! + ) + ) + + REM 删除临时调色板 + del /q "!PALETTE!" 2>nul +) + +echo. +echo 全部转换完成! +pause diff --git a/src/components/Examples.vue b/src/components/Examples.vue index 2e330b8..1c0db6d 100644 --- a/src/components/Examples.vue +++ b/src/components/Examples.vue @@ -5,7 +5,24 @@ import ExamplesContent from './ExamplesContent.vue';