Merge branch 'main' of 47.107.44.202:xionglijia/18xchat

This commit is contained in:
chen wei bo
2025-09-01 19:07:39 +08:00
31 changed files with 30 additions and 16 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

@@ -1,16 +1,25 @@
@echo off
setlocal enabledelayedexpansion
:: 设置需要匹配的关键字(修改这里)
set keyword=_thumbnail
:: 遍历当前目录及所有子目录
:: 遍历 JPG 和 PNG 文件
for /r %%i in (*.jpg *.png) do (
set filename=%%~nxi
set "filename=%%~nxi"
:: 只处理包含 _thumbnail 且不包含 _blur 的文件
echo !filename! | findstr /i "%keyword%" >nul
if !errorlevel! == 0 (
echo 生成模糊图: %%i
ffmpeg -y -i "%%i" -vf "gblur=sigma=50" "%%~dpi%%~ni_blur%%~xi"
if !errorlevel! equ 0 (
echo !filename! | findstr /i "_blur" >nul
if !errorlevel! neq 0 (
set "blurfile=%%~dpi%%~ni_blur%%~xi"
if not exist "!blurfile!" (
echo 生成模糊图: %%i
ffmpeg -y -i "%%i" -vf "gblur=sigma=50" "!blurfile!"
) else (
echo 已存在模糊图: !blurfile!
)
)
)
)
@@ -12,17 +12,22 @@ for /r %%i in (*.mp4) do (
REM 生成输出文件名(与视频文件同名,不同扩展名)
set "output_file=%%~ni_thumbnail.jpg"
REM 提取第一帧
echo 正在处理: %%~nxi
ffmpeg -i "%%i" -vframes 1 -q:v 4 "!file_path!!output_file!" -y 2>nul
if !errorlevel! equ 0 (
echo 成功: !output_file!
REM 判断目标文件是否存在
if not exist "!file_path!!output_file!" (
REM 提取第一帧
echo 正在处理: %%~nxi
ffmpeg -i "%%i" -vframes 1 -q:v 4 "!file_path!!output_file!" -y 2>nul
if !errorlevel! equ 0 (
echo 成功: !output_file!
) else (
echo 失败: %%~nxi
)
echo.
) else (
echo 失败: %%~nxi
echo 已存在截图: !output_file!, 跳过生成.
)
echo.
)
echo 所有视频处理完成!
pause
pause
Binary file not shown.
Binary file not shown.
Binary file not shown.