Skip to content

Instantly share code, notes, and snippets.

@2stinkysocks
Created September 14, 2022 03:23
Show Gist options
  • Save 2stinkysocks/c3704ef53782564f8865b153498f342e to your computer and use it in GitHub Desktop.
Save 2stinkysocks/c3704ef53782564f8865b153498f342e to your computer and use it in GitHub Desktop.
A simple ffmpeg installer for windows
@echo OFF
NET SESSION >nul 2>&1
IF %ERRORLEVEL% EQU 0 (
echo Running as Administrator, continuing...
) ELSE (
echo ERROR: This script must be run as an Administrator.
PAUSE
EXIT /B 1
)
echo Downloading ffmpeg...
curl -Lo C:\ffmpeg.zip https://github.com/GyanD/codexffmpeg/releases/download/5.1.1/ffmpeg-5.1.1-essentials_build.zip
powershell -command "Expand-Archive -Path C:\ffmpeg.zip C:\ffmpeg"
echo Extracted archive
echo Moving files to Windows...
move C:\ffmpeg\ffmpeg-5.1.1-essentials_build\bin\ffmpeg.exe C:\Windows\ffmpeg.exe
move C:\ffmpeg\ffmpeg-5.1.1-essentials_build\bin\ffplay.exe C:\Windows\ffplay.exe
move C:\ffmpeg\ffmpeg-5.1.1-essentials_build\bin\ffprobe.exe C:\Windows\ffprobe.exe
echo Files Moved
echo Cleaning up...
rmdir /s /q C:\ffmpeg
del C:\ffmpeg.zip
echo Done!
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment