mirror of
https://github.com/LingandRX/script_library.git
synced 2025-10-28 08:41:16 +08:00
32 lines
737 B
Batchfile
32 lines
737 B
Batchfile
@echo off
|
||
chcp 65001 >nul
|
||
|
||
echo =====================================
|
||
echo Windows FFmpeg 自动安装脚本
|
||
echo =====================================
|
||
|
||
:: 设置下载地址(gyan.dev 提供稳定构建)
|
||
set URL=https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
|
||
set ZIP=ffmpeg.zip
|
||
set DEST=C:\ffmpeg
|
||
|
||
echo.
|
||
echo 下载 FFmpeg...
|
||
powershell -Command "Invoke-WebRequest -Uri %URL% -OutFile %ZIP%"
|
||
|
||
echo.
|
||
echo 解压到 %DEST% ...
|
||
powershell -Command "Expand-Archive -Path %ZIP% -DestinationPath %DEST% -Force"
|
||
|
||
echo.
|
||
echo 配置环境变量 PATH ...
|
||
setx /M PATH "%DEST%\bin;%PATH%"
|
||
|
||
echo.
|
||
echo 清理临时文件 ...
|
||
del %ZIP%
|
||
|
||
echo.
|
||
echo 安装完成,请重新打开命令提示符后输入: ffmpeg -version
|
||
pause
|