setup script 2.3.0: changed FFmpeg build provider from zeranoe to gyan.dev

This commit is contained in:
K4YT3X 2020-09-28 20:31:22 -04:00
parent a0522311e2
commit b37acfa31d
2 changed files with 13 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# Name: Video2X Configuration File
# Creator: K4YT3X
# Date Created: October 23, 2018
# Last Modified: September 21, 2020
# Last Modified: September 28, 2020
# Values here are the default values. Change the value here to
# save the default value permanently.
# Items commented out are parameters irrelevant to this context
@ -120,7 +120,7 @@ anime4kcpp:
webVideo: null # process the video from URL
alpha: false # preserve the Alpha channel for transparent image
ffmpeg:
ffmpeg_path: '%LOCALAPPDATA%\video2x\ffmpeg-latest-win64-static\bin'
ffmpeg_path: '%LOCALAPPDATA%\video2x\ffmpeg\bin'
intermediate_file_name: 'intermediate.mkv'
# Step 1: Frame Extraction
# extract all frames from original input into temporary directory

View File

@ -4,7 +4,7 @@
Name: Video2X Setup Script
Creator: K4YT3X
Date Created: November 28, 2018
Last Modified: May 30, 2020
Last Modified: September 28, 2020
Editor: BrianPetkovsek
Editor: SAT3LL
@ -44,7 +44,7 @@ import zipfile
# Therefore, they will be installed during the Python dependency
# installation step and imported later in the script.
SETUP_VERSION = '2.2.1'
SETUP_VERSION = '2.3.0'
# global static variables
LOCALAPPDATA = pathlib.Path(os.getenv('localappdata'))
@ -126,14 +126,22 @@ class Video2xSetup:
"""
print('\nInstalling FFmpeg')
latest_release = 'https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.zip'
latest_release = 'https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.zip'
ffmpeg_zip = download(latest_release, tempfile.gettempdir())
self.trash.append(ffmpeg_zip)
ffmpeg_directory = LOCALAPPDATA / 'video2x' / 'ffmpeg'
with zipfile.ZipFile(ffmpeg_zip) as zipf:
zipf.extractall(LOCALAPPDATA / 'video2x')
# if directory already exists, remove it
if ffmpeg_directory.exists():
shutil.rmtree(ffmpeg_directory)
# rename the newly extracted directory
(LOCALAPPDATA / 'video2x' / zipf.namelist()[0]).rename(ffmpeg_directory)
def _install_gifski(self):
print('\nInstalling Gifski')
import requests