Created
April 26, 2021 17:42
-
-
Save hernikplays/2fab1cd544a3f0cc4214b0d8f3a16e13 to your computer and use it in GitHub Desktop.
A bad script for FFMPEG installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo Downloading FFMPEG | |
:: Change the URL to the latest FFMPEG build | |
curl -o ffmpeg.zip -L https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-04-26-12-39/ffmpeg-n4.4-6-g7e9b9f24df-win64-gpl-shared-4.4.zip | |
echo Extracting FFMPEG | |
tar -xf ffmpeg.zip | |
echo Moving FFMPEG to 'C:\ffmpeg' | |
if exist "C:\ffmpeg\" (rmdir /s /q c:\ffmpeg\) | |
:: Following needs to also be changed, the folder will be named after the ZIP in most cases | |
MOVE %~dp0ffmpeg-n4.4-6-g7e9b9f24df-win64-gpl-shared-4.4 C:\ffmpeg | |
echo Adding FFMPEG to PATH | |
:: thanks to https://stackoverflow.com/a/45566845 | |
for /f "usebackq tokens=2,*" %%A in (`reg query HKCU\Environment /v PATH`) do set my_user_path=%%B | |
echo --- | |
echo This might break your PATH, so here is your current USER PATH, make sure to copy and save it in case something breaks: | |
echo %my_user_path% | |
echo --- | |
setx PATH "C:\ffmpeg\bin;%my_user_path%" | |
echo Hopefully done! | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment