script_library/convert_mp3_to_flac/install_ffmpeg.bat
2025-08-25 22:44:32 +08:00

32 lines
737 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@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